Merge "[DMAAP] DMaaP ServiceMesh compatibility"
[oom.git] / kubernetes / dcaemod / components / dcaemod-onboarding-api / templates / deployment.yaml
index df53116..5c7d1b6 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 #============LICENSE_START========================================================
 # ================================================================================
 # Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
@@ -14,6 +15,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 # ============LICENSE_END=========================================================
+*/}}
 
 apiVersion: apps/v1
 kind: Deployment
@@ -26,10 +28,10 @@ spec:
     spec:
       initContainers:
        - name: {{ include "common.name" . }}-readiness
-         image: {{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}
+         image: {{ include "repositoryGenerator.image.readiness" . }}
          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
          command:
-          - /root/ready.py
+          - /app/ready.py
          args:
            - --container-name
            - {{ .Values.postgres.nameOverride }}
@@ -48,7 +50,7 @@ spec:
           args:
             - -c
             - 'PG_CONN=postgresql://${PG_USER}:${PG_PASSWORD}@${PG_ADDR}:${PG_PORT}/${PG_DB_NAME} ./start.sh'
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           ports: {{ include "common.containerPorts" . | nindent 12  }}
           {{- if eq .Values.liveness.enabled true }}
@@ -76,5 +78,6 @@ spec:
               value: "5432"
             - name: PG_DB_NAME
               value: dcae_onboarding_db
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       imagePullSecrets:
         - name: "{{ include "common.namespace" . }}-docker-registry-key"