summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKiran Kamineni <kiran.k.kamineni@intel.com>2018-08-02 17:19:27 -0700
committerAlexis de Talhouƫt <alexis.de_talhouet@bell.ca>2018-08-14 14:57:55 +0000
commit55869066a1457ff6ea1758d1514d98f822f3312b (patch)
treeb59eee1b13e867a310d32f9ab8b55aba4c19324b
parent76ca0ffeb55c6a8bb155b81c6a69c54fef46a067 (diff)
Add readiness step for deployment
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>
-rw-r--r--kubernetes/aaf/charts/aaf-sms/charts/aaf-sms-quorumclient/values.yaml2
-rw-r--r--kubernetes/aaf/charts/aaf-sms/templates/deployment.yaml19
-rw-r--r--kubernetes/aaf/charts/aaf-sms/values.yaml2
3 files changed, 20 insertions, 3 deletions
diff --git a/kubernetes/aaf/charts/aaf-sms/charts/aaf-sms-quorumclient/values.yaml b/kubernetes/aaf/charts/aaf-sms/charts/aaf-sms-quorumclient/values.yaml
index c5fd489f31..768f89fb7e 100644
--- a/kubernetes/aaf/charts/aaf-sms/charts/aaf-sms-quorumclient/values.yaml
+++ b/kubernetes/aaf/charts/aaf-sms/charts/aaf-sms-quorumclient/values.yaml
@@ -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
diff --git a/kubernetes/aaf/charts/aaf-sms/templates/deployment.yaml b/kubernetes/aaf/charts/aaf-sms/templates/deployment.yaml
index 4bdb84fa30..58fe72f497 100644
--- a/kubernetes/aaf/charts/aaf-sms/templates/deployment.yaml
+++ b/kubernetes/aaf/charts/aaf-sms/templates/deployment.yaml
@@ -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:
diff --git a/kubernetes/aaf/charts/aaf-sms/values.yaml b/kubernetes/aaf/charts/aaf-sms/values.yaml
index b75038c973..df2b6ab640 100644
--- a/kubernetes/aaf/charts/aaf-sms/values.yaml
+++ b/kubernetes/aaf/charts/aaf-sms/values.yaml
@@ -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