[COMMON] Fix resources indent
[oom.git] / kubernetes / common / music / templates / deployment.yaml
index cf0ce8f..6ded511 100644 (file)
@@ -23,6 +23,8 @@ spec:
   template:
     metadata: {{- include "common.templateMetadata" . | nindent 6 }}
     spec:
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
       initContainers:
         - name: {{ include "common.name" . }}-cassandra-readiness
           image: {{ include "repositoryGenerator.image.readiness" . }}
@@ -38,19 +40,18 @@ spec:
               fieldRef:
                 apiVersion: v1
                 fieldPath: metadata.namespace
+        {{ include "common.certInitializer.initContainer" . | indent 8 | trim }}
         - command:
           - sh
           args:
           - -c
-          - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
+          - "export KEYSTORE_PASSWORD=$(cat /opt/app/aafcertman/local/.pass); cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
           env:
-          - name: KEYSTORE_PASSWORD
-            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "music-keystore-pw" "key" "password") | indent 12}}
           - name: CASSA_USER
             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cassa-secret" "key" "login") | indent 12 }}
           - name: CASSA_PASSWORD
             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cassa-secret" "key" "password") | indent 12 }}
-          volumeMounts:
+          volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
           - mountPath: /config-input
             name: properties-music-scrubbed
           - mountPath: /config
@@ -78,8 +79,7 @@ spec:
               port: {{ .Values.readiness.port }}
             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
             periodSeconds: {{ .Values.readiness.periodSeconds }}
-          resources:
-{{ include "common.resources" . | indent 12 }}
+          resources: {{ include "common.resources" . | nindent 12 }}
           env:
           - name: SPRING_OPTS
             value: "{{ .Values.springOpts }}"
@@ -87,7 +87,7 @@ spec:
             value: "{{ .Values.javaOpts }}"
           - name: DEBUG
             value: "{{ .Values.debug }}"
-          volumeMounts:
+          volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
           - name: localtime
             mountPath: /etc/localtime
             readOnly: true
@@ -100,9 +100,7 @@ spec:
           - name: properties-music-scrubbed
             mountPath: /opt/app/music/etc/logback.xml
             subPath: logback.xml
-          - name: certs-aaf
-            mountPath: /opt/app/aafcertman/
-      volumes:
+      volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
         - name: shared-data
           emptyDir: {}
         - name: certificate-vol
@@ -116,6 +114,3 @@ spec:
         - name: properties-music
           emptyDir:
             medium: Memory
-        - name: certs-aaf
-          secret:
-            secretName: {{ include "common.secret.getSecretNameFast" (dict "global" . "uid" "music-certs") }}