[OOM] File mount missing in portal-ng-ui chart
[oom.git] / kubernetes / so / components / so-mariadb / templates / job.yaml
index a2edf33..20cba67 100644 (file)
@@ -59,22 +59,15 @@ spec:
           echo "waiting 15s for istio side cars to be up"; sleep 15s;{{- end }}
           mysqldump -vv --user=${DB_USER} --password=${DB_PASS} --host=${DB_HOST} --port=${DB_PORT} --databases --single-transaction --quick --lock-tables=false catalogdb requestdb nfvo cnfm > /var/data/mariadb/backup-`date +%s`.sql
         volumeMounts:
-        - mountPath: /etc/localtime
-          name: localtime
-          readOnly: true
         - name: backup-storage
           mountPath: /var/data/mariadb
       {{ include "common.waitForJobContainer" . | indent 6 | trim }}
       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
-      - name: localtime
-        hostPath:
-          path: /etc/localtime
       - name: backup-storage
         persistentVolumeClaim:
           claimName: {{ include "common.fullname" . }}-migration
-      imagePullSecrets:
-        - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
       restartPolicy: Never
 ---
 {{- end }}
@@ -101,20 +94,7 @@ spec:
         release: {{ include "common.release" . }}
       name: {{ include "common.name" . }}
     spec:
-      initContainers:
-      {{- if .Values.global.mariadbGalera.localCluster }}
-      {{-   if .Values.global.mariadbGalera.useOperator }}
-      {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_local_operator ) | indent 6 | trim }}
-      {{    else }}
-      {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_local ) | indent 6 | trim }}
-      {{-   end }}
-      {{ else }}
-      {{-   if .Values.global.mariadbGalera.useOperator }}
-      {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_global_operator ) | indent 6 | trim }}
-      {{   else }}
-      {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_global ) | indent 6 | trim }}
-      {{-   end }}
-      {{- end }}
+      initContainers: {{ include "common.readinessCheck.waitFor" . | nindent 6 }}
       containers:
       - name: {{ include "common.name" . }}-config
         image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
@@ -168,9 +148,6 @@ spec:
         - name: CNFM_DB_PASSWORD
           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cnfm-db-creds" "key" "password") | indent 10 }}
         volumeMounts:
-        - mountPath: /etc/localtime
-          name: localtime
-          readOnly: true
         - name: docker-entrypoint-initdb-d-sh
           mountPath: "/docker-entrypoint-initdb.d"
         - name: docker-entrypoint-initdb-d-sql
@@ -191,9 +168,6 @@ spec:
       {{- end }}
       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
-      - name: localtime
-        hostPath:
-          path: /etc/localtime
       - name: docker-entrypoint-initdb-d-sh
         configMap:
           name: {{ include "common.fullname" . }}-mariadb-sh
@@ -206,5 +180,4 @@ spec:
           claimName: {{ include "common.fullname" . }}-migration
       {{- end }}
       restartPolicy: Never
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}