[OOM] File mount missing in portal-ng-ui chart
[oom.git] / kubernetes / oof / templates / deployment.yaml
index 0b19678..5eb0fc0 100644 (file)
 
 apiVersion: apps/v1
 kind: Deployment
-metadata:
-  name: {{ include "common.fullname" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ include "common.release" . }}
-    heritage: {{ .Release.Service }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
 spec:
-  selector:
-    matchLabels:
-      app: {{ include "common.name" . }}
+  selector: {{- include "common.selectors" . | nindent 4 }}
   replicas: {{ .Values.replicaCount }}
   template:
-    metadata:
-      labels:
-        app: {{ include "common.name" . }}
-        release: {{ include "common.release" . }}
+    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
     spec:
       initContainers:
-      - command:
-        - /app/ready.py
-        args:
-        - --container-name
-        - policy-xacml-pdp
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: {{ include "repositoryGenerator.image.readiness" . }}
-        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: {{ include "repositoryGenerator.image.curl" . }}
-        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        name: {{ include "common.name" . }}-osdf-sms-readiness
-{{ include "common.certInitializer.initContainer" . | indent 6 }}
+      {{ include "common.readinessCheck.waitFor" . | nindent 6 }}
       containers:
         - name: {{ include "common.name" . }}
           image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
@@ -80,11 +36,10 @@ spec:
           args:
           - "-c"
           - |
-            grep -v '^$'  /opt/osdf/osaaf/local/org.onap.oof.crt > /tmp/oof.crt
-            cat /tmp/oof.crt /opt/app/ssl_cert/intermediate_root_ca.pem /opt/app/ssl_cert/aaf_root_ca.cer >> /opt/osdf/org.onap.oof.crt
             python osdfapp.py
           ports:
           - containerPort: {{ .Values.service.internalPort }}
+            name: http
           # disable liveness probe when breakpoints set in debugger
           # so K8s doesn't restart unresponsive container
           {{- if .Values.liveness.enabled }}
@@ -101,27 +56,19 @@ spec:
             periodSeconds: {{ .Values.readiness.periodSeconds }}
           env:
           volumeMounts:
-{{ include "common.certInitializer.volumeMount" . | indent 10 }}
-          - mountPath: /etc/localtime
-            name: localtime
-            readOnly: true
           - 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" . }}-onap-certs
-            subPath: aaf_root_ca.cer
-          - mountPath: /opt/app/ssl_cert/intermediate_root_ca.pem
-            name: {{ include "common.fullname" . }}-onap-certs
-            subPath: intermediate_root_ca.pem
           - mountPath: /opt/osdf/config/common_config.yaml
             name: {{ include "common.fullname" . }}-config
             subPath: common_config.yaml
           - mountPath: /opt/osdf/config/log.yml
             name: {{ include "common.fullname" . }}-config
             subPath: log.yml
-          resources:
-{{ include "common.resources" . | indent 12 }}
+          - mountPath: /opt/osdf/config/slicing_config.yaml
+            name: {{ include "common.fullname" . }}-config
+            subPath: slicing_config.yaml
+          resources: {{ include "common.resources" . | nindent 12 }}
         {{- if .Values.nodeSelector }}
         nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 10 }}
@@ -130,12 +77,8 @@ spec:
         affinity:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
-
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
-       {{ include "common.certInitializer.volumes" . | nindent 8 }}
-        - name: localtime
-          hostPath:
-            path: /etc/localtime
         - name: {{ include "common.fullname" . }}-config
           configMap:
             name: {{ include "common.fullname" . }}-configmap
@@ -146,6 +89,6 @@ spec:
               path: common_config.yaml
             - key: log.yml
               path: log.yml
-{{ include "oof.certificate.volume" . | indent 8 }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+            - key: slicing_config.yaml
+              path: slicing_config.yaml
+      {{- include "common.imagePullSecrets" . | nindent 6 }}