Merge "[DCAE] SliceMs Kohn updates"
[oom.git] / kubernetes / a1policymanagement / templates / statefulset.yaml
index 54ee151..89d131e 100644 (file)
@@ -28,6 +28,8 @@ spec:
     metadata:
       labels: {{- include "common.labels" . | nindent 8 }}
     spec:
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
       initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
       - name: {{ include "common.name" . }}-bootstrap-config
         image: {{ include "repositoryGenerator.image.envsubst" . }}
@@ -37,8 +39,10 @@ spec:
         args:
         - -c
         - |
+          {{- if (include "common.needTLS" .) }}
           export $(cat {{ .Values.certInitializer.credsPath }}/mycreds.prop\
             | xargs -0)
+          {{- end }}
           cd /config-input
           for PFILE in `ls -1`
           do
@@ -58,7 +62,7 @@ spec:
           name: config
       containers:
       - name: {{ include "common.name" . }}-update-config
-        image: "{{ .Values.global.envsubstImage }}"
+        image: {{ include "repositoryGenerator.image.envsubst" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         securityContext:
           runAsGroup: {{ .Values.groupID }}
@@ -106,6 +110,7 @@ spec:
         - name: {{ include "common.fullname" . }}
           mountPath: "/var/policy-management-service/database"
         resources: {{ include "common.resources" . | nindent 10 }}
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
         - name: {{ include "common.fullname" . }}-policy-conf-input
           configMap: