# limitations under the License.
*/}}
+{{- if and .Values.backup.enabled .Values.global.mariadbGalera.useOperator }}
+{{ include "common.mariadbOpBackup" . }}
+{{ else }}
{{- if and .Values.backup.enabled .Values.persistence.enabled }}
apiVersion: batch/v1beta1
kind: CronJob
env:
- name: DB_PASS
{{- include "common.secret.envFromSecretFast" (dict "global" . "uid" (include "common.mariadb.secret.rootPassUID" .) "key" "password") | indent 18 }}
- resources: {{ include "common.resources" . | nindent 12 }}
+ resources: {{ include "common.resources" . | nindent 16 }}
volumeMounts:
- name: backup-dir
mountPath: /backup
ls -tr | grep backup | head -$filestoDelete | xargs rm -rf
fi
fi
- resources: {{ include "common.resources" . | nindent 12 }}
+ resources: {{ include "common.resources" . | nindent 16 }}
volumeMounts:
- mountPath: /bitnami/mariadb/data
name: tmp-data
readOnly: true
- name: backup-dir
mountPath: /backup
- imagePullSecrets:
- - name: {{ include "common.namespace" . }}-docker-registry-key
+ {{- include "common.imagePullSecrets" . | nindent 10 }}
volumes:
- name: localtime
hostPath:
- name: tmp
emptyDir: {}
{{- end }}
+{{- end }}