Merge "[GENERAL] Print helm binary used"
[oom.git] / kubernetes / cli / templates / deployment.yaml
index 58fc666..7353087 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 # Copyright © 2017 Amdocs, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,8 +12,9 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+*/}}
 
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ include "common.fullname" . }}
@@ -24,15 +26,19 @@ metadata:
     heritage: {{ .Release.Service }}
 spec:
   replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
   template:
     metadata:
       labels:
         app: {{ include "common.name" . }}
         release: {{ include "common.release" . }}
     spec:
+      initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
       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 }}
@@ -51,10 +57,10 @@ spec:
               port: {{ .Values.service.internalPort }}
             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
             periodSeconds: {{ .Values.readiness.periodSeconds }}
-          volumeMounts:
-          - name: ocomp-pem
-            mountPath: "/etc/lighttpd/ocomp.pem"
-            subPath: ocomp.pem
+          volumeMounts: {{- include "common.certInitializer.volumeMount" . | nindent 10 }}
+          - name: lighttpd
+            mountPath: "/etc/lighttpd/lighttpd.conf"
+            subPath: lighttpd.conf
             readOnly: true
           env:
             - name: OPEN_CLI_MODE
@@ -69,9 +75,9 @@ spec:
         affinity:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
-      volumes:
-      - name: ocomp-pem
-        secret:
-          secretName: ocomp-pem
+      volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
+      - name: lighttpd
+        configMap:
+          name: {{ include "common.fullname" . }}-lighttpd
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"