[DMaaP] Wait for AAF locate before AAF config 27/99927/1
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Fri, 27 Dec 2019 10:06:14 +0000 (11:06 +0100)
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>
Fri, 27 Dec 2019 10:06:14 +0000 (11:06 +0100)
AAF config needs to have aaf locate service up and running in order to
work properly (if not, it won't really crash but won't have done the
real work).
As per
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/#understanding-init-containers,
"Each init container must complete must complete successfully before the
next one starts".
Adding a wait for readiness container before aaf config init containers
should then do the job.

Change-Id: Ida047728e4f14320ada8052c707b458450f4923b
Issue-ID: DMAAP-1362
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
kubernetes/dmaap/components/dmaap-dr-prov/templates/deployment.yaml

index 52ac9eb..96839b5 100644 (file)
@@ -46,6 +46,20 @@ spec:
                 apiVersion: v1
                 fieldPath: metadata.namespace
         {{- if .Values.global.aafEnabled }}
+        - name: {{ include "common.name" . }}-aaf-readiness
+          image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          command:
+          - /root/ready.py
+          args:
+          - --container-name
+          - aaf-locate
+          env:
+          - name: NAMESPACE
+            valueFrom:
+              fieldRef:
+                apiVersion: v1
+                fieldPath: metadata.namespace
         - name: {{ include "common.name" . }}-dr-prov-aaf-config
           image: "{{ include "common.repository" . }}/{{ .Values.global.aafAgentImage }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}