From 752c060b3035e4a5f61ac4ce84e6038ef6d16abc Mon Sep 17 00:00:00 2001 From: OZGCloud <ozgcloud@mgm-tp.com> Date: Tue, 18 Jun 2024 16:42:00 +0200 Subject: [PATCH] ozg-5634 disable ingress --- src/main/helm/templates/ingress.yaml | 4 +++- src/test/helm/ingress_nginx_cors_test.yaml | 10 +++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/helm/templates/ingress.yaml b/src/main/helm/templates/ingress.yaml index a70a6b30..b7bdda41 100644 --- a/src/main/helm/templates/ingress.yaml +++ b/src/main/helm/templates/ingress.yaml @@ -22,6 +22,7 @@ # unter der Lizenz sind dem Lizenztext zu entnehmen. # +{{- if not (.Values.ingress).disabled }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: @@ -62,4 +63,5 @@ spec: {{- else }} secretName: {{ .Values.ozgcloud.bezeichner }}-{{ .Release.Name }}-tls {{- end }} - {{- end }} \ No newline at end of file + {{- end }} +{{- end }} \ No newline at end of file diff --git a/src/test/helm/ingress_nginx_cors_test.yaml b/src/test/helm/ingress_nginx_cors_test.yaml index ab13558f..ef1118cc 100644 --- a/src/test/helm/ingress_nginx_cors_test.yaml +++ b/src/test/helm/ingress_nginx_cors_test.yaml @@ -69,4 +69,12 @@ tests: value: bar - equal: path: metadata.annotations.hello - value: world \ No newline at end of file + value: world + + - it: should disable ingress + set: + ingress: + disabled: true + asserts: + - hasDocuments: + count: 0 \ No newline at end of file -- GitLab