-
-
Notifications
You must be signed in to change notification settings - Fork 279
Expand file tree
/
Copy pathexample-cluster.yaml
More file actions
181 lines (155 loc) · 4.82 KB
/
example-cluster.yaml
File metadata and controls
181 lines (155 loc) · 4.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
apiVersion: mysql.presslabs.org/v1alpha1
kind: MysqlCluster
metadata:
name: my-cluster
spec:
replicas: 2
secretName: my-secret
## For setting custom docker image or specifying mysql version
## the image field has priority over mysqlVersion.
# image: percona:5.7
# mysqlVersion: "5.7"
# initBucketURL: gs://bucket_name/backup.xtrabackup.gz
# initBucketSecretName:
## PodDisruptionBudget
# minAvailable: 1
## For recurrent backups set backupSchedule with a cronjob expression with seconds
# backupSchedule:
# backupURL: s3://bucket_name/
# backupSecretName:
# backupScheduleJobsHistoryLimit:
# backupRemoteDeletePolicy:
# backupCredentials:
# use s3 https://rclone.org/s3/
# S3_PROVIDER: ? # like: AWS, Minio, Ceph, and so on
# S3_ENDPOINT: ?
# AWS_ACCESS_KEY_ID: ?
# AWS_SECRET_ACCESS_KEY: ?
# AWS_REGION: ?
# AWS_ACL: ?
# AWS_STORAGE_CLASS: ?
# AWS_SESSION_TOKEN: ?
# use google cloud storage https://rclone.org/googlecloudstorage/
# GCS_SERVICE_ACCOUNT_JSON_KEY: ?
# GCS_PROJECT_ID: ?
# GCS_OBJECT_ACL: ?
# GCS_BUCKET_ACL: ?
# GCS_LOCATION: ?
# GCS_STORAGE_CLASS: MULTI_REGIONAL
# use http https://rclone.org/http/
# HTTP_URL: ?
# use google drive https://rclone.org/drive/
# GDRIVE_CLIENT_ID: ?
# GDRIVE_ROOT_FOLDER_ID: ?
# GDRIVE_IMPERSONATOR: ?
# use azure https://rclone.org/azureblob/
# AZUREBLOB_ACCOUNT: ?
# AZUREBLOB_KEY: ?
## Custom Server ID Offset for replication
# serverIDOffset: 100
## Configs that will be added to my.cnf for cluster
mysqlConf:
# innodb-buffer-size: 128M
## Specify additional pod specification
# podSpec:
# imagePullSecrets: []
# labels: {}
# annotations: {}
# affinity:
# podAntiAffinity:
# preferredDuringSchedulingIgnoredDuringExecution:
# weight: 100
# podAffinityTerm:
# topologyKey: "kubernetes.io/hostname"
# labelSelector:
# matchlabels: <cluster-labels>
# backupAffinity: {}
# backupNodeSelector: {}
# backupPriorityClassName:
# backupTolerations: []
# # Override the default preStop hook with a custom command/script
# mysqlLifecycle:
# preStop:
# exec:
# command:
# - /scripts/demote-if-master
# nodeSelector: {}
# resources:
# requests:
# memory: 1G
# cpu: 200m
# tolerations: []
# priorityClassName:
# serviceAccountName: default
# # Use a initContainer to fix the permissons of a hostPath volume.
# initContainers:
# - name: volume-permissions
# image: busybox
# securityContext:
# runAsUser: 0
# command:
# - sh
# - -c
# - chmod 750 /data/mysql; chown 999:999 /data/mysql
# volumeMounts:
# - name: data
# mountPath: /data/mysql
## Specify additional volume specification
# volumeSpec:
# # https://godoc.org/k8s.io/api/core/v1#EmptyDirVolumeSource
# emptyDir: {}
# # https://godoc.org/k8s.io/api/core/v1#HostPathVolumeSource
# hostPath:
# path:
# type:
# # https://godoc.org/k8s.io/api/core/v1#PersistentVolumeClaimSpec
# persistentVolumeClaim:
# accessModes: [ "ReadWriteOnce" ]
# resources:
# requests:
# storage: 1Gi
## Specify service objectives
## If thoses SLO are not fulfilled by cluster node then that node is
## removed from scheme
# targetSLO:
# maxSlaveLatency: 10s
## You can use custom volume for /tmp partition if needed.
## Is disabled by default
# tmpfsSize: 1Gi
## Set cluster in read only
# readOnly: false
## Use `pigz` for parallel compression/decompression of backups
## Or specify any arbitrary compress/decompress commands with args
# backupCompressCommand:
# - pigz
# - --stdout
#
# backupDecompressCommand:
# - pigz
# - --decompress
## Add metrics exporter extra arguments
# metricsExporterExtraArgs:
# - --collect.info_schema.userstats
# - --collect.perf_schema.file_events
## Add extra arguments to rclone
# rcloneExtraArgs:
# - --buffer-size=1G
# - --multi-thread-streams=8
# - --retries-sleep=10s
# - --retries=10
# - --transfers=8
# - --s3-force-path-style=false # when use Alibaba OSS
## Add extra arguments to xbstream
# xbstreamExtraArgs:
# - --parallel=8
## Add extra arguments to xtrabackup
# xtrabackupExtraArgs:
# - --parallel=8
## Add extra arguments to xtrabackup during --prepare
# xtrabackupPrepareExtraArgs:
# - --use-memory=5G
## Set xtrabackup target directory (the directory needs to exist)
# xtrabackupTargetDir: /var/lib/mysql/.tmp/xtrabackup/
# Add additional SQL commands to run during init of mysql
# initFileExtraSQL:
# - "CREATE USER test@localhost"