[CASSANDRA] Change values to makre Cassandra instances more stable
[oom.git] / kubernetes / dcaegen2 / components / dcae-servicechange-handler / templates / deployment.yaml
index 3d7b242..6c4e695 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 #============LICENSE_START========================================================
 # ================================================================================
 # Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
@@ -14,8 +15,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" . }}
@@ -27,6 +29,9 @@ metadata:
     heritage: {{ .Release.Service }}
 spec:
   replicas: 1
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
   template:
     metadata:
       labels:
@@ -35,17 +40,17 @@ 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
             - "dcae-inventory-api"
             - --container-name
             - "message-router"
             - --container-name
-            - "sdc-dcae-be"
+            - "sdc-be"
             - "-t"
             - "45"
           env:
@@ -61,7 +66,7 @@ spec:
               fieldRef:
                 apiVersion: v1
                 fieldPath: status.podIP
-          image: {{ .Values.global.tlsRepository }}/{{ .Values.global.tlsImage }}
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.tlsImage }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           resources: {}
           volumeMounts:
@@ -69,7 +74,7 @@ spec:
               name: tls-info
       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 }}
@@ -101,6 +106,7 @@ spec:
               value: "/opt/cert/cacert.pem"
             - name: SCH_ARGS
               value: "prod /opt/config.json"
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
         - name: {{ include "common.fullname" . }}-sch-config
           configMap: