Merge "[CPS] New Delhi release changes"
[oom.git] / kubernetes / vfc / components / vfc-generic-vnfm-driver / templates / deployment.yaml
index d5a043d..4cd1100 100644 (file)
@@ -59,22 +59,23 @@ spec:
             periodSeconds: {{ .Values.readiness.periodSeconds }}
           env:
             - name: MSB_HOST
-              value: "{{ .Values.global.config.msbprotocol }}://{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
+              value: "{{ .Values.global.config.msbprotocol }}{{ (eq "true" (include "common.needTLS" .)) | ternary "s" "" }}://{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
+            {{- if and (include "common.needTLS" .) (eq .Values.global.config.ssl_enabled true) }}
             - name: SSL_ENABLED
-              value: "{{ .Values.global.config.ssl_enabled }}"
+              value: "true"
+            {{- else }}
+            - name: SSL_ENABLED
+              value: "false"
+            {{- end }}
             - name: REG_TO_MSB_WHEN_START
               value: "{{ .Values.global.config.reg_to_msb_when_start }}"
           volumeMounts:
-          - name: {{ include "common.fullname" . }}-localtime
-            mountPath: /etc/localtime
-            readOnly: true
           - name: {{ include "common.fullname" . }}-logs
             mountPath: "{{ .Values.log.path }}"
           - name: {{ include "common.fullname" . }}-logconfig
             mountPath: /opt/vfc/gvnfmdriver/config/log.yml
             subPath: log.yml
-          resources:
-{{ include "common.resources" . | indent 12 }}
+          resources: {{ include "common.resources" . | nindent 12 }}
         {{- if .Values.nodeSelector }}
         nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 10 }}
@@ -87,14 +88,10 @@ spec:
         # side car containers
         {{ include "common.log.sidecar" . | nindent 8 }}
       volumes:
-        - name: {{ include "common.fullname" . }}-localtime
-          hostPath:
-            path: /etc/localtime
         - name:  {{ include "common.fullname" . }}-logs
           emptyDir: {}
         - name: {{ include "common.fullname" . }}-logconfig
           configMap:
             name : {{ include "common.fullname" . }}-logging-configmap
         {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }}
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}