[COMMON] Make imagePullSecrets configurable
[oom.git] / kubernetes / helm / starters / onap-app / templates / deployment.yaml
index 1518c5f..2e47ba6 100644 (file)
@@ -20,7 +20,7 @@ metadata:
   labels:
     app: {{ include "common.name" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
+    release: {{ include "common.release" . }}
     heritage: {{ .Release.Service }}
 spec:
   replicas: {{ .Values.replicaCount }}
@@ -28,12 +28,12 @@ spec:
     metadata:
       labels:
         app: {{ include "common.name" . }}
-        release: {{ .Release.Name }}
+        release: {{ include "common.release" . }}
     spec:
       initContainers:
 #Example init container for dependency checking
 #      - command:
-#        - /root/ready.py
+#        - /app/ready.py
 #        args:
 #        - --container-name
 #        - mariadb
@@ -43,12 +43,12 @@ spec:
 #            fieldRef:
 #              apiVersion: v1
 #              fieldPath: metadata.namespace
-#        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+#        image: {{ include "repositoryGenerator.image.readiness" . }}
 #        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
 #        name: {{ include "common.name" . }}-readiness
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           ports:
           - containerPort: {{ .Values.service.internalPort }}
@@ -78,8 +78,7 @@ spec:
 #          - mountPath: /opt/app/application.properties
 #            name: {{ include "common.name" . }}-config
 #            subPath: application.properties
-          resources:
-{{ include "common.resources" . | indent 12 }}
+          resources: {{ include "common.resources" . | nindent 12 }}
         {{- if .Values.nodeSelector }}
         nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 10 }}
@@ -100,5 +99,4 @@ spec:
 #            items:
 #            - key: application.properties
 #              path: application.properties
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}