X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Foof%2Fcharts%2Foof-has%2Fcharts%2Foof-has-controller%2Ftemplates%2Fdeployment.yaml;h=abd4e6795d57e13f347e14ea1353342ad00db387;hb=7a152ac46ebbe06056bb6d50db90bbf84a8bb5e5;hp=3274040470dbf4695ca40107886d16a4bb56a2f5;hpb=a859647740e19b62c44244e256c48a8847900259;p=oom.git diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-controller/templates/deployment.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-controller/templates/deployment.yaml index 3274040470..abd4e6795d 100755 --- a/kubernetes/oof/charts/oof-has/charts/oof-has-controller/templates/deployment.yaml +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-controller/templates/deployment.yaml @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "common.fullname" . }} @@ -21,22 +21,43 @@ metadata: labels: app: {{ include "common.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} spec: + selector: + matchLabels: + app: {{ include "common.name" . }} replicas: {{ .Values.replicaCount }} template: 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 + - --container-name + - aaf-sms + 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" . }}-onboard-readiness + command: + - /root/job_complete.py + args: + - -j + - "{{ include "common.release" . }}-oof-has-onboard" env: - name: NAMESPACE valueFrom: @@ -45,7 +66,25 @@ 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" . }}-cont-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,8 +126,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 }} @@ -111,5 +153,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"