Merge "[DCAEMOD] Uses new tpls for repos / images"
[oom.git] / kubernetes / helm / starters / onap-app / templates / deployment.yaml
index 8b2bb4e..fc76c1f 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,24 +43,24 @@ 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: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           ports:
           - containerPort: {{ .Values.service.internalPort }}
           # disable liveness probe when breakpoints set in debugger
           # so K8s doesn't restart unresponsive container
-          {{- if eq .Values.liveness.enabled true }}
+          {{ if .Values.liveness.enabled }}
           livenessProbe:
             tcpSocket:
               port: {{ .Values.service.internalPort }}
             initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
             periodSeconds: {{ .Values.liveness.periodSeconds }}
-          {{ end -}}
+          {{ end }}
           readinessProbe:
             tcpSocket:
               port: {{ .Values.service.internalPort }}
@@ -79,7 +79,7 @@ spec:
 #            name: {{ include "common.name" . }}-config
 #            subPath: application.properties
           resources:
-{{ toYaml .Values.resources | indent 12 }}
+{{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}
         nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 10 }}