Merge "Add FCAPS to oom"
[oom.git] / kubernetes / oof / templates / deployment.yaml
index 3341505..3c5306e 100644 (file)
@@ -37,8 +37,6 @@ spec:
         args:
         - --container-name
         - pdp
-        - --container-name
-        - oof-has-api
         env:
         - name: NAMESPACE
           valueFrom:
@@ -48,6 +46,24 @@ 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 }}"
@@ -76,8 +92,20 @@ spec:
           - mountPath: /opt/app/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:
-{{ toYaml (pluck .Values.flavor .Values.resources| first) | indent 12 }}
+{{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}
         nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 10 }}
@@ -97,5 +125,13 @@ spec:
             items:
             - key: osdf_config.yaml
               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"