[MARIADB][COMMON] Add support for mariadb-operator
[oom.git] / kubernetes / common / cassandra / templates / backup / cronjob.yaml
index cabe59f..06bb743 100644 (file)
@@ -14,6 +14,8 @@
 # limitations under the License.
 */}}
 {{- if .Values.backup.enabled }}
+{{- if .Values.global.cassandra.useOperator }}
+{{ else }}
 apiVersion: batch/v1beta1
 kind: CronJob
 metadata:
@@ -37,7 +39,7 @@ spec:
             - command:
               - /app/ready.py
               args:
-              - --container-name
+              - --app-name
               - {{ include "common.name" . }}
               env:
               - name: NAMESPACE
@@ -45,11 +47,11 @@ spec:
                   fieldRef:
                     apiVersion: v1
                     fieldPath: metadata.namespace
-              image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+              image: {{ include "repositoryGenerator.image.readiness" . }}
               imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
               name: {{ include "common.name" . }}-readiness
             - name: "cassandra-backup-init"
-              image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+              image: {{ include "repositoryGenerator.image.readiness" . }}
               imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
               command:
               - /bin/bash
@@ -149,7 +151,7 @@ spec:
                 subPath: exec.py
           containers:
             - name: cassandra-backup-validate
-              image: "{{ .Values.image }}"
+              image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
               imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
               command:
               - /bin/bash
@@ -243,3 +245,4 @@ spec:
             persistentVolumeClaim:
               claimName: {{ include "common.fullname" . }}-backup-data
 {{- end -}}
+{{- end -}}
\ No newline at end of file