Merge "[CPS] New Delhi release changes"
[oom.git] / kubernetes / multicloud / components / multicloud-k8s / templates / deployment.yaml
index ed6b64c..9881a13 100644 (file)
 
 apiVersion: apps/v1
 kind: Deployment
-metadata:
-  name: {{ include "common.fullname" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ include "common.release" . }}
-    heritage: {{ .Release.Service }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
 spec:
-  selector:
-    matchLabels:
-      app: {{ include "common.name" . }}
+  selector: {{- include "common.selectors" . | nindent 4 }}
   replicas: {{ .Values.replicaCount }}
   template:
-    metadata:
-      labels:
-        app: {{ include "common.name" . }}
-        release: {{ include "common.release" . }}
+    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
     spec:
       containers:
       - image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
@@ -41,8 +29,7 @@ spec:
         name: {{ include "common.name" . }}
         command: ["/opt/multicloud/k8splugin/k8plugin"]
         workingDir: /opt/multicloud/k8splugin
-        ports:
-        - containerPort: {{ .Values.service.internalPort }}
+        ports: {{ include "common.containerPorts" . | nindent 10  }}
         {{- if eq .Values.liveness.enabled true }}
         livenessProbe:
           tcpSocket:
@@ -56,9 +43,6 @@ spec:
           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
           periodSeconds: {{ .Values.readiness.periodSeconds }}
         volumeMounts:
-          - mountPath: /etc/localtime
-            name: localtime
-            readOnly: true
           - mountPath: /opt/multicloud/k8splugin/k8sconfig.json
             name: {{ include "common.name" .}}
             subPath: k8sconfig.json
@@ -93,13 +77,9 @@ spec:
               key: sasl.jaas.config
       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
-      - name: localtime
-        hostPath:
-          path: /etc/localtime
       - name : {{ include "common.name" . }}
         configMap:
           name: {{ include "common.fullname" . }}
       - name: artifact-data
         emptyDir: {}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}