From 784333c1d414a89682a453f15ffa5dbc203e925b Mon Sep 17 00:00:00 2001 From: shoce Date: Tue, 7 Nov 2023 20:51:11 +0530 Subject: [PATCH] $.Values.global.ingress.tls.skipSecretName --- charts/gitlab/charts/webservice/templates/_ingress.tpl | 4 +++- charts/minio/templates/ingress.yaml | 4 +++- charts/registry/templates/ingress.yaml | 4 +++- values.yaml | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/charts/gitlab/charts/webservice/templates/_ingress.tpl b/charts/gitlab/charts/webservice/templates/_ingress.tpl index 283b90a95c..d5a25f8047 100644 --- a/charts/gitlab/charts/webservice/templates/_ingress.tpl +++ b/charts/gitlab/charts/webservice/templates/_ingress.tpl @@ -70,11 +70,13 @@ spec: serviceName: {{ template "webservice.fullname.withSuffix" .deployment }} servicePort: {{ .root.Values.service.workhorseExternalPort }} {{- end -}} - {{- if (and .tlsSecret (eq (include "gitlab.ingress.tls.enabled" .root) "true" )) }} + {{- if (and (or .tlsSecret $.Values.global.ingress.tls.skipSecretName) (eq (include "gitlab.ingress.tls.enabled" .root) "true" )) }} tls: - hosts: - {{ .host }} + {{ if not $.Values.global.ingress.tls.skipSecretName -}} secretName: {{ .tlsSecret }} + {{- end }} {{- else }} tls: [] {{- end }} diff --git a/charts/minio/templates/ingress.yaml b/charts/minio/templates/ingress.yaml index 1bba5cb6c3..feab724a2e 100644 --- a/charts/minio/templates/ingress.yaml +++ b/charts/minio/templates/ingress.yaml @@ -44,11 +44,13 @@ spec: serviceName: {{ template "minio.fullname" . }}-svc servicePort: {{ .Values.servicePort }} {{- end -}} - {{- if (and $tlsSecret (eq (include "gitlab.ingress.tls.enabled" $) "true" )) }} + {{- if (and (or $tlsSecret $.Values.global.ingress.tls.skipSecretName) (eq (include "gitlab.ingress.tls.enabled" $) "true" )) }} tls: - hosts: - {{ $minioHostname }} + {{ if not $.Values.global.ingress.tls.skipSecretName -}} secretName: {{ $tlsSecret }} + {{- end }} {{- else }} tls: [] {{- end }} diff --git a/charts/registry/templates/ingress.yaml b/charts/registry/templates/ingress.yaml index c761df6a4a..866ef28645 100644 --- a/charts/registry/templates/ingress.yaml +++ b/charts/registry/templates/ingress.yaml @@ -54,11 +54,13 @@ spec: serviceName: {{ template "registry.fullname" . }} servicePort: {{ .Values.service.externalPort }} {{- end -}} - {{- if (and $tlsSecret (eq (include "gitlab.ingress.tls.enabled" $) "true" )) }} + {{- if (and (or $tlsSecret $.Values.global.ingress.tls.skipSecretName) (eq (include "gitlab.ingress.tls.enabled" $) "true" )) }} tls: - hosts: - {{ $hostname }} + {{ if not $.Values.global.ingress.tls.skipSecretName -}} secretName: {{ $tlsSecret }} + {{- end }} {{- else }} tls: [] {{- end }} diff --git a/values.yaml b/values.yaml index c4c5e1ef94..647a318f8b 100644 --- a/values.yaml +++ b/values.yaml @@ -84,6 +84,7 @@ global: tls: {} # enabled: true # secretName: + # skipSecretName: false path: / pathType: Prefix @@ -547,7 +548,7 @@ global: ## Geo Secondary only # nodeName allows multiple instances behind a load balancer. nodeName: # defaults to `gitlab.gitlab.host` - # ingressClass: + # ingressClass: # PostgreSQL connection details only needed for `secondary` psql: password: {} -- GitLab