Add readiness step for deployment 37/59537/2
authorKiran Kamineni <kiran.k.kamineni@intel.com>
Fri, 3 Aug 2018 00:19:27 +0000 (17:19 -0700)
committerAlexis de Talhouët <alexis.de_talhouet@bell.ca>
Tue, 14 Aug 2018 14:57:55 +0000 (14:57 +0000)
Using an initContainer and to start SMS only after
vault and consul have already started. This prevents
restarts of the sms container.

Issue-ID: AAF-421
Change-Id: Ied3264711d5d931a1d18523eadcc84e188ededa5
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
kubernetes/aaf/charts/aaf-sms/charts/aaf-sms-quorumclient/values.yaml
kubernetes/aaf/charts/aaf-sms/templates/deployment.yaml
kubernetes/aaf/charts/aaf-sms/values.yaml

index c5fd489..768f89f 100644 (file)
@@ -28,7 +28,7 @@ global:
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/aaf/smsquorumclient:2.0.0
+image: onap/aaf/smsquorumclient:latest
 pullPolicy: Always
 
 # flag to enable debugging - application support required
index 4bdb84f..58fe72f 100644 (file)
@@ -30,10 +30,27 @@ spec:
         app: {{ include "common.name" . }}
         release: {{ .Release.Name }}
     spec:
+      initContainers:
+      - image:  "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-readiness
+        command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - "aaf-sms-vault"
+        - --container-name
+        - "aaf-sms-vault-backend"
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
       containers:
       - image: "{{ include "common.repository" . }}/{{ .Values.image }}"
-        name: {{ include "common.name" . }}
         imagePullPolicy: {{ .Values.pullPolicy }}
+        name: {{ include "common.name" . }}
         command: ["/sms/bin/sms"]
         workingDir: /sms/
         ports:
index b75038c..df2b6ab 100644 (file)
@@ -28,7 +28,7 @@ global:
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/aaf/sms:2.0.0
+image: onap/aaf/sms:latest
 pullPolicy: Always
 
 # flag to enable debugging - application support required