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

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