X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fvfc%2Fcomponents%2Fvfc-vnfres%2Ftemplates%2Fdeployment.yaml;h=5723b0f3227be2de167d844fc521f0c7e2cbae66;hb=e4aac7a3c577b7bb9eaae93387d482f952ee4b72;hp=25778875235793eeac9de0ea9ea171d6133af8fe;hpb=0cd5feef0b60bb3d7f881d5907c085164981761c;p=oom.git diff --git a/kubernetes/vfc/components/vfc-vnfres/templates/deployment.yaml b/kubernetes/vfc/components/vfc-vnfres/templates/deployment.yaml index 2577887523..5723b0f322 100644 --- a/kubernetes/vfc/components/vfc-vnfres/templates/deployment.yaml +++ b/kubernetes/vfc/components/vfc-vnfres/templates/deployment.yaml @@ -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: REDIS_HOST value: "{{ .Values.global.config.redisServiceName }}" - name: REDIS_PORT @@ -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"