MariaDB: Fix backup job init container
This PS fixes the backup job to have an appropriate init container and service account. Change-Id: I93d7ba93c9846508262951efba0d6034f6341ae8 Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
parent
1a81952929
commit
abc4af9920
@ -18,7 +18,7 @@ limitations under the License.
|
|||||||
{{- $envAll := . }}
|
{{- $envAll := . }}
|
||||||
|
|
||||||
{{- $serviceAccountName := "mariadb-backup" }}
|
{{- $serviceAccountName := "mariadb-backup" }}
|
||||||
{{ tuple $envAll "mariadb_account" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
{{ tuple $envAll "mariadb_backup" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||||
---
|
---
|
||||||
apiVersion: batch/v1beta1
|
apiVersion: batch/v1beta1
|
||||||
kind: CronJob
|
kind: CronJob
|
||||||
@ -45,6 +45,8 @@ spec:
|
|||||||
restartPolicy: OnFailure
|
restartPolicy: OnFailure
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
{{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }}
|
||||||
|
initContainers:
|
||||||
|
{{ tuple $envAll "mariadb_backup" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 10 }}
|
||||||
containers:
|
containers:
|
||||||
- command:
|
- command:
|
||||||
- /tmp/backup_mariadb.sh
|
- /tmp/backup_mariadb.sh
|
||||||
@ -85,7 +87,7 @@ spec:
|
|||||||
defaultMode: 365
|
defaultMode: 365
|
||||||
name: mariadb-bin
|
name: mariadb-bin
|
||||||
name: mariadb-bin
|
name: mariadb-bin
|
||||||
{{- if and .Values.volume.backup.enabled .Values.manifests.pvc_backup }}
|
{{- if and .Values.volume.backup.enabled .Values.manifests.pvc_backup }}
|
||||||
- name: mariadb-backup-dir
|
- name: mariadb-backup-dir
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: mariadb-backup-data
|
claimName: mariadb-backup-data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user