summaryrefslogtreecommitdiffstats
path: root/kubernetes/modeling
diff options
context:
space:
mode:
authorAndrewLamb <andrew.a.lamb@est.tech>2022-07-06 15:51:19 +0100
committerAndreas Geissler <andreas-geissler@telekom.de>2022-08-22 13:43:23 +0200
commit08eb9fa023ab001ecbac30dbc2ed01495ff2841c (patch)
tree01dd41932f8da92e3bad1ad5fadbd5600066f20f /kubernetes/modeling
parent9a3395bd906fcdbcd619f82535d0ce7e913ee3c4 (diff)
[MODELING] Service Mesh Compatibility
Adding basic requirements for Service Mesh compatibility for Modeling and made the MSB readiness probe optional Issue-ID: OOM-2992 Change-Id: Ib2353898811014e01f8c8a9553c6477ce7bc16bd Signed-off-by: AndrewLamb <andrew.a.lamb@est.tech>
Diffstat (limited to 'kubernetes/modeling')
-rw-r--r--kubernetes/modeling/components/modeling-etsicatalog/templates/deployment.yaml22
-rw-r--r--kubernetes/modeling/components/modeling-etsicatalog/templates/service.yaml4
-rw-r--r--kubernetes/modeling/components/modeling-etsicatalog/values.yaml10
3 files changed, 26 insertions, 10 deletions
diff --git a/kubernetes/modeling/components/modeling-etsicatalog/templates/deployment.yaml b/kubernetes/modeling/components/modeling-etsicatalog/templates/deployment.yaml
index d9cbbef15b..72eced7710 100644
--- a/kubernetes/modeling/components/modeling-etsicatalog/templates/deployment.yaml
+++ b/kubernetes/modeling/components/modeling-etsicatalog/templates/deployment.yaml
@@ -52,7 +52,9 @@ spec:
image: {{ include "repositoryGenerator.image.readiness" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
name: {{ include "common.name" . }}-job-readiness
+ {{ if .Values.config.msb_enabled }}
{{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for.msb ) | indent 6 | trim }}
+ {{ end }}
- command:
- /bin/sh
- -c
@@ -84,18 +86,30 @@ spec:
initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.readiness.periodSeconds }}
env:
+ {{- if and (include "common.needTLS" .) (eq .Values.config.ssl_enabled true) }}
- name: SSL_ENABLED
- value: "{{ .Values.config.ssl_enabled }}"
+ value: "true"
+ {{- else }}
+ - name: SSL_ENABLED
+ value: "false"
+ {{- end }}
- name: MSB_ENABLED
value: "{{ .Values.config.msb_enabled }}"
+ {{- if (include "common.needTLS" .) }}
+ - name: MSB_ADDR
+ value: "{{ .Values.config.msbProtocol }}s://{{ .Values.config.msbServiceName }}:{{ .Values.config.msbPort }}"
+ - name: SDC_ADDR
+ value: "{{ .Values.config.sdcProtocol }}s://{{ .Values.config.sdcServiceName }}:{{ .Values.config.sdcPort }}"
+ {{- else }}
- name: MSB_ADDR
- value: "{{ .Values.config.msbProtocol }}://{{ .Values.config.msbServiceName }}:{{ .Values.config.msbPort }}"
+ value: "{{ .Values.config.msbProtocol }}://{{ .Values.config.msbServiceName }}:{{ .Values.config.msbPlainPort }}"
- name: SDC_ADDR
- value: "{{ .Values.config.sdcProtocol }}://{{ .Values.config.sdcServiceName }}:{{ .Values.config.sdcPort }}"
+ value: "{{ .Values.config.sdcProtocol }}://{{ .Values.config.sdcServiceName }}:{{ .Values.config.sdcPlainPort }}"
+ {{- end }}
- name: DMAAP_ENABLED
value: "{{ .Values.config.dmaap_enabled }}"
- name: DMAAP_ADDR
- value: "{{ .Values.config.dmaapProtocol }}://{{ .Values.config.dmaapServiceName }}:{{ .Values.config.dmaapPort }}"
+ value: "{{ .Values.config.dmaapProtocol }}{{ (eq "true" (include "common.needTLS" .)) | ternary "s" "" }}://{{ .Values.config.dmaapServiceName }}:{{ .Values.config.dmaapPort }}"
- name: DB_IP
value: "{{ include "common.mariadbService" . }}"
- name: DB_PORT
diff --git a/kubernetes/modeling/components/modeling-etsicatalog/templates/service.yaml b/kubernetes/modeling/components/modeling-etsicatalog/templates/service.yaml
index 20d3fd22ab..688c04b06c 100644
--- a/kubernetes/modeling/components/modeling-etsicatalog/templates/service.yaml
+++ b/kubernetes/modeling/components/modeling-etsicatalog/templates/service.yaml
@@ -70,11 +70,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/modeling/components/modeling-etsicatalog/values.yaml b/kubernetes/modeling/components/modeling-etsicatalog/values.yaml
index 61df057fdb..21abce3dda 100644
--- a/kubernetes/modeling/components/modeling-etsicatalog/values.yaml
+++ b/kubernetes/modeling/components/modeling-etsicatalog/values.yaml
@@ -82,14 +82,16 @@ config:
#application configuration about msb
ssl_enabled: false
msb_enabled: false
- msbProtocol: https
+ msbProtocol: http
msbServiceName: msb-iag
msbPort: 443
- sdcProtocol: https
+ msbPlainPort: 80
+ sdcProtocol: http
sdcServiceName: sdc-be
sdcPort: 8443
+ sdcPlainPort: 8080
dmaap_enabled: false
- dmaapProtocol: https
+ dmaapProtocol: http
dmaapServiceName: message-router-external
dmaapPort: 3905
@@ -154,7 +156,7 @@ persistence:
service:
type: ClusterIP
name: modeling-etsicatalog
- portName: modeling-etsicatalog
+ portName: http
externalPort: 8806
internalPort: 8806
# nodePort: 30806