Updates to OOM Portal
[oom.git] / kubernetes / portal / charts / portal-app / templates / deployment.yaml
index bfe1033..fb9f35b 100644 (file)
@@ -31,14 +31,14 @@ spec:
         release: {{ .Release.Name }}
     spec:
       initContainers:
-      - name: {{ include "common.name" . }}-readiness
+      - name: {{ include "common.name" . }}-job-completion
         image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
-        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
         command:
-        - /root/ready.py
+        - /root/job_complete.py
         args:
-        - --container-name
-        - {{ .Values.mariadb.nameOverride }}
+        - --job-name
+        - {{ .Release.Name }}-portal-db-config
         env:
         - name: NAMESPACE
           valueFrom:
@@ -47,7 +47,7 @@ spec:
               fieldPath: metadata.namespace
       containers:
       - name: {{ include "common.name" . }}
-        image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+        image: "{{ include "common.repository" . }}/{{ .Values.image }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         command:
           - /start-apache-tomcat.sh
@@ -55,10 +55,20 @@ spec:
           - ""
           - -n
           - ""
+        env:
+          - name: javax.net.ssl.keyStore
+            value: {{ .Values.global.env.tomcatDir }}/{{ .Values.global.truststoreFile}} 
+          - name: javax.net.ssl.keyStorePassword
+            value: {{ .Values.global.trustpass }}
+          - name: javax.net.ssl.trustStore
+            value: {{ .Values.global.env.tomcatDir }}/{{ .Values.global.truststoreFile}}
+          - name: javax.net.ssl.trustStorePassword
+            value: {{ .Values.global.trustpass }}
         ports:
         - containerPort: {{ .Values.service.internalPort }}
         - containerPort: {{ .Values.service.internalPort2 }}
         - containerPort: {{ .Values.service.internalPort3 }}
+        - containerPort: {{ .Values.service.internalPort4 }}
         {{- if eq .Values.liveness.enabled true }}
         livenessProbe:
           tcpSocket:
@@ -93,12 +103,19 @@ spec:
         - name: properties-onapportal
           mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTAL/WEB-INF/classes/logback.xml"
           subPath: logback.xml
-        - name: portal-tomcat-logs
-          mountPath: "{{ .Values.global.env.tomcatDir }}/logs"
+        - name: properties-onapportal
+          mountPath: "{{ .Values.global.env.tomcatDir }}/conf/server.xml"
+          subPath: server.xml
+        - name: authz-onapportal
+          mountPath: "{{ .Values.global.env.tomcatDir }}/{{ .Values.global.keystoreFile}}"
+          subPath: {{ .Values.global.keystoreFile}}
+        - name: authz-onapportal
+          mountPath: "{{ .Values.global.env.tomcatDir }}/{{ .Values.global.truststoreFile}}"
+          subPath: {{ .Values.global.truststoreFile}}          
         - name: var-log-onap
           mountPath: /var/log/onap
         resources:
-{{ toYaml .Values.resources | indent 12 }}
+{{ include "common.resources" . | indent 12 }}
       {{- if .Values.nodeSelector }}
       nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 10 }}
@@ -126,6 +143,9 @@ spec:
           configMap:
             name: {{ include "common.fullname" . }}-onapportal
             defaultMode: 0755
+        - name: authz-onapportal
+          secret:
+            secretName: {{ include "common.fullname" . }}-authz-onapportal
         - name: filebeat-conf
           configMap:
             name: portal-filebeat
@@ -136,4 +156,4 @@ spec:
         - name: portal-tomcat-logs
           emptyDir: {}
       imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"