Merge "[DMAAP] DMaaP ServiceMesh compatibility"
[oom.git] / kubernetes / vfc / components / vfc-vnflcm / templates / deployment.yaml
index b93d7af..8c414ff 100644 (file)
@@ -42,7 +42,7 @@ spec:
         - /app/ready.py
         args:
         - --container-name
-        - {{ .Values.config.mariadbService }}
+        - '{{ ternary (index .Values "mariadb-galera" "nameOverride") .Values.global.mariadbGalera.service .Values.global.mariadbGalera.localCluster }}'
         env:
         - name: NAMESPACE
           valueFrom:
@@ -58,7 +58,7 @@ spec:
             - sh
           args:
             - -c
-            - 'MYSQL_AUTH=root:${MYSQL_ROOT_PASSWORD} ./docker-entrypoint.sh'
+            - 'MYSQL_AUTH=${MYSQL_ROOT_USER}:${MYSQL_ROOT_PASSWORD} ./docker-entrypoint.sh'
           image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           ports:
@@ -79,11 +79,16 @@ 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: MYSQL_ADDR
-              value: "{{ .Values.config.mariadbService }}:{{ .Values.config.mariadbPort }}"
+              value: '{{ include "common.mariadbService" . }}:{{ include "common.mariadbPort" . }}'
             - name: MYSQL_ROOT_USER
               value: "{{ .Values.global.config.mariadb_admin }}"
             - name: MYSQL_ROOT_PASSWORD
@@ -99,7 +104,7 @@ spec:
             mountPath: /etc/localtime
             readOnly: true
           - name: {{ include "common.fullname" . }}-logs
-            mountPath: /var/log/onap
+            mountPath: {{ .Values.log.path }}
           - name: {{ include "common.fullname" . }}-logconfig
             mountPath: /opt/vfc/gvnfm-vnflcm/config/log.yml
             subPath: log.yml
@@ -115,18 +120,7 @@ spec:
         {{- end }}
 
         # side car containers
-        - name: {{ include "common.name" . }}-filebeat-onap
-          image: {{ include "repositoryGenerator.image.logging" . }}
-          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-          volumeMounts:
-          - name: {{ include "common.fullname" . }}-filebeat-conf
-            mountPath: /usr/share/filebeat/filebeat.yml
-            subPath: filebeat.yml
-          - name: {{ include "common.fullname" . }}-logs
-            mountPath: /var/log/onap
-          - name: {{ include "common.fullname" . }}-data-filebeat
-            mountPath: /usr/share/filebeat/data
-
+        {{ include "common.log.sidecar" . | nindent 8 }}
       volumes:
         - name: {{ include "common.fullname" . }}-localtime
           hostPath:
@@ -136,11 +130,6 @@ spec:
         - name: {{ include "common.fullname" . }}-logconfig
           configMap:
             name : {{ include "common.fullname" . }}-logging-configmap
-
-        - name: {{ include "common.fullname" . }}-filebeat-conf
-          configMap:
-            name: {{ include "common.release" . }}-vfc-filebeat-configmap
-        - name: {{ include "common.fullname" . }}-data-filebeat
-          emptyDir: {}
+        {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix . )) | nindent 8 }}
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"