diff options
author | michaere <michaere@amdocs.com> | 2018-10-29 14:23:55 +0000 |
---|---|---|
committer | michaere <michaere@amdocs.com> | 2018-10-29 14:31:24 +0000 |
commit | 1bd45e1c63b6c96d91e14a214bf0ff59955fe165 (patch) | |
tree | 92af9bd70ffbef304cc2807ba406388b82db1c63 | |
parent | 73f4a744301e68f6e3942649630ab56cd297c82b (diff) |
Fix champ pod starting before cassandra pods
Add readiness check to champ deployment.yaml to only start champ once
cassandra pods are successfully started
Issue-ID: AAI-1770
Change-Id: I4a1d3008d5368766d259325c73dfa14a8b47c1ce
Signed-off-by: michaere <michaere@amdocs.com>
-rw-r--r-- | kubernetes/aai/charts/aai-champ/templates/deployment.yaml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/kubernetes/aai/charts/aai-champ/templates/deployment.yaml b/kubernetes/aai/charts/aai-champ/templates/deployment.yaml index 0c125b126f..4e1866c8b9 100644 --- a/kubernetes/aai/charts/aai-champ/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-champ/templates/deployment.yaml @@ -31,6 +31,21 @@ spec: app: {{ include "common.name" . }} release: {{ .Release.Name }} spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - aai-cassandra + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} image: "{{ include "common.repository" . }}/{{ .Values.image }}" |