Merge "Bump version of readiness image"
[oom.git] / kubernetes / oof / charts / oof-has / charts / oof-has-reservation / templates / deployment.yaml
index a967bb5..335ac4c 100755 (executable)
@@ -21,7 +21,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: {{ .Values.replicaCount }}
@@ -29,14 +29,15 @@ spec:
     metadata:
       labels:
         app: {{ include "common.name" . }}
-        release: {{ .Release.Name }}
+        release: {{ include "common.release" . }}
     spec:
       initContainers:
-      - command:
+      - name: {{ include "common.name" . }}-readiness
+        command:
         - /root/ready.py
         args:
         - --container-name
-        - oof-has-music
+        - music-springboot
         env:
         - name: NAMESPACE
           valueFrom:
@@ -45,7 +46,56 @@ spec:
               fieldPath: metadata.namespace
         image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        name: {{ include "common.name" . }}-readiness
+
+      - name: {{ include "common.name" . }}-onboard-readiness
+        command:
+        - /root/job_complete.py
+        args:
+        - -j
+        - "{{ include "common.release" . }}-oof-has-onboard"
+        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" . }}-health-readiness
+        command:
+        - /root/job_complete.py
+        args:
+        - -j
+        - "{{ include "common.release" . }}-oof-has-healthcheck"
+        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" . }}-resrv-sms-readiness
+        command:
+        - sh
+        - -c
+        - resp="FAILURE";
+          until [ $resp = "200" ]; do
+          resp=$(curl -s -o /dev/null -k --write-out %{http_code} https://aaf-sms.{{ include "common.namespace" .}}:10443/v1/sms/domain/has/secret);
+          echo $resp;
+          sleep 2;
+          done
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.global.dockerHubRepository }}/{{ .Values.global.curlImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+
       containers:
         - name: {{ include "common.name" . }}
           image: "{{ include "common.repository" . }}/{{ .Values.global.image.optf_has }}"
@@ -87,6 +137,9 @@ spec:
           - mountPath: /usr/local/bin/healthy.sh
             name: {{ .Values.global.commonConfigPrefix }}-config
             subPath: healthy.sh
+          - mountPath: /usr/local/bin/AAF_RootCA.cer
+            name: {{ .Values.global.commonConfigPrefix }}-config
+            subPath: AAF_RootCA.cer
           resources:
 {{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}
@@ -111,5 +164,8 @@ spec:
               path: log.conf
             - key: healthy.sh
               path: healthy.sh
+            - key: AAF_RootCA.cer
+              path: AAF_RootCA.cer
+
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"