From 300568efd7b0d893d606b4911a97c0623b526493 Mon Sep 17 00:00:00 2001 From: Moses Lusengeri Anzagi <75111869+Lusengeri@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:48:57 +0300 Subject: [PATCH] add tls configuration on ingress template (#108) * add tls configuration on ingress template * Allow disabling tls * Add check for tls secretName --------- Co-authored-by: thenav56 --- helm/templates/api/ingress.yaml | 6 ++++++ helm/values-production.yaml | 3 +++ helm/values-sandbox.yaml | 3 +++ helm/values-staging.yaml | 3 +++ helm/values.yaml | 3 +++ 5 files changed, 18 insertions(+) diff --git a/helm/templates/api/ingress.yaml b/helm/templates/api/ingress.yaml index c3dbba2c..6da3930f 100644 --- a/helm/templates/api/ingress.yaml +++ b/helm/templates/api/ingress.yaml @@ -23,4 +23,10 @@ spec: port: number: 80 + {{- if .Values.ingress.tls.enabled }} + tls: + - hosts: + - {{ .Values.ingress.host | quote }} + secretName: {{ required "ingress.tls.secretName" .Values.ingress.tls.secretName }} + {{- end }} {{- end }} diff --git a/helm/values-production.yaml b/helm/values-production.yaml index 291d6cc7..a580e44c 100644 --- a/helm/values-production.yaml +++ b/helm/values-production.yaml @@ -4,6 +4,9 @@ fullnameOverride: ifrcgo-alert-hub ingress: enabled: true className: nginx + tls: + enabled: true + secretName: # Needs to be defined at go-deploy # host: alerthub-stage-api.ifrc.org diff --git a/helm/values-sandbox.yaml b/helm/values-sandbox.yaml index 20e7a9cb..20fb8619 100644 --- a/helm/values-sandbox.yaml +++ b/helm/values-sandbox.yaml @@ -8,6 +8,9 @@ ingress: enabled: true host: alert-hub-sandbox.ifrc.org className: webapprouting.kubernetes.azure.com + tls: + enabled: true + secretName: postgresql: enabled: true diff --git a/helm/values-staging.yaml b/helm/values-staging.yaml index 429b087a..a4597bd5 100644 --- a/helm/values-staging.yaml +++ b/helm/values-staging.yaml @@ -4,6 +4,9 @@ fullnameOverride: ifrcgo-alert-hub ingress: enabled: true className: nginx + tls: + enabled: true + secretName: # Needs to be defined at go-deploy # host: alerthub-stage-api.ifrc.org diff --git a/helm/values.yaml b/helm/values.yaml index dbda29ca..4bd0f143 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -8,6 +8,9 @@ ingress: enabled: false host: className: + tls: + enabled: false + secretName: redis: enabled: true