X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Foof%2Fcharts%2Foof-has%2Fcharts%2Foof-has-solver%2Ftemplates%2Fdeployment.yaml;h=4c2a345054a857f18f838ef8f0d925a53ee9815b;hb=a8672794ffc7c4b9486df575e665301fd9db3d97;hp=9f9b4dbae52ad1997c4d0fb5d11ef1272ebf0037;hpb=25bfd399919f9599a2ba4f94cac72875473e6297;p=oom.git diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-solver/templates/deployment.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-solver/templates/deployment.yaml index 9f9b4dbae5..4c2a345054 100755 --- a/kubernetes/oof/charts/oof-has/charts/oof-has-solver/templates/deployment.yaml +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-solver/templates/deployment.yaml @@ -1,4 +1,5 @@ # Copyright © 2017 Amdocs, Bell Canada +# Modifications Copyright © 2018 AT&T,VMware # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,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 }} @@ -28,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: @@ -44,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" . }}-solvr-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 }}" @@ -86,8 +137,11 @@ 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: -{{ toYaml .Values.resources | indent 12 }} +{{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} @@ -110,5 +164,7 @@ 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"