[DCAE][DCAEMOD] Deploy R7 container images
[oom.git] / kubernetes / dcaegen2 / components / dcae-cloudify-manager / templates / deployment.yaml
index 2fd9a6d..a21eabc 100644 (file)
@@ -24,7 +24,7 @@ metadata:
   labels:
     app: {{ include "common.name" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
+    release: {{ include "common.release" . }}
     heritage: {{ .Release.Service }}
 spec:
   replicas: 1
@@ -32,7 +32,7 @@ spec:
     metadata:
       labels:
         app: {{ include "common.name" . }}
-        release: {{ .Release.Name }}
+        release: {{ include "common.release" . }}
     spec:
       # host alias allows local 'cfy' command to use https and match
       # the host name in the certificate
@@ -41,6 +41,22 @@ spec:
         hostnames:
         - "dcae-cloudify-manager"
       initContainers:
+      - name: {{ include "common.name" . }}-readiness
+        image: {{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        command:
+          - /root/ready.py
+        args:
+          - --container-name
+          - aaf-cm
+          - "-t"
+          - "15"
+        env:
+          - name: NAMESPACE
+            valueFrom:
+              fieldRef:
+                apiVersion: v1
+                fieldPath: metadata.namespace
       - name: {{ include "common.name" . }}-multisite-init
         image: {{ include "common.repository" . }}/{{ .Values.multisiteInitImage }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
@@ -57,12 +73,27 @@ spec:
               fieldRef:
                 apiVersion: v1
                 fieldPath: status.podIP
+          - name: aaf_locator_fqdn
+            value: dcae
         image: {{ .Values.global.tlsRepository }}/{{ .Values.global.tlsImage }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         resources: {}
         volumeMounts:
-            - mountPath: /opt/tls/shared
+            - mountPath: /opt/app/osaaf
               name: tls-info
+      {{- if .Values.persistence.enabled }}
+      - name: remove-lost-found
+        image: "{{ .Values.global.busyboxRepository }}/{{ .Values.global.busyboxImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        volumeMounts:
+        - mountPath: /cfy-persist
+          name: cm-persistent
+        command:
+        - /bin/sh
+        args:
+        - -c
+        - "rm -rf '/cfy-persist/lost+found';"
+      {{- end }}
       containers:
         - name: {{ include "common.name" . }}
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"