X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Foof%2Ftemplates%2Fdeployment.yaml;h=ffcbb6574f6836e74937bbf12777af843635a284;hb=942e8f8450f06dc2f20d6c3b5dc28a62ef524770;hp=07f1ff44a9952cc196a38178ead0ab136d19094d;hpb=a9160618f735e2f5f8c168d9be56e77d1e896ec2;p=oom.git diff --git a/kubernetes/oof/templates/deployment.yaml b/kubernetes/oof/templates/deployment.yaml index 07f1ff44a9..ffcbb6574f 100644 --- a/kubernetes/oof/templates/deployment.yaml +++ b/kubernetes/oof/templates/deployment.yaml @@ -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,20 +29,14 @@ spec: metadata: labels: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} spec: initContainers: - command: - /root/ready.py args: - --container-name - - pdp - - --container-name - - aaf-service - - --container-name - - aaf-sms - - --container-name - - oof-has-api + - policy-xacml-pdp env: - name: NAMESPACE valueFrom: @@ -52,6 +46,25 @@ spec: image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} name: {{ include "common.name" . }}-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/osdf/secret); + echo $resp; + sleep 2; + done + 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" . }}-osdf-sms-readiness + containers: - name: {{ include "common.name" . }} image: "{{ include "common.repository" . }}/{{ .Values.image }}" @@ -77,12 +90,21 @@ spec: - mountPath: /etc/localtime name: localtime readOnly: true - - mountPath: /opt/app/config/osdf_config.yaml + - mountPath: /opt/osdf/config/osdf_config.yaml name: {{ include "common.fullname" . }}-config subPath: osdf_config.yaml - mountPath: /opt/app/ssl_cert/aaf_root_ca.cer name: {{ include "common.fullname" . }}-config subPath: aaf_root_ca.cer + - mountPath: /opt/app/ssl_cert/org.onap.oof.crt + name: {{ include "common.fullname" . }}-config + subPath: org.onap.oof.crt + - mountPath: /opt/app/ssl_cert/org.onap.oof.key + name: {{ include "common.fullname" . }}-config + subPath: org.onap.oof.key + - mountPath: /opt/osdf/config/common_config.yaml + name: {{ include "common.fullname" . }}-config + subPath: common_config.yaml resources: {{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} @@ -106,5 +128,11 @@ spec: path: osdf_config.yaml - key: aaf_root_ca.cer path: aaf_root_ca.cer + - key: common_config.yaml + path: common_config.yaml + - key: org.onap.oof.crt + path: org.onap.oof.crt + - key: org.onap.oof.key + path: org.onap.oof.key imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key"