Merge "[DMAAP] Update chart with service account"
[oom.git] / kubernetes / policy / templates / job.yaml
index 2c51728..72c94f3 100755 (executable)
@@ -30,10 +30,12 @@ spec:
         app: {{ include "common.name" . }}-job
         release: {{ include "common.release" . }}
     spec:
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
       initContainers:
 #This container checks that all galera instances are up before initializing it.
       - name: {{ include "common.name" . }}-readiness
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+        image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         command:
         - /app/ready.py
@@ -47,7 +49,7 @@ spec:
               fieldPath: metadata.namespace
       containers:
       - name: {{ include "common.release" . }}-policy-galera-config
-        image: {{ .Values.mariadb_image }}
+        image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.mariadb.image }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         volumeMounts:
         - mountPath: /dbcmd-config/db.sh
@@ -70,6 +72,7 @@ spec:
         resources:
 {{ include "common.resources" . }}
       restartPolicy: Never
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
         - name: {{ include "common.fullname" . }}-config
           configMap: