Update image versions
[oom.git] / kubernetes / dcaegen2 / charts / dcae-cloudify-manager / templates / deployment.yaml
index acda520..d6c58cd 100644 (file)
@@ -1,7 +1,7 @@
 #============LICENSE_START========================================================
 # ================================================================================
 # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
-# Copyright © 2018 Amdocs, Bell Canada
+# Modifications Copyright © 2018 Amdocs, Bell Canada
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -34,10 +34,22 @@ spec:
         app: {{ include "common.name" . }}
         release: {{ .Release.Name }}
     spec:
+      initContainers:
+      - name: {{ include "common.name" . }}-multisite-init
+        image: {{ include "common.repository" . }}/{{ .Values.multisiteInitImage }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        args:
+          - --namespace
+          - {{ include "common.namespace" . }}
+          - --configmap
+          - {{ .Values.multisiteConfigMapName }}
+        restartPolicy: Never
       containers:
         - name: {{ include "common.name" . }}
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          resources:
+{{ include "common.resources" . | indent 12 }}
           ports:
           - containerPort: {{ .Values.service.internalPort }}
           # disable liveness probe when breakpoints set in debugger
@@ -48,10 +60,11 @@ spec:
               port: {{ .Values.service.internalPort }}
             initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
             periodSeconds: {{ .Values.liveness.periodSeconds }}
-          {{ end -}}
+          {{ end }}
           readinessProbe:
-            tcpSocket:
-              port: {{ .Values.service.internalPort }}
+            exec:
+              command:
+              - /scripts/readiness-check.sh
             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
             periodSeconds: {{ .Values.readiness.periodSeconds }}
           volumeMounts:
@@ -59,6 +72,9 @@ spec:
             subPath: config.txt
             name: {{ include "common.fullname" .}}-config
             readOnly: true
+          - mountPath: /opt/onap/kube
+            name: {{ include "common.fullname" .}}-kubeconfig
+            readOnly: true
           - mountPath: /secret
             name: dcae-token
             readOnly: true
@@ -68,22 +84,17 @@ spec:
           - mountPath: /etc/localtime
             name: localtime
             readOnly: true
+          - mountPath: /cfy-persist
+            name: cm-persistent
           securityContext:
             privileged: True
-          lifecycle:
-            postStart:
-              exec:
-                command:
-                - bash
-                - "-c"
-                - |
-                  set -ex
-                  mkdir -p /var/run/secrets/kubernetes.io/
-                  ln -s /secret /var/run/secrets/kubernetes.io/serviceaccount
       volumes:
         - name: {{ include "common.fullname" . }}-config
           configMap:
             name: {{ include "common.fullname" . }}-configmap
+        - name: {{ include "common.fullname" .}}-kubeconfig
+          configMap:
+            name: {{ .Values.multisiteConfigMapName }}
         - name: dcae-token
           secret:
             secretName: dcae-token
@@ -93,5 +104,8 @@ spec:
         - name: localtime
           hostPath:
             path: /etc/localtime
+        - name: cm-persistent
+          persistentVolumeClaim:
+            claimName: {{ include "common.fullname" . }}-data
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"