github.com/percona/percona-xtradb-cluster-operator@v1.14.0/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-secret-oc.yml (about)

     1  apiVersion: apps/v1
     2  kind: StatefulSet
     3  metadata:
     4    generation: 2
     5    name: one-pod-pxc
     6    ownerReferences:
     7      - controller: true
     8        kind: PerconaXtraDBCluster
     9        name: one-pod
    10  spec:
    11    podManagementPolicy: OrderedReady
    12    replicas: 1
    13    revisionHistoryLimit: 10
    14    selector:
    15      matchLabels:
    16        app.kubernetes.io/component: pxc
    17        app.kubernetes.io/instance: one-pod
    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: one-pod-pxc
    22    template:
    23      metadata:
    24        labels:
    25          app.kubernetes.io/component: pxc
    26          app.kubernetes.io/instance: one-pod
    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: pxc
    37                    app.kubernetes.io/instance: one-pod
    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          - args:
    44              - mysqld
    45            command:
    46              - /var/lib/mysql/pxc-entrypoint.sh
    47            env:
    48              - name: PXC_SERVICE
    49                value: one-pod-pxc-unready
    50              - name: MONITOR_HOST
    51                value: '%'
    52              - name: MYSQL_ROOT_PASSWORD
    53                valueFrom:
    54                  secretKeyRef:
    55                    key: root
    56                    name: internal-one-pod
    57              - name: XTRABACKUP_PASSWORD
    58                valueFrom:
    59                  secretKeyRef:
    60                    key: xtrabackup
    61                    name: internal-one-pod
    62              - name: MONITOR_PASSWORD
    63                valueFrom:
    64                  secretKeyRef:
    65                    key: monitor
    66                    name: internal-one-pod
    67              - name: OPERATOR_ADMIN_PASSWORD
    68                valueFrom:
    69                  secretKeyRef:
    70                    key: operator
    71                    name: internal-one-pod
    72              - name: LIVENESS_CHECK_TIMEOUT
    73                value: "5"
    74              - name: READINESS_CHECK_TIMEOUT
    75                value: "15"
    76              - name: DEFAULT_AUTHENTICATION_PLUGIN
    77                value: caching_sha2_password
    78            envFrom:
    79              - secretRef:
    80                  name: one-pod-env-vars-pxc
    81                  optional: true
    82            imagePullPolicy: Always
    83            livenessProbe:
    84              exec:
    85                command:
    86                  - /var/lib/mysql/liveness-check.sh
    87              failureThreshold: 3
    88              initialDelaySeconds: 300
    89              periodSeconds: 10
    90              successThreshold: 1
    91              timeoutSeconds: 5
    92            name: pxc
    93            ports:
    94              - containerPort: 3306
    95                name: mysql
    96                protocol: TCP
    97              - containerPort: 4444
    98                name: sst
    99                protocol: TCP
   100              - containerPort: 4567
   101                name: write-set
   102                protocol: TCP
   103              - containerPort: 4568
   104                name: ist
   105                protocol: TCP
   106              - containerPort: 33062
   107                name: mysql-admin
   108                protocol: TCP
   109              - containerPort: 33060
   110                name: mysqlx
   111                protocol: TCP
   112            readinessProbe:
   113              exec:
   114                command:
   115                  - /var/lib/mysql/readiness-check.sh
   116              failureThreshold: 5
   117              initialDelaySeconds: 15
   118              periodSeconds: 30
   119              successThreshold: 1
   120              timeoutSeconds: 15
   121            resources: {}
   122            terminationMessagePath: /dev/termination-log
   123            terminationMessagePolicy: File
   124            volumeMounts:
   125              - mountPath: /var/lib/mysql
   126                name: datadir
   127              - mountPath: /etc/percona-xtradb-cluster.conf.d
   128                name: config
   129              - mountPath: /tmp
   130                name: tmp
   131              - mountPath: /etc/mysql/ssl
   132                name: ssl
   133              - mountPath: /etc/mysql/ssl-internal
   134                name: ssl-internal
   135              - mountPath: /etc/mysql/mysql-users-secret
   136                name: mysql-users-secret-file
   137              - mountPath: /etc/my.cnf.d
   138                name: auto-config
   139              - mountPath: /etc/mysql/vault-keyring-secret
   140                name: vault-keyring-secret
   141              - mountPath: /etc/mysql/init-file
   142                name: mysql-init-file
   143        dnsPolicy: ClusterFirst
   144        initContainers:
   145          - command:
   146              - /pxc-init-entrypoint.sh
   147            imagePullPolicy: Always
   148            name: pxc-init
   149            resources:
   150              limits:
   151                cpu: 50m
   152                memory: 50M
   153            terminationMessagePath: /dev/termination-log
   154            terminationMessagePolicy: File
   155            volumeMounts:
   156              - mountPath: /var/lib/mysql
   157                name: datadir
   158        restartPolicy: Always
   159        schedulerName: default-scheduler
   160        securityContext:
   161          supplementalGroups:
   162            - 1001
   163        serviceAccount: default
   164        serviceAccountName: default
   165        terminationGracePeriodSeconds: 600
   166        volumes:
   167          - emptyDir: {}
   168            name: tmp
   169          - name: config
   170            secret:
   171              defaultMode: 420
   172              optional: false
   173              secretName: one-pod-pxc
   174          - name: ssl-internal
   175            secret:
   176              defaultMode: 420
   177              optional: true
   178              secretName: one-pod-ssl-internal
   179          - name: ssl
   180            secret:
   181              defaultMode: 420
   182              optional: true
   183              secretName: one-pod-ssl
   184          - configMap:
   185              defaultMode: 420
   186              name: auto-one-pod-pxc
   187              optional: true
   188            name: auto-config
   189          - name: vault-keyring-secret
   190            secret:
   191              defaultMode: 420
   192              optional: true
   193              secretName: one-pod-vault
   194          - name: mysql-users-secret-file
   195            secret:
   196              defaultMode: 420
   197              optional: false
   198              secretName: internal-one-pod
   199          - name: mysql-init-file
   200            secret:
   201              defaultMode: 420
   202              optional: true
   203              secretName: one-pod-mysql-init
   204    updateStrategy:
   205      rollingUpdate:
   206        partition: 0
   207      type: RollingUpdate
   208    volumeClaimTemplates:
   209      - metadata:
   210          name: datadir
   211        spec:
   212          accessModes:
   213            - ReadWriteOnce
   214          resources:
   215            requests:
   216              storage: 2Gi
   217        status:
   218          phase: Pending