From ce8a39cd431e251d3effedbca07063fe25ce45c1 Mon Sep 17 00:00:00 2001 From: AndrewLamb Date: Thu, 14 Jul 2022 12:51:55 +0100 Subject: [VFC] Service Mesh Compatibility Adding basic requirements for Service Mesh compatibility for VFC Issue-ID: OOM-2991 Change-Id: I2c5d83772a13d9657858ae959c5ed336eccea89e Signed-off-by: AndrewLamb --- kubernetes/vfc/components/vfc-vnfres/templates/deployment.yaml | 9 +++++++-- kubernetes/vfc/components/vfc-vnfres/templates/service.yaml | 4 ++-- kubernetes/vfc/components/vfc-vnfres/values.yaml | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) (limited to 'kubernetes/vfc/components/vfc-vnfres') diff --git a/kubernetes/vfc/components/vfc-vnfres/templates/deployment.yaml b/kubernetes/vfc/components/vfc-vnfres/templates/deployment.yaml index a0178151d4..5723b0f322 100644 --- a/kubernetes/vfc/components/vfc-vnfres/templates/deployment.yaml +++ b/kubernetes/vfc/components/vfc-vnfres/templates/deployment.yaml @@ -79,9 +79,14 @@ 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: '{{ include "common.mariadbService" . }}:{{ include "common.mariadbPort" . }}' - name: REDIS_HOST diff --git a/kubernetes/vfc/components/vfc-vnfres/templates/service.yaml b/kubernetes/vfc/components/vfc-vnfres/templates/service.yaml index c043913b70..4f583f2181 100644 --- a/kubernetes/vfc/components/vfc-vnfres/templates/service.yaml +++ b/kubernetes/vfc/components/vfc-vnfres/templates/service.yaml @@ -43,11 +43,11 @@ spec: - port: {{ .Values.service.externalPort }} targetPort: {{ .Values.service.internalPort }} nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} - name: {{ .Values.service.portName }} + name: {{ .Values.service.portName }}{{ if (include "common.needTLS" .) }}s{{ end }} {{- else -}} - port: {{ .Values.service.externalPort }} targetPort: {{ .Values.service.internalPort }} - name: {{ .Values.service.portName }} + name: {{ .Values.service.portName }}{{ if (include "common.needTLS" .) }}s{{ end }} {{- end}} selector: app: {{ include "common.name" . }} diff --git a/kubernetes/vfc/components/vfc-vnfres/values.yaml b/kubernetes/vfc/components/vfc-vnfres/values.yaml index 8230144443..c2954d5517 100644 --- a/kubernetes/vfc/components/vfc-vnfres/values.yaml +++ b/kubernetes/vfc/components/vfc-vnfres/values.yaml @@ -78,7 +78,7 @@ readiness: service: type: ClusterIP name: vfc-vnfres - portName: vfc-vnfres + portName: http externalPort: 8802 internalPort: 8802 # nodePort: 30802 -- cgit 1.2.3-korg