sidecar版本只支持到8.0.35,35可以支持到mysql8.0.35 .
默认镜像是5.7的。需要自己打sidecar的镜像:
Docker image for sidecar containers
https://github.com/bitpoke/mysql-operator/tree/master/images/mysql-operator-sidecar-8.0
参考5.7里面的Dockerfile
###############################################################################
FROM bitpoke/mysql-operator-sidecar-8.0:v0.6.3
xxx.com/database/bitpoke/mysql-operator-sidecar-8.0:v0.6.3.1
USER root
COPY percona-toolkit_3.6.0-1.bullseye_amd64.deb /
COPY percona-xtrabackup-80_8.0.35-31-1.bullseye_amd64.deb /
RUN apt-get update && apt-get install zstd && apt-get clean && rm -fr /var/cache/apt/archives && /bin/sh -c set -ex && mkdir -p /tmp/dl && cd /tmp/dl && mv /percona-toolkit_3.6.0-1.bullseye_amd64.deb /tmp/dl && mv /percona-xtrabackup-80_8.0.35-31-1.bullseye_amd64.deb /tmp/dl && dpkg -i *.deb && cd / && rm -rf /tmp/dl && apt-get autoremove && apt-get autoclean # buildkit
USER mysql
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
Cluster模板:
apiVersion: mysql.presslabs.org/v1alpha1
kind: MysqlCluster
metadata:
name: test-mysql
labels:
database_type: mysql
spec:
replicas: 2
secretName: root-secret-mysql
image: xxxxx/database/percona/percona-server:8.0.36.3-28
#image: percona:8.0
mysqlVersion: "8.0.36"
backupSecretName: mysql-cluster-backup-secret
backupURL: s3://rdbbackmysql/
backupSchedule: "0 18 15 * * *"
backupScheduleJobsHistoryLimit: 1
backupRemoteDeletePolicy: delete
mysqlConf:
default_authentication_plugin: caching_sha2_password
default-time-zone: 'Asia/Shanghai'
disable_ssl: 1
skip_ssl: 1
volumeSpec:
persistentVolumeClaim:
accessModes: [ "ReadWriteOnce" ]
storageClassName: csi-cephfs-sc
resources:
requests:
storage: 10Gi
podSpec:
imagePullSecrets:
- name: dbaregistry
imagePullPolicy: IfNotPresent
annotations:
TZ: "Asia/Shanghai"
mysqlOperatorSidecarResources:
limits:
memory: 400Mi
cpu: 200m
metricsExporterResources:
requests:
memory: 100Mi
cpu: 100m
limits:
memory: 100Mi
cpu: 200m
resources:
requests:
memory: 1G
cpu: 300m
limits:
memory: 2G
cpu: 800m