Merge "[DMAAP] DMaaP ServiceMesh compatibility"
[oom.git] / kubernetes / dcaegen2 / components / dcae-healthcheck / templates / deployment.yaml
index 4d3e3c3..641dfdf 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 #============LICENSE_START========================================================
 # ================================================================================
 # Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved.
@@ -15,8 +16,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 # ============LICENSE_END=========================================================
+*/}}
 
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ include "common.fullname" . }}
@@ -28,6 +30,9 @@ metadata:
     heritage: {{ .Release.Service }}
 spec:
   replicas: 1
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
   template:
     metadata:
       labels:
@@ -36,7 +41,7 @@ spec:
     spec:
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           resources:
 {{ include "common.resources" . | indent 12 }}
@@ -69,6 +74,7 @@ spec:
               value: {{ include "common.release" . }}
             - name: DEPLOY_LABEL
               value: cfydeployment
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
         - name: {{ include "common.fullname" . }}-expected-components
           configMap: