[CASSANDRA] Change values to makre Cassandra instances more stable
[oom.git] / kubernetes / dcaegen2 / components / dcae-policy-handler / templates / deployment.yaml
index 61084fa..b8c2435 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 #============LICENSE_START========================================================
 # ================================================================================
 # Copyright (c) 2019-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
@@ -38,7 +40,7 @@ spec:
     spec:
       initContainers:
         - name: {{ include "common.name" . }}-readiness
-          image: {{ include "common.repository" . }}/{{ .Values.global.readinessImage }}
+          image: {{ include "repositoryGenerator.image.readiness" . }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           command:
             - /app/ready.py
@@ -66,14 +68,14 @@ spec:
                 fieldPath: status.podIP
           - name: aaf_locator_fqdn
             value: dcae
-          image: {{ .Values.global.tlsRepository }}/{{ .Values.global.tlsImage }}
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.tlsImage }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           resources: {}
           volumeMounts:
             - mountPath: /opt/app/osaaf
               name: tls-info
         - name: init-consul
-          image: {{ .Values.global.consulLoaderRepository }}/{{ .Values.global.consulLoaderImage }}
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.consulLoaderImage }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           args:
           - --key
@@ -84,7 +86,7 @@ spec:
               name: ph-config
       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 }}
@@ -107,9 +109,9 @@ spec:
             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
             periodSeconds: {{ .Values.readiness.periodSeconds }}
           volumeMounts:
-            - mountPath: /opt/app/policy_handler/logs
+            - mountPath: /app/logs
               name: component-log
-            - mountPath: /opt/app/policy_handler/etc/tls/certs/
+            - mountPath: /app/etc/tls/certs/
               name: tls-info
           env:
             - name: CONSUL_HOST
@@ -132,7 +134,7 @@ spec:
                 fieldRef:
                   apiVersion: v1
                   fieldPath: status.podIP
-          image: {{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}
+          image: {{ include "repositoryGenerator.image.logging" . }}
           imagePullPolicy: IfNotPresent
           resources: {}
           volumeMounts:
@@ -143,6 +145,7 @@ spec:
           - mountPath: /usr/share/filebeat/filebeat.yml
             name: filebeat-conf
             subPath: filebeat.yml
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
         - emptyDir: {}
           name: component-log