summaryrefslogtreecommitdiffstats
path: root/kubernetes/multicloud/templates
diff options
context:
space:
mode:
authorFiachra Corcoran <fiachra.corcoran@est.tech>2022-09-23 18:54:14 +0000
committerGerrit Code Review <gerrit@onap.org>2022-09-23 18:54:14 +0000
commit54a46829db2c1119f3baa12de63f584d03aba8cd (patch)
tree262ad4004248193c0b2d2da4719d4df82968e881 /kubernetes/multicloud/templates
parente80759dab867db25cb72b750fe60484a28bed1d4 (diff)
parentdfa23c83cc8630915824968ba7b043ef968e38b6 (diff)
Merge "[MULTICLOUD] Service mesh compatibility"
Diffstat (limited to 'kubernetes/multicloud/templates')
-rw-r--r--kubernetes/multicloud/templates/deployment.yaml12
-rw-r--r--kubernetes/multicloud/templates/service.yaml8
2 files changed, 12 insertions, 8 deletions
diff --git a/kubernetes/multicloud/templates/deployment.yaml b/kubernetes/multicloud/templates/deployment.yaml
index 53716e5f44..ff9dac1898 100644
--- a/kubernetes/multicloud/templates/deployment.yaml
+++ b/kubernetes/multicloud/templates/deployment.yaml
@@ -40,15 +40,15 @@ spec:
containers:
- env:
- name: MSB_PROTO
- value: {{ .Values.config.msbprotocol }}
+ value: "{{ if (include "common.needTLS" .) }}https{{ else }}http{{ end }}"
- name: MSB_ADDR
- value: {{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}
+ value: "{{ .Values.config.msbgateway }}.{{ include "common.namespace" . }}"
- name: MSB_PORT
- value: "{{ .Values.config.msbPort }}"
+ value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.msbPort }}{{ else }}{{ .Values.config.msbPlainPort }}{{ end }}"
- name: AAI_ADDR
value: "aai.{{ include "common.namespace" . }}"
- name: AAI_PORT
- value: "{{ .Values.config.aai.port }}"
+ value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.aai.aaiPort }}{{ else }}{{ .Values.config.aai.aaiPlainPort }}{{ end }}"
- name: AAI_SCHEMA_VERSION
value: "{{ .Values.config.aai.schemaVersion }}"
- name: AAI_USERNAME
@@ -56,7 +56,7 @@ spec:
- name: AAI_PASSWORD
value: "{{ .Values.config.aai.password }}"
- name: SSL_ENABLED
- value: "{{ .Values.config.ssl_enabled }}"
+ value: "{{- if (include "common.needTLS" .) }}{{ .Values.config.ssl_enabled }}{{ else }}false{{ end }}"
resources:
{{ include "common.resources" . | indent 12 }}
image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
@@ -80,7 +80,7 @@ spec:
httpGet:
path: /api/multicloud/v0/swagger.json
port: {{ .Values.service.internalPort }}
- scheme: HTTPS
+ scheme: "{{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}"
initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.liveness.periodSeconds }}
timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
diff --git a/kubernetes/multicloud/templates/service.yaml b/kubernetes/multicloud/templates/service.yaml
index 3f950db038..1c483b0d2d 100644
--- a/kubernetes/multicloud/templates/service.yaml
+++ b/kubernetes/multicloud/templates/service.yaml
@@ -18,7 +18,7 @@
apiVersion: v1
kind: Service
metadata:
- name: {{ .Values.service.portName }}
+ name: {{ .Values.service.name }}
namespace: {{ include "common.namespace" . }}
labels:
app: {{ include "common.name" . }}
@@ -33,7 +33,11 @@ metadata:
"url": "/api/multicloud/v0",
"protocol": "REST",
"port": "{{ .Values.service.externalPort }}",
+ {{if (include "common.needTLS" .) -}}
"enable_ssl": {{ .Values.config.ssl_enabled }},
+ {{- else -}}
+ "enable_ssl": false,
+ {{- end}}
"visualRange": "1"
},
{
@@ -42,7 +46,7 @@ metadata:
"url": "/api/multicloud/v1",
"protocol": "REST",
"port": "{{ .Values.service.externalPort }}",
- "enable_ssl": {{ .Values.config.ssl_enabled }},
+ "enable_ssl": {{ if (include "common.needTLS" .) }}{{ .Values.config.ssl_enabled }}{{ else }}false{{ end }},
"visualRange": "1"
}
]'