aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/common/mariadb-galera/templates
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/common/mariadb-galera/templates')
-rw-r--r--kubernetes/common/mariadb-galera/templates/backup/cronjob.yaml13
-rw-r--r--kubernetes/common/mariadb-galera/templates/job.yaml10
-rw-r--r--kubernetes/common/mariadb-galera/templates/statefulset.yaml4
3 files changed, 16 insertions, 11 deletions
diff --git a/kubernetes/common/mariadb-galera/templates/backup/cronjob.yaml b/kubernetes/common/mariadb-galera/templates/backup/cronjob.yaml
index 29d96748a3..1c780179be 100644
--- a/kubernetes/common/mariadb-galera/templates/backup/cronjob.yaml
+++ b/kubernetes/common/mariadb-galera/templates/backup/cronjob.yaml
@@ -35,7 +35,7 @@ spec:
restartPolicy: Never
initContainers:
- command:
- - /root/ready.py
+ - /app/ready.py
args:
- --container-name
- {{ include "common.name" . }}
@@ -45,11 +45,11 @@ spec:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+ image: {{ include "repositoryGenerator.image.readiness" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
name: {{ include "common.name" . }}-readiness
- name: mariadb-galera-backup-init
- image: "{{ include "common.repository" . }}/{{ .Values.backupImage }}"
+ image: {{ include "repositoryGenerator.image.mariadb" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
command:
- /bin/bash
@@ -90,9 +90,11 @@ spec:
volumeMounts:
- name: backup-dir
mountPath: /backup
+ - name: db-data
+ mountPath: /var/lib/mysql
containers:
- name: mariadb-backup-validate
- image: "{{ include "common.repository" . }}/{{ .Values.backupImage }}"
+ image: {{ include "repositoryGenerator.image.mariadb" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
env:
- name: MYSQL_ROOT_PASSWORD
@@ -164,4 +166,7 @@ spec:
- name: backup-dir
persistentVolumeClaim:
claimName: {{ include "common.fullname" . }}-backup-data
+ - name: db-data
+ persistentVolumeClaim:
+ claimName: {{ include "common.fullname" . }}-data-{{ include "common.fullname" . }}-{{ sub .Values.replicaCount 1 }}
{{- end }}
diff --git a/kubernetes/common/mariadb-galera/templates/job.yaml b/kubernetes/common/mariadb-galera/templates/job.yaml
index db56f3e046..250279ace2 100644
--- a/kubernetes/common/mariadb-galera/templates/job.yaml
+++ b/kubernetes/common/mariadb-galera/templates/job.yaml
@@ -14,7 +14,7 @@ spec:
runAsUser: 1001
containers:
- name: mariadb-job-pre-upgrade
- image: {{ .Values.global.kubectlImage}}
+ image: {{ include "repositoryGenerator.image.kubectl" . }}
imagePullPolicy: IfNotPresent
env:
- name: NAMESPACE_ENV
@@ -49,7 +49,7 @@ spec:
fsGroup: 1001
runAsUser: 0
initContainers:
- - image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+ - image: {{ include "repositoryGenerator.image.readiness" . }}
name: mariadb-galera-upgrade-readiness
env:
- name: NAMESPACE
@@ -58,13 +58,13 @@ spec:
apiVersion: v1
fieldPath: metadata.namespace
command:
- - /root/ready.py
+ - /app/ready.py
args:
- --container-name
- mariadb-galera
containers:
- name: mariadb-job-post-upgrade
- image: {{ .Values.global.kubectlImage}}
+ image: {{ include "repositoryGenerator.image.kubectl" . }}
imagePullPolicy: IfNotPresent
env:
- name: NAMESPACE_ENV
@@ -99,7 +99,7 @@ spec:
spec:
containers:
- name: mariadb-job-post-delete
- image: {{ .Values.global.kubectlImage}}
+ image: {{ include "repositoryGenerator.image.kubectl" . }}
imagePullPolicy: IfNotPresent
command: ["/bin/bash", "-c", "--"]
args:
diff --git a/kubernetes/common/mariadb-galera/templates/statefulset.yaml b/kubernetes/common/mariadb-galera/templates/statefulset.yaml
index 47d1e0ef3d..eb21fe3182 100644
--- a/kubernetes/common/mariadb-galera/templates/statefulset.yaml
+++ b/kubernetes/common/mariadb-galera/templates/statefulset.yaml
@@ -61,7 +61,7 @@ spec:
- name: {{ include "common.namespace" . }}-docker-registry-key
containers:
- name: {{ include "common.name" . }}
- image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+ image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy | quote}}
env:
- name: POD_NAMESPACE
@@ -119,7 +119,7 @@ spec:
name: {{ include "common.fullname" . }}-data
initContainers:
- name: {{ include "common.name" . }}-prepare
- image: "{{ include "common.repository" . }}/{{ .Values.imageInit }}"
+ image: {{ include "repositoryGenerator.image.busybox" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy | quote}}
command: ["sh", "-c", "chown -R 27:27 /var/lib/mysql"]
volumeMounts: