From 10247dcd4a5ea63910271c43c72a08035c90d11a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alfredo=20Espa=C3=B1a?= Date: Mon, 27 Mar 2023 13:42:49 -0600 Subject: [PATCH] Support to enable/disable ingress spec tls hosts setting (#63) --- charts/terrakube/Chart.yaml | 2 +- charts/terrakube/templates/ingress-api.yaml | 2 +- charts/terrakube/templates/ingress-registry.yaml | 2 +- charts/terrakube/templates/ingress-ui.yaml | 2 +- charts/terrakube/values.schema.json | 4 ++++ charts/terrakube/values.yaml | 1 + 6 files changed, 9 insertions(+), 4 deletions(-) diff --git a/charts/terrakube/Chart.yaml b/charts/terrakube/Chart.yaml index 53b1ab7..d2259c8 100644 --- a/charts/terrakube/Chart.yaml +++ b/charts/terrakube/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 3.3.1 +version: 3.4.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/terrakube/templates/ingress-api.yaml b/charts/terrakube/templates/ingress-api.yaml index c8e24bd..f989701 100644 --- a/charts/terrakube/templates/ingress-api.yaml +++ b/charts/terrakube/templates/ingress-api.yaml @@ -8,7 +8,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{ if .Values.ingress.useTls }} + {{ if and .Values.ingress.useTls .Values.ingress.includeTlsHosts }} tls: - hosts: - {{ .Values.ingress.api.domain | quote }} diff --git a/charts/terrakube/templates/ingress-registry.yaml b/charts/terrakube/templates/ingress-registry.yaml index 51188af..eb7514d 100644 --- a/charts/terrakube/templates/ingress-registry.yaml +++ b/charts/terrakube/templates/ingress-registry.yaml @@ -8,7 +8,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{ if .Values.ingress.useTls }} + {{ if and .Values.ingress.useTls .Values.ingress.includeTlsHosts }} tls: - hosts: - {{ .Values.ingress.registry.domain | quote}} diff --git a/charts/terrakube/templates/ingress-ui.yaml b/charts/terrakube/templates/ingress-ui.yaml index 6916166..20f40db 100644 --- a/charts/terrakube/templates/ingress-ui.yaml +++ b/charts/terrakube/templates/ingress-ui.yaml @@ -8,7 +8,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{ if .Values.ingress.useTls }} + {{ if and .Values.ingress.useTls .Values.ingress.includeTlsHosts }} tls: - hosts: - {{ .Values.ingress.ui.domain | quote }} diff --git a/charts/terrakube/values.schema.json b/charts/terrakube/values.schema.json index 4878f96..4c77e95 100644 --- a/charts/terrakube/values.schema.json +++ b/charts/terrakube/values.schema.json @@ -424,6 +424,10 @@ "description": "Enable Https Ingress", "type": "boolean" }, + "includeTlsHosts": { + "description": "Include spec.tls.hosts inside ingress config", + "type": "boolean" + }, "ui": { "type": "object", "required": ["enabled", "annotations", "path", "pathType"], diff --git a/charts/terrakube/values.yaml b/charts/terrakube/values.yaml index 0e07d42..5b56ad1 100644 --- a/charts/terrakube/values.yaml +++ b/charts/terrakube/values.yaml @@ -197,6 +197,7 @@ ui: ## Ingress properties ingress: useTls: false + includeTlsHosts: true ui: enabled: true domain: "terrakube-ui.minikube.net"