diff --git a/src/main/helm/templates/_helpers.tpl b/src/main/helm/templates/_helpers.tpl index a4be54ca4df7a6cefe3c57127c55e5c5bc4621ef..142c08058d339b16a4a710c0bd2f72d41765d627 100644 --- a/src/main/helm/templates/_helpers.tpl +++ b/src/main/helm/templates/_helpers.tpl @@ -71,7 +71,9 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }} {{- end -}} {{- define "app.ingress.host" }} -{{- if eq (.Values.image).name "formsolutions-adapter" }} +{{- if (.Values.ingress).adapterBezeichner }} +{{- printf "%s-%s.%s" (include "app.kopBezeichner" .) .Values.ingress.adapterBezeichner .Values.baseUrl }} +{{- else if eq (.Values.image).name "formsolutions-adapter" }} {{- printf "%s-fs.%s" (include "app.kopBezeichner" .) .Values.baseUrl }} {{- else if eq (.Values.image).name "formcycle-adapter" }} {{- printf "%s-formcycle.%s" (include "app.kopBezeichner" .) .Values.baseUrl }} diff --git a/src/test/helm/ingress_test.yaml b/src/test/helm/ingress_test.yaml index 8cb3a6872ae4323531e5f768abce72e8739dda24..7561bb305275f8ca3e90dc3a317c762bae8dd995 100644 --- a/src/test/helm/ingress_test.yaml +++ b/src/test/helm/ingress_test.yaml @@ -92,6 +92,17 @@ tests: value: helm-formcycle.test.sh.ozg-cloud.de + - it: should create custom adapter host + set: + ingress.adapterBezeichner: test + asserts: + - equal: + path: spec.rules[0].host + value: helm-test.test.sh.ozg-cloud.de + - equal: + path: spec.tls[0].hosts[0] + value: helm-test.test.sh.ozg-cloud.de + - it: should use letsencrypt-prod cluster-issuer as default asserts: - equal: