Skip to content

Instantly share code, notes, and snippets.

@jsierles
Created June 27, 2024 12:54
Show Gist options
  • Save jsierles/9b80b78f760aabe8c2920192a1b240fd to your computer and use it in GitHub Desktop.
Save jsierles/9b80b78f760aabe8c2920192a1b240fd to your computer and use it in GitHub Desktop.
Percona MySQL manifests
apiVersion: v1
kind: Pod
metadata:
annotations:
cloud.google.com/cluster_autoscaler_unhelpable_since: 2024-06-26T16:50:07+0000
cloud.google.com/cluster_autoscaler_unhelpable_until: Inf
percona.com/configuration-hash: 9f86ee66f3b72440e51b8a220faeb794
percona.com/env-secret-config-hash: 95eba1819981f96adcff77fbec158260
creationTimestamp: "2024-06-26T16:50:06Z"
generateName: mysql-sr4-haproxy-
labels:
app.kubernetes.io/component: haproxy
app.kubernetes.io/instance: mysql-sr4
app.kubernetes.io/managed-by: percona-xtradb-cluster-operator
app.kubernetes.io/name: percona-xtradb-cluster
app.kubernetes.io/part-of: percona-xtradb-cluster
apps.kubernetes.io/pod-index: "0"
controller-revision-hash: mysql-sr4-haproxy-585f9997cb
statefulset.kubernetes.io/pod-name: mysql-sr4-haproxy-0
name: mysql-sr4-haproxy-0
namespace: everest
ownerReferences:
- apiVersion: apps/v1
blockOwnerDeletion: true
controller: true
kind: StatefulSet
name: mysql-sr4-haproxy
uid: 70b66fa3-e5f5-4ba7-b8c0-6b3156088be8
resourceVersion: "3288838"
uid: e285de1f-672d-4983-911a-69a6e66002a3
spec:
containers:
- env:
- name: PXC_SERVICE
value: mysql-sr4-pxc
- name: LIVENESS_CHECK_TIMEOUT
value: "30"
- name: READINESS_CHECK_TIMEOUT
value: "30"
envFrom:
- secretRef:
name: haproxy-env-secret
optional: true
image: percona/percona-xtradb-cluster-operator:1.13.0-haproxy
imagePullPolicy: Always
livenessProbe:
exec:
command:
- /usr/local/bin/liveness-check.sh
failureThreshold: 4
initialDelaySeconds: 60
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 30
name: haproxy
ports:
- containerPort: 3306
name: mysql
protocol: TCP
- containerPort: 3307
name: mysql-replicas
protocol: TCP
- containerPort: 3309
name: proxy-protocol
protocol: TCP
- containerPort: 33062
name: mysql-admin
protocol: TCP
- containerPort: 33060
name: mysqlx
protocol: TCP
readinessProbe:
exec:
command:
- /usr/local/bin/readiness-check.sh
failureThreshold: 3
initialDelaySeconds: 15
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 30
resources:
limits:
cpu: 200m
memory: 204Mi
requests:
cpu: 190m
memory: 195Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /etc/haproxy-custom/
name: haproxy-custom
- mountPath: /etc/haproxy/pxc
name: haproxy-auto
- mountPath: /etc/mysql/mysql-users-secret
name: mysql-users-secret-file
- mountPath: /etc/mysql/haproxy-env-secret
name: haproxy-env-secret
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: kube-api-access-45bb2
readOnly: true
- args:
- /usr/bin/peer-list
- -on-change=/usr/bin/add_pxc_nodes.sh
- -service=$(PXC_SERVICE)
env:
- name: PXC_SERVICE
value: mysql-sr4-pxc
envFrom:
- secretRef:
name: haproxy-env-secret
optional: true
image: percona/percona-xtradb-cluster-operator:1.13.0-haproxy
imagePullPolicy: Always
name: pxc-monit
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /etc/haproxy-custom/
name: haproxy-custom
- mountPath: /etc/haproxy/pxc
name: haproxy-auto
- mountPath: /etc/mysql/mysql-users-secret
name: mysql-users-secret-file
- mountPath: /etc/mysql/haproxy-env-secret
name: haproxy-env-secret
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: kube-api-access-45bb2
readOnly: true
dnsPolicy: ClusterFirst
enableServiceLinks: true
hostname: mysql-sr4-haproxy-0
initContainers:
- command:
- /pxc-init-entrypoint.sh
image: docker.io/percona/percona-xtradb-cluster-operator:1.13.0
imagePullPolicy: Always
name: pxc-init
resources:
limits:
cpu: 600m
memory: 1825361100800m
requests:
cpu: 570m
memory: 1728724336640m
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/lib/mysql
name: bin
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: kube-api-access-45bb2
readOnly: true
nodeName: gke-us-central-everest-default-pool-363181b1-clk9
preemptionPolicy: PreemptLowerPriority
priority: 0
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: default
serviceAccountName: default
subdomain: mysql-sr4-haproxy
terminationGracePeriodSeconds: 30
tolerations:
- effect: NoExecute
key: node.kubernetes.io/not-ready
operator: Exists
tolerationSeconds: 300
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 300
volumes:
- configMap:
defaultMode: 420
name: mysql-sr4-haproxy
optional: true
name: haproxy-custom
- emptyDir: {}
name: haproxy-auto
- name: mysql-users-secret-file
secret:
defaultMode: 420
optional: false
secretName: internal-mysql-sr4
- name: haproxy-env-secret
secret:
defaultMode: 420
optional: true
secretName: haproxy-env-secret
- emptyDir: {}
name: bin
- name: kube-api-access-45bb2
projected:
defaultMode: 420
sources:
- serviceAccountToken:
expirationSeconds: 3607
path: token
- configMap:
items:
- key: ca.crt
path: ca.crt
name: kube-root-ca.crt
- downwardAPI:
items:
- fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
path: namespace
status:
conditions:
- lastProbeTime: null
lastTransitionTime: "2024-06-26T16:54:54Z"
status: "True"
type: PodReadyToStartContainers
- lastProbeTime: null
lastTransitionTime: "2024-06-26T16:54:54Z"
status: "True"
type: Initialized
- lastProbeTime: null
lastTransitionTime: "2024-06-26T16:55:28Z"
status: "True"
type: Ready
- lastProbeTime: null
lastTransitionTime: "2024-06-26T16:55:28Z"
status: "True"
type: ContainersReady
- lastProbeTime: null
lastTransitionTime: "2024-06-26T16:54:52Z"
status: "True"
type: PodScheduled
containerStatuses:
- containerID: containerd://8f0a9cc512967d23968720c82bb8a361578800707bb8270b4809b8867ca1bf13
image: docker.io/percona/percona-xtradb-cluster-operator:1.13.0-haproxy
imageID: docker.io/percona/percona-xtradb-cluster-operator@sha256:f04e4fea548bfc7cb0bfc73c75c7f2c64d299cf04125a07a8101a55f0f734fed
lastState: {}
name: haproxy
ready: true
restartCount: 0
started: true
state:
running:
startedAt: "2024-06-26T16:54:54Z"
- containerID: containerd://de155333105c16c47f5ef2aa549ffeb94821215814a8db18880f521c87a7b703
image: docker.io/percona/percona-xtradb-cluster-operator:1.13.0-haproxy
imageID: docker.io/percona/percona-xtradb-cluster-operator@sha256:f04e4fea548bfc7cb0bfc73c75c7f2c64d299cf04125a07a8101a55f0f734fed
lastState: {}
name: pxc-monit
ready: true
restartCount: 0
started: true
state:
running:
startedAt: "2024-06-26T16:54:54Z"
hostIP: 10.128.0.5
hostIPs:
- ip: 10.128.0.5
initContainerStatuses:
- containerID: containerd://575c240e9d0d2c881e1eacb5c70ce33e6c31b97b0f3f539387d6f63cb283ede7
image: docker.io/percona/percona-xtradb-cluster-operator:1.13.0
imageID: docker.io/percona/percona-xtradb-cluster-operator@sha256:c674d63242f1af521edfbaffae2ae02fb8d010c0557a67a9c42d2b4a50db5243
lastState: {}
name: pxc-init
ready: true
restartCount: 0
started: false
state:
terminated:
containerID: containerd://575c240e9d0d2c881e1eacb5c70ce33e6c31b97b0f3f539387d6f63cb283ede7
exitCode: 0
finishedAt: "2024-06-26T16:54:53Z"
reason: Completed
startedAt: "2024-06-26T16:54:53Z"
phase: Running
podIP: 10.92.2.185
podIPs:
- ip: 10.92.2.185
qosClass: Burstable
startTime: "2024-06-26T16:54:52Z"
apiVersion: v1
kind: Pod
metadata:
annotations:
cloud.google.com/cluster_autoscaler_unhelpable_since: 2024-06-26T16:50:07+0000
cloud.google.com/cluster_autoscaler_unhelpable_until: Inf
percona.com/configuration-hash: f59cc69b99b1b0913616a6b98ff13175
creationTimestamp: "2024-06-26T16:50:06Z"
generateName: mysql-sr4-pxc-
labels:
app.kubernetes.io/component: pxc
app.kubernetes.io/instance: mysql-sr4
app.kubernetes.io/managed-by: percona-xtradb-cluster-operator
app.kubernetes.io/name: percona-xtradb-cluster
app.kubernetes.io/part-of: percona-xtradb-cluster
apps.kubernetes.io/pod-index: "0"
controller-revision-hash: mysql-sr4-pxc-59cdf6f8bc
statefulset.kubernetes.io/pod-name: mysql-sr4-pxc-0
name: mysql-sr4-pxc-0
namespace: everest
ownerReferences:
- apiVersion: apps/v1
blockOwnerDeletion: true
controller: true
kind: StatefulSet
name: mysql-sr4-pxc
uid: 4ce50db5-3f56-477d-8b65-d379f38a55f3
resourceVersion: "3288755"
uid: 39d8e3e0-277a-4dd7-b25b-f915b859748e
spec:
containers:
- args:
- mysqld
command:
- /var/lib/mysql/pxc-entrypoint.sh
env:
- name: PXC_SERVICE
value: mysql-sr4-pxc-unready
- name: MONITOR_HOST
value: '%'
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
key: root
name: internal-mysql-sr4
- name: XTRABACKUP_PASSWORD
valueFrom:
secretKeyRef:
key: xtrabackup
name: internal-mysql-sr4
- name: MONITOR_PASSWORD
valueFrom:
secretKeyRef:
key: monitor
name: internal-mysql-sr4
- name: CLUSTER_HASH
value: "1628377"
- name: OPERATOR_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
key: operator
name: internal-mysql-sr4
- name: LIVENESS_CHECK_TIMEOUT
value: "450"
- name: READINESS_CHECK_TIMEOUT
value: "450"
- name: DEFAULT_AUTHENTICATION_PLUGIN
value: caching_sha2_password
envFrom:
- secretRef:
name: mysql-sr4-env-vars-pxc
optional: true
image: percona/percona-xtradb-cluster:8.0.32-24.2
imagePullPolicy: Always
livenessProbe:
exec:
command:
- /var/lib/mysql/liveness-check.sh
failureThreshold: 3
initialDelaySeconds: 300
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
name: pxc
ports:
- containerPort: 3306
name: mysql
protocol: TCP
- containerPort: 4444
name: sst
protocol: TCP
- containerPort: 4567
name: write-set
protocol: TCP
- containerPort: 4568
name: ist
protocol: TCP
- containerPort: 33062
name: mysql-admin
protocol: TCP
- containerPort: 33060
name: mysqlx
protocol: TCP
readinessProbe:
exec:
command:
- /var/lib/mysql/readiness-check.sh
failureThreshold: 5
initialDelaySeconds: 15
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 15
resources:
limits:
cpu: 600m
memory: 1825361100800m
requests:
cpu: 570m
memory: 1728724336640m
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/lib/mysql
name: datadir
- mountPath: /etc/percona-xtradb-cluster.conf.d
name: config
- mountPath: /tmp
name: tmp
- mountPath: /etc/mysql/ssl
name: ssl
- mountPath: /etc/mysql/ssl-internal
name: ssl-internal
- mountPath: /etc/mysql/mysql-users-secret
name: mysql-users-secret-file
- mountPath: /etc/my.cnf.d
name: auto-config
- mountPath: /etc/mysql/vault-keyring-secret
name: vault-keyring-secret
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: kube-api-access-mffk2
readOnly: true
dnsPolicy: ClusterFirst
enableServiceLinks: true
hostname: mysql-sr4-pxc-0
initContainers:
- command:
- /pxc-init-entrypoint.sh
image: docker.io/percona/percona-xtradb-cluster-operator:1.13.0
imagePullPolicy: Always
name: pxc-init
resources:
limits:
cpu: 600m
memory: 1825361100800m
requests:
cpu: 570m
memory: 1728724336640m
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/lib/mysql
name: datadir
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: kube-api-access-mffk2
readOnly: true
nodeName: gke-us-central-everest-default-pool-363181b1-zv6n
preemptionPolicy: PreemptLowerPriority
priority: 0
restartPolicy: Always
schedulerName: default-scheduler
securityContext:
fsGroup: 1001
supplementalGroups:
- 1001
serviceAccount: default
serviceAccountName: default
subdomain: mysql-sr4-pxc
terminationGracePeriodSeconds: 600
tolerations:
- effect: NoExecute
key: node.kubernetes.io/not-ready
operator: Exists
tolerationSeconds: 300
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 300
volumes:
- name: datadir
persistentVolumeClaim:
claimName: datadir-mysql-sr4-pxc-0
- emptyDir: {}
name: tmp
- configMap:
defaultMode: 420
name: mysql-sr4-pxc
optional: true
name: config
- name: ssl-internal
secret:
defaultMode: 420
optional: true
secretName: mysql-sr4-ssl-internal
- name: ssl
secret:
defaultMode: 420
optional: true
secretName: mysql-sr4-ssl
- configMap:
defaultMode: 420
name: auto-mysql-sr4-pxc
optional: true
name: auto-config
- name: vault-keyring-secret
secret:
defaultMode: 420
optional: true
secretName: mysql-sr4-vault
- name: mysql-users-secret-file
secret:
defaultMode: 420
optional: false
secretName: internal-mysql-sr4
- name: kube-api-access-mffk2
projected:
defaultMode: 420
sources:
- serviceAccountToken:
expirationSeconds: 3607
path: token
- configMap:
items:
- key: ca.crt
path: ca.crt
name: kube-root-ca.crt
- downwardAPI:
items:
- fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
path: namespace
status:
conditions:
- lastProbeTime: null
lastTransitionTime: "2024-06-26T16:54:54Z"
status: "True"
type: PodReadyToStartContainers
- lastProbeTime: null
lastTransitionTime: "2024-06-26T16:54:54Z"
status: "True"
type: Initialized
- lastProbeTime: null
lastTransitionTime: "2024-06-26T16:55:23Z"
status: "True"
type: Ready
- lastProbeTime: null
lastTransitionTime: "2024-06-26T16:55:23Z"
status: "True"
type: ContainersReady
- lastProbeTime: null
lastTransitionTime: "2024-06-26T16:54:44Z"
status: "True"
type: PodScheduled
containerStatuses:
- containerID: containerd://59cf611391f213d70f0b316015f6e23e9e9f3606789f320b72cb56b5058eceab
image: docker.io/percona/percona-xtradb-cluster:8.0.32-24.2
imageID: docker.io/percona/percona-xtradb-cluster@sha256:1f978ab8912e1b5fc66570529cb7e7a4ec6a38adbfce1ece78159b0fcfa7d47a
lastState: {}
name: pxc
ready: true
restartCount: 0
started: true
state:
running:
startedAt: "2024-06-26T16:54:54Z"
hostIP: 10.128.0.3
hostIPs:
- ip: 10.128.0.3
initContainerStatuses:
- containerID: containerd://f88363423599d5630a4ea10528c653d4bbe72f177ee5b1c69a672e9fce9bbc74
image: docker.io/percona/percona-xtradb-cluster-operator:1.13.0
imageID: docker.io/percona/percona-xtradb-cluster-operator@sha256:c674d63242f1af521edfbaffae2ae02fb8d010c0557a67a9c42d2b4a50db5243
lastState: {}
name: pxc-init
ready: true
restartCount: 0
started: false
state:
terminated:
containerID: containerd://f88363423599d5630a4ea10528c653d4bbe72f177ee5b1c69a672e9fce9bbc74
exitCode: 0
finishedAt: "2024-06-26T16:54:53Z"
reason: Completed
startedAt: "2024-06-26T16:54:53Z"
phase: Running
podIP: 10.92.0.156
podIPs:
- ip: 10.92.0.156
qosClass: Burstable
startTime: "2024-06-26T16:54:44Z"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment