Skip to content

Commit bf93a6b

Browse files
authored
Merge pull request #444 from radondb/v2.2.0
Support MySQL 8.0
2 parents 7d05a4f + 7084143 commit bf93a6b

23 files changed

+435
-199
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ docker-build: test ## Build docker image with the manager.
7373
docker build -t ${IMG} .
7474
docker build -f Dockerfile.sidecar -t ${SIDECAR_IMG} .
7575
docker build -f hack/xenon/Dockerfile -t ${XENON_IMG} hack/xenon
76-
76+
mysql8-sidecar:
77+
docker build --build-arg XTRABACKUP_PKG=percona-xtrabackup-80 -f Dockerfile.sidecar -t ${SIDECAR_IMG} .
7778
docker-push: ## Push docker image with the manager.
7879
docker push ${IMG}
7980
docker push ${SIDECAR_IMG}

api/v1alpha1/backup_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type BackupSpec struct {
3131

3232
// To specify the image that will be used for sidecar container.
3333
// +optional
34-
// +kubebuilder:default:="radondb/mysql-sidecar:latest"
34+
// +kubebuilder:default:="radondb/mysql57-sidecar:v2.2.0"
3535
Image string `json:"image"`
3636

3737
// HostName represents the host for which to take backup

api/v1alpha1/mysqlcluster_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ type MysqlClusterSpec struct {
6565

6666
// PodPolicy defines the policy to extra specification.
6767
// +optional
68-
// +kubebuilder:default:={imagePullPolicy: "IfNotPresent", extraResources: {requests: {cpu: "10m", memory: "32Mi"}}, sidecarImage: "radondb/mysql-sidecar:latest", busyboxImage: "busybox:1.32"}
68+
// +kubebuilder:default:={imagePullPolicy: "IfNotPresent", extraResources: {requests: {cpu: "10m", memory: "32Mi"}}, sidecarImage: "radondb/mysql57-sidecar:v2.2.0", busyboxImage: "busybox:1.32"}
6969
PodPolicy PodPolicy `json:"podPolicy,omitempty"`
7070

7171
// PVC extra specifiaction.
@@ -120,7 +120,7 @@ type MysqlOpts struct {
120120

121121
// InitTokuDB represents if install tokudb engine.
122122
// +optional
123-
// +kubebuilder:default:=true
123+
// +kubebuilder:default:=false
124124
InitTokuDB bool `json:"initTokuDB,omitempty"`
125125

126126
// A map[string]string that will be passed to my.cnf file.
@@ -199,7 +199,7 @@ type PodPolicy struct {
199199

200200
// To specify the image that will be used for sidecar container.
201201
// +optional
202-
// +kubebuilder:default:="radondb/mysql-sidecar:latest"
202+
// +kubebuilder:default:="radondb/mysql57-sidecar:v2.2.0"
203203
SidecarImage string `json:"sidecarImage,omitempty"`
204204

205205
// The busybox image.

charts/mysql-operator/crds/mysql.radondb.com_backups.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ spec:
4848
description: HostName represents the host for which to take backup
4949
type: string
5050
image:
51-
default: radondb/mysql-sidecar:latest
51+
default: radondb/mysql57-sidecar:v2.2.0
5252
description: To specify the image that will be used for sidecar container.
5353
type: string
5454
required:

charts/mysql-operator/crds/mysql.radondb.com_mysqlclusters.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ spec:
137137
description: Name for new database to create.
138138
type: string
139139
initTokuDB:
140-
default: true
140+
default: false
141141
description: InitTokuDB represents if install tokudb engine.
142142
type: boolean
143143
mysqlConf:
@@ -252,7 +252,7 @@ spec:
252252
cpu: 10m
253253
memory: 32Mi
254254
imagePullPolicy: IfNotPresent
255-
sidecarImage: radondb/mysql-sidecar:latest
255+
sidecarImage: radondb/mysql57-sidecar:v2.2.0
256256
description: PodPolicy defines the policy to extra specification.
257257
properties:
258258
affinity:
@@ -1182,7 +1182,7 @@ spec:
11821182
schedulerName:
11831183
type: string
11841184
sidecarImage:
1185-
default: radondb/mysql-sidecar:latest
1185+
default: radondb/mysql57-sidecar:v2.2.0
11861186
description: To specify the image that will be used for sidecar
11871187
container.
11881188
type: string

charts/mysql-operator/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ tolerationSeconds: 30
2121

2222
manager:
2323
image: radondb/mysql-operator
24-
tag: latest
24+
tag: v2.2.0
2525
resources: {}
2626
# We usually recommend not to specify default resources and to leave this as a conscious
2727
# choice for the user. This also increases chances charts run on environments with little

config/crd/bases/mysql.radondb.com_backups.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ spec:
4848
description: HostName represents the host for which to take backup
4949
type: string
5050
image:
51-
default: radondb/mysql-sidecar:latest
51+
default: radondb/mysql57-sidecar:v2.2.0
5252
description: To specify the image that will be used for sidecar container.
5353
type: string
5454
required:

config/crd/bases/mysql.radondb.com_mysqlclusters.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ spec:
137137
description: Name for new database to create.
138138
type: string
139139
initTokuDB:
140-
default: true
140+
default: false
141141
description: InitTokuDB represents if install tokudb engine.
142142
type: boolean
143143
mysqlConf:
@@ -252,7 +252,7 @@ spec:
252252
cpu: 10m
253253
memory: 32Mi
254254
imagePullPolicy: IfNotPresent
255-
sidecarImage: radondb/mysql-sidecar:latest
255+
sidecarImage: radondb/mysql57-sidecar:v2.2.0
256256
description: PodPolicy defines the policy to extra specification.
257257
properties:
258258
affinity:
@@ -1182,7 +1182,7 @@ spec:
11821182
schedulerName:
11831183
type: string
11841184
sidecarImage:
1185-
default: radondb/mysql-sidecar:latest
1185+
default: radondb/mysql57-sidecar:v2.2.0
11861186
description: To specify the image that will be used for sidecar
11871187
container.
11881188
type: string

config/samples/mysql_v1alpha1_mysqlcluster.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ spec:
6262

6363
podPolicy:
6464
imagePullPolicy: IfNotPresent
65-
sidecarImage: radondb/mysql-sidecar:latest
65+
sidecarImage: radondb/mysql57-sidecar:v2.2.0
6666
busyboxImage: busybox:1.32
6767

6868
slowLogTail: false
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
apiVersion: mysql.radondb.com/v1alpha1
2+
kind: MysqlCluster
3+
metadata:
4+
name: sample
5+
spec:
6+
replicas: 3
7+
mysqlVersion: "8.0"
8+
9+
# the backupSecretName specify the secret file name which store S3 information,
10+
# if you want S3 backup or restore, please create backup_secret.yaml, uncomment below and fill secret name:
11+
# backupSecretName:
12+
13+
# if you want create mysqlcluster from S3, uncomment and fill the directory in S3 bucket below:
14+
# restoreFrom:
15+
16+
mysqlOpts:
17+
rootPassword: "RadonDB@123"
18+
rootHost: localhost
19+
user: radondb_usr
20+
password: RadonDB@123
21+
database: radondb
22+
## tokudb is not supported in mysql8.
23+
# initTokuDB: false
24+
25+
# A simple map between string and string.
26+
# Such as:
27+
# mysqlConf:
28+
# expire_logs_days: "7"
29+
mysqlConf: {}
30+
31+
resources:
32+
requests:
33+
cpu: 100m
34+
memory: 256Mi
35+
limits:
36+
cpu: 500m
37+
memory: 1Gi
38+
39+
xenonOpts:
40+
image: radondb/xenon:1.1.5-alpha
41+
admitDefeatHearbeatCount: 5
42+
electionTimeout: 10000
43+
44+
resources:
45+
requests:
46+
cpu: 50m
47+
memory: 128Mi
48+
limits:
49+
cpu: 100m
50+
memory: 256Mi
51+
52+
metricsOpts:
53+
enabled: false
54+
image: prom/mysqld-exporter:v0.12.1
55+
56+
resources:
57+
requests:
58+
cpu: 10m
59+
memory: 32Mi
60+
limits:
61+
cpu: 100m
62+
memory: 128Mi
63+
64+
podPolicy:
65+
imagePullPolicy: IfNotPresent
66+
sidecarImage: radondb/mysql80-sidecar:v2.2.0
67+
busyboxImage: busybox:1.32
68+
69+
slowLogTail: false
70+
auditLogTail: false
71+
72+
labels: {}
73+
annotations: {}
74+
affinity: {}
75+
priorityClassName: ""
76+
tolerations: []
77+
schedulerName: ""
78+
# extraResources defines quotas for containers other than mysql or xenon.
79+
extraResources:
80+
requests:
81+
cpu: 10m
82+
memory: 32Mi
83+
84+
persistence:
85+
enabled: true
86+
accessModes:
87+
- ReadWriteOnce
88+
#storageClass: ""
89+
size: 20Gi

0 commit comments

Comments
 (0)