Merge "[DCAEMOD] Uses new tpls for repos / images"
[oom.git] / kubernetes / so / components / so-vnfm-adapter / templates / deployment.yaml
index caf218f..8abd9a9 100755 (executable)
@@ -1,3 +1,4 @@
+{{/*
 # Copyright © 2019 Nordix Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+*/}}
 apiVersion: apps/v1
 kind: Deployment
 metadata:
@@ -24,13 +26,13 @@ spec:
   selector:
     matchLabels:
       app: {{ include "common.name" . }}
-  replicas: {{ index .Values.replicaCount }}
-  minReadySeconds: {{ index .Values.minReadySeconds }}
+  replicas: {{ .Values.replicaCount }}
+  minReadySeconds: {{ .Values.minReadySeconds }}
   strategy:
-    type: {{ index .Values.updateStrategy.type }}
+    type: {{ .Values.updateStrategy.type }}
     rollingUpdate:
-      maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }}
-      maxSurge: {{ index .Values.updateStrategy.maxSurge }}
+      maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }}
+      maxSurge: {{ .Values.updateStrategy.maxSurge }}
   template:
     metadata:
       labels:
@@ -40,7 +42,7 @@ spec:
       initContainers: {{ include "so.certificate.container_importer" . | nindent 6 }}
       containers:
       - name: {{ include "common.name" . }}
-        image: {{ include "common.repository" . }}/{{ .Values.image }}
+        image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
         resources: {{ include "common.resources" . | nindent 12 }}
         {{- if .Values.global.aafEnabled }}
         command:
@@ -50,9 +52,8 @@ spec:
         - |
           export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
           export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
-          {{- if .Values.global.security.aaf.enabled }}
-          export KEYSTORE_PASSWORD="${cadi_keystore_password}"
-          {{- end }}
+          export KEYSTORE_PASSWORD="${cadi_keystore_password_p12}"
+          export KEYSTORE="{{ .Values.soHelpers.certInitializer.credsPath }}/org.onap.so.p12"
           /app/start-app.sh
         {{- end }}
         env:
@@ -67,18 +68,15 @@ spec:
         - name: config
           mountPath: /app/config
           readOnly: true
-        - name: {{ include "common.fullname" . }}-truststore
-          mountPath: /app/client
-          readOnly: true
         livenessProbe:
           tcpSocket:
-            port: {{ index .Values.livenessProbe.port }}
-          initialDelaySeconds: {{ index .Values.livenessProbe.initialDelaySeconds}}
-          periodSeconds: {{ index .Values.livenessProbe.periodSeconds}}
-          successThreshold: {{ index .Values.livenessProbe.successThreshold}}
-          failureThreshold: {{ index .Values.livenessProbe.failureThreshold}}
+            port: {{ .Values.livenessProbe.port }}
+          initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds}}
+          periodSeconds: {{ .Values.livenessProbe.periodSeconds}}
+          successThreshold: {{ .Values.livenessProbe.successThreshold}}
+          failureThreshold: {{ .Values.livenessProbe.failureThreshold}}
         ports:
-        - containerPort: {{ index .Values.containerPort }}
+        - containerPort: {{ .Values.containerPort }}
           name: {{ .Values.service.portName }}
           protocol: TCP
       volumes: {{ include "so.certificate.volumes" . | nindent 6 }}
@@ -87,8 +85,5 @@ spec:
       - name: config
         configMap:
             name: {{ include "common.fullname" . }}-app-configmap
-      - name:  {{ include "common.fullname" . }}-truststore
-        secret:
-          secretName: {{ include "common.release" . }}-so-truststore-secret
       imagePullSecrets:
         - name: "{{ include "common.namespace" . }}-docker-registry-key"