github.com/percona/percona-xtradb-cluster-operator@v1.14.0/e2e-tests/affinity/compare/statefulset_custom-pxc.yml (about) 1 apiVersion: apps/v1 2 kind: StatefulSet 3 metadata: 4 generation: 1 5 name: custom-pxc 6 ownerReferences: 7 - controller: true 8 kind: PerconaXtraDBCluster 9 name: custom 10 spec: 11 podManagementPolicy: OrderedReady 12 replicas: 3 13 revisionHistoryLimit: 10 14 selector: 15 matchLabels: 16 app.kubernetes.io/component: pxc 17 app.kubernetes.io/instance: custom 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: custom-pxc 22 template: 23 metadata: 24 labels: 25 app.kubernetes.io/component: pxc 26 app.kubernetes.io/instance: custom 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 nodeAffinity: 33 preferredDuringSchedulingIgnoredDuringExecution: 34 - preference: 35 matchExpressions: 36 - key: another-node-label-key 37 operator: In 38 values: 39 - another-node-label-value 40 weight: 1 41 requiredDuringSchedulingIgnoredDuringExecution: 42 nodeSelectorTerms: 43 - matchExpressions: 44 - key: kubernetes.io/e2e-az-name 45 operator: In 46 values: 47 - e2e-az1 48 - e2e-az2 49 podAffinity: 50 requiredDuringSchedulingIgnoredDuringExecution: 51 - labelSelector: 52 matchExpressions: 53 - key: security 54 operator: In 55 values: 56 - S1 57 topologyKey: failure-domain.beta.kubernetes.io/zone 58 podAntiAffinity: 59 preferredDuringSchedulingIgnoredDuringExecution: 60 - podAffinityTerm: 61 labelSelector: 62 matchExpressions: 63 - key: security 64 operator: In 65 values: 66 - S2 67 topologyKey: kubernetes.io/hostname 68 weight: 100 69 containers: 70 - args: 71 - mysqld 72 command: 73 - /var/lib/mysql/pxc-entrypoint.sh 74 env: 75 - name: PXC_SERVICE 76 value: custom-pxc-unready 77 - name: MONITOR_HOST 78 value: '%' 79 - name: MYSQL_ROOT_PASSWORD 80 valueFrom: 81 secretKeyRef: 82 key: root 83 name: internal-custom 84 - name: XTRABACKUP_PASSWORD 85 valueFrom: 86 secretKeyRef: 87 key: xtrabackup 88 name: internal-custom 89 - name: MONITOR_PASSWORD 90 valueFrom: 91 secretKeyRef: 92 key: monitor 93 name: internal-custom 94 - name: OPERATOR_ADMIN_PASSWORD 95 valueFrom: 96 secretKeyRef: 97 key: operator 98 name: internal-custom 99 - name: LIVENESS_CHECK_TIMEOUT 100 value: "5" 101 - name: READINESS_CHECK_TIMEOUT 102 value: "15" 103 - name: DEFAULT_AUTHENTICATION_PLUGIN 104 value: mysql_native_password 105 envFrom: 106 - secretRef: 107 name: custom-env-vars-pxc 108 optional: true 109 imagePullPolicy: Always 110 livenessProbe: 111 exec: 112 command: 113 - /var/lib/mysql/liveness-check.sh 114 failureThreshold: 3 115 initialDelaySeconds: 300 116 periodSeconds: 10 117 successThreshold: 1 118 timeoutSeconds: 5 119 name: pxc 120 ports: 121 - containerPort: 3306 122 name: mysql 123 protocol: TCP 124 - containerPort: 4444 125 name: sst 126 protocol: TCP 127 - containerPort: 4567 128 name: write-set 129 protocol: TCP 130 - containerPort: 4568 131 name: ist 132 protocol: TCP 133 - containerPort: 33062 134 name: mysql-admin 135 protocol: TCP 136 - containerPort: 33060 137 name: mysqlx 138 protocol: TCP 139 readinessProbe: 140 exec: 141 command: 142 - /var/lib/mysql/readiness-check.sh 143 failureThreshold: 5 144 initialDelaySeconds: 15 145 periodSeconds: 30 146 successThreshold: 1 147 timeoutSeconds: 15 148 resources: 149 limits: 150 cpu: "1" 151 memory: 1G 152 requests: 153 cpu: 600m 154 memory: 1G 155 terminationMessagePath: /dev/termination-log 156 terminationMessagePolicy: File 157 volumeMounts: 158 - mountPath: /var/lib/mysql 159 name: datadir 160 - mountPath: /etc/percona-xtradb-cluster.conf.d 161 name: config 162 - mountPath: /tmp 163 name: tmp 164 - mountPath: /etc/mysql/ssl 165 name: ssl 166 - mountPath: /etc/mysql/ssl-internal 167 name: ssl-internal 168 - mountPath: /etc/mysql/mysql-users-secret 169 name: mysql-users-secret-file 170 - mountPath: /etc/my.cnf.d 171 name: auto-config 172 - mountPath: /etc/mysql/vault-keyring-secret 173 name: vault-keyring-secret 174 - mountPath: /etc/mysql/init-file 175 name: mysql-init-file 176 dnsPolicy: ClusterFirst 177 initContainers: 178 - command: 179 - /pxc-init-entrypoint.sh 180 imagePullPolicy: Always 181 name: pxc-init 182 resources: 183 limits: 184 cpu: 50m 185 memory: 50M 186 terminationMessagePath: /dev/termination-log 187 terminationMessagePolicy: File 188 volumeMounts: 189 - mountPath: /var/lib/mysql 190 name: datadir 191 restartPolicy: Always 192 schedulerName: default-scheduler 193 securityContext: 194 fsGroup: 1001 195 supplementalGroups: 196 - 1001 197 serviceAccount: default 198 serviceAccountName: default 199 terminationGracePeriodSeconds: 600 200 volumes: 201 - emptyDir: {} 202 name: tmp 203 - configMap: 204 defaultMode: 420 205 name: custom-pxc 206 optional: true 207 name: config 208 - name: ssl-internal 209 secret: 210 defaultMode: 420 211 optional: true 212 secretName: custom-ssl-internal 213 - name: ssl 214 secret: 215 defaultMode: 420 216 optional: false 217 secretName: some-name-ssl 218 - configMap: 219 defaultMode: 420 220 name: auto-custom-pxc 221 optional: true 222 name: auto-config 223 - name: vault-keyring-secret 224 secret: 225 defaultMode: 420 226 optional: true 227 secretName: custom-vault 228 - name: mysql-users-secret-file 229 secret: 230 defaultMode: 420 231 optional: false 232 secretName: internal-custom 233 - name: mysql-init-file 234 secret: 235 defaultMode: 420 236 optional: true 237 secretName: custom-mysql-init 238 updateStrategy: 239 rollingUpdate: 240 partition: 0 241 type: RollingUpdate 242 volumeClaimTemplates: 243 - metadata: 244 name: datadir 245 spec: 246 accessModes: 247 - ReadWriteOnce 248 resources: 249 requests: 250 storage: 2Gi 251 status: 252 phase: Pending