github.com/percona/percona-xtradb-cluster-operator@v1.14.0/e2e-tests/haproxy/compare/statefulset_haproxy-haproxy-k127.yml (about)

     1  apiVersion: apps/v1
     2  kind: StatefulSet
     3  metadata:
     4    generation: 1
     5    name: haproxy-haproxy
     6    ownerReferences:
     7      - controller: true
     8        kind: PerconaXtraDBCluster
     9        name: haproxy
    10  spec:
    11    persistentVolumeClaimRetentionPolicy:
    12      whenDeleted: Retain
    13      whenScaled: Retain
    14    podManagementPolicy: OrderedReady
    15    replicas: 3
    16    revisionHistoryLimit: 10
    17    selector:
    18      matchLabels:
    19        app.kubernetes.io/component: haproxy
    20        app.kubernetes.io/instance: haproxy
    21        app.kubernetes.io/managed-by: percona-xtradb-cluster-operator
    22        app.kubernetes.io/name: percona-xtradb-cluster
    23        app.kubernetes.io/part-of: percona-xtradb-cluster
    24    serviceName: haproxy-haproxy
    25    template:
    26      metadata:
    27        labels:
    28          app.kubernetes.io/component: haproxy
    29          app.kubernetes.io/instance: haproxy
    30          app.kubernetes.io/managed-by: percona-xtradb-cluster-operator
    31          app.kubernetes.io/name: percona-xtradb-cluster
    32          app.kubernetes.io/part-of: percona-xtradb-cluster
    33      spec:
    34        affinity:
    35          podAntiAffinity:
    36            requiredDuringSchedulingIgnoredDuringExecution:
    37              - labelSelector:
    38                  matchLabels:
    39                    app.kubernetes.io/component: haproxy
    40                    app.kubernetes.io/instance: haproxy
    41                    app.kubernetes.io/managed-by: percona-xtradb-cluster-operator
    42                    app.kubernetes.io/name: percona-xtradb-cluster
    43                    app.kubernetes.io/part-of: percona-xtradb-cluster
    44                topologyKey: kubernetes.io/hostname
    45        containers:
    46          - env:
    47              - name: PXC_SERVICE
    48                value: haproxy-pxc
    49              - name: LIVENESS_CHECK_TIMEOUT
    50                value: "6"
    51              - name: READINESS_CHECK_TIMEOUT
    52                value: "1"
    53            envFrom:
    54              - secretRef:
    55                  name: haproxy-env-vars-haproxy
    56                  optional: true
    57            imagePullPolicy: Always
    58            livenessProbe:
    59              exec:
    60                command:
    61                  - /usr/local/bin/liveness-check.sh
    62              failureThreshold: 5
    63              initialDelaySeconds: 61
    64              periodSeconds: 31
    65              successThreshold: 1
    66              timeoutSeconds: 6
    67            name: haproxy
    68            ports:
    69              - containerPort: 3306
    70                name: mysql
    71                protocol: TCP
    72              - containerPort: 3307
    73                name: mysql-replicas
    74                protocol: TCP
    75              - containerPort: 3309
    76                name: proxy-protocol
    77                protocol: TCP
    78              - containerPort: 33062
    79                name: mysql-admin
    80                protocol: TCP
    81              - containerPort: 33060
    82                name: mysqlx
    83                protocol: TCP
    84            readinessProbe:
    85              exec:
    86                command:
    87                  - /usr/local/bin/readiness-check.sh
    88              failureThreshold: 3
    89              initialDelaySeconds: 15
    90              periodSeconds: 5
    91              successThreshold: 1
    92              timeoutSeconds: 1
    93            resources: {}
    94            terminationMessagePath: /dev/termination-log
    95            terminationMessagePolicy: File
    96            volumeMounts:
    97              - mountPath: /etc/haproxy-custom/
    98                name: haproxy-custom
    99              - mountPath: /etc/haproxy/pxc
   100                name: haproxy-auto
   101              - mountPath: /etc/mysql/mysql-users-secret
   102                name: mysql-users-secret-file
   103              - mountPath: /etc/mysql/haproxy-env-secret
   104                name: haproxy-env-vars-haproxy
   105          - args:
   106              - /usr/bin/peer-list
   107              - -on-change=/usr/bin/add_pxc_nodes.sh
   108              - -service=$(PXC_SERVICE)
   109            env:
   110              - name: PXC_SERVICE
   111                value: haproxy-pxc
   112            envFrom:
   113              - secretRef:
   114                  name: haproxy-env-vars-haproxy
   115                  optional: true
   116            imagePullPolicy: Always
   117            name: pxc-monit
   118            resources: {}
   119            terminationMessagePath: /dev/termination-log
   120            terminationMessagePolicy: File
   121            volumeMounts:
   122              - mountPath: /etc/haproxy-custom/
   123                name: haproxy-custom
   124              - mountPath: /etc/haproxy/pxc
   125                name: haproxy-auto
   126              - mountPath: /etc/mysql/mysql-users-secret
   127                name: mysql-users-secret-file
   128              - mountPath: /etc/mysql/haproxy-env-secret
   129                name: haproxy-env-vars-haproxy
   130          - args:
   131              - -c
   132              - while true; do trap 'exit 0' SIGINT SIGTERM SIGQUIT SIGKILL; done;
   133            command:
   134              - /bin/sh
   135            imagePullPolicy: Always
   136            name: my-sidecar-1
   137            resources: {}
   138            terminationMessagePath: /dev/termination-log
   139            terminationMessagePolicy: File
   140        dnsPolicy: ClusterFirst
   141        initContainers:
   142          - command:
   143              - /pxc-init-entrypoint.sh
   144            imagePullPolicy: Always
   145            name: pxc-init
   146            resources:
   147              limits:
   148                cpu: "1"
   149                memory: 500M
   150              requests:
   151                cpu: 300m
   152                memory: 200M
   153            terminationMessagePath: /dev/termination-log
   154            terminationMessagePolicy: File
   155            volumeMounts:
   156              - mountPath: /var/lib/mysql
   157                name: bin
   158        restartPolicy: Always
   159        runtimeClassName: docker-rc
   160        schedulerName: default-scheduler
   161        securityContext: {}
   162        serviceAccount: default
   163        serviceAccountName: default
   164        terminationGracePeriodSeconds: 30
   165        tolerations:
   166          - effect: NoExecute
   167            key: node.alpha.kubernetes.io/unreachable
   168            operator: Exists
   169            tolerationSeconds: 6000
   170        volumes:
   171          - configMap:
   172              defaultMode: 420
   173              name: haproxy-haproxy
   174              optional: true
   175            name: haproxy-custom
   176          - emptyDir: {}
   177            name: haproxy-auto
   178          - name: mysql-users-secret-file
   179            secret:
   180              defaultMode: 420
   181              optional: false
   182              secretName: internal-haproxy
   183          - name: haproxy-env-vars-haproxy
   184            secret:
   185              defaultMode: 420
   186              optional: true
   187              secretName: haproxy-env-vars-haproxy
   188          - emptyDir: {}
   189            name: bin
   190    updateStrategy:
   191      rollingUpdate:
   192        partition: 0
   193      type: RollingUpdate