Skip to content

Commit

Permalink
chore: support mysql orc semi sync
Browse files Browse the repository at this point in the history
  • Loading branch information
kubeJocker committed Jan 22, 2025
1 parent 881cba6 commit a1de283
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 13 deletions.
13 changes: 0 additions & 13 deletions addons/mysql/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -302,19 +302,6 @@ exporter:


{{- define "mysql-orc.spec.lifecycle.common" }}
accountProvision:
exec:
container: mysql
image: {{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:8.0.33
command:
- /bin/sh
- -c
- |
set -ex
eval statement=\"${KB_ACCOUNT_STATEMENT}\"
mysql -u${MYSQL_ROOT_USER} -p${MYSQL_ROOT_PASSWORD} -P3306 -h127.0.0.1 -e "${statement}"
targetPodSelector: Role
matchingKey: primary
roleProbe:
periodSeconds: {{ .Values.roleProbe.periodSeconds }}
timeoutSeconds: {{ .Values.roleProbe.timeoutSeconds }}
Expand Down
13 changes: 13 additions & 0 deletions addons/mysql/templates/cmpd-mysql57-orc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ spec:
serviceVersion: 5.7.44
lifecycleActions:
{{- include "mysql-orc.spec.lifecycle.common" . | nindent 4 }}
accountProvision:
exec:
container: mysql
image: {{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:5.7.44
command:
- /bin/sh
- -c
- |
set -ex
eval statement=\"${KB_ACCOUNT_STATEMENT}\"
mysql -u${MYSQL_ROOT_USER} -p${MYSQL_ROOT_PASSWORD} -P3306 -h127.0.0.1 -e "${statement}"
targetPodSelector: Role
matchingKey: primary
postProvision:
exec:
image: {{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:5.7.44
Expand Down
13 changes: 13 additions & 0 deletions addons/mysql/templates/cmpd-mysql80-orc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ spec:
serviceVersion: 8.0.33
lifecycleActions:
{{- include "mysql-orc.spec.lifecycle.common" . | nindent 4 }}
accountProvision:
exec:
container: mysql
image: {{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:8.0.33
command:
- /bin/sh
- -c
- |
set -ex
eval statement=\"${KB_ACCOUNT_STATEMENT}\"
mysql -u${MYSQL_ROOT_USER} -p${MYSQL_ROOT_PASSWORD} -P3306 -h127.0.0.1 -e "${statement}"
targetPodSelector: Role
matchingKey: primary
postProvision:
exec:
image: {{ .Values.image.registry | default "docker.io" }}/{{ .Values.image.repository }}:8.0.33
Expand Down

0 comments on commit a1de283

Please sign in to comment.