From 97c93e3af411a170264a1809b8068468b88782a0 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 5 Mar 2024 17:44:00 +0100 Subject: [PATCH] feat(ingress): Add `ingressClassName` to ingress of UI/API/REGISTRY (#101) * feat(ingress): Add `ingressClassName` to ingress of UI/API/REGISTRY --- README.md | 3 +++ charts/terrakube/Chart.yaml | 2 +- charts/terrakube/templates/ingress-api.yaml | 1 + charts/terrakube/templates/ingress-registry.yaml | 1 + charts/terrakube/templates/ingress-ui.yaml | 1 + charts/terrakube/values.yaml | 3 +++ 6 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9ab01d4..a338988 100644 --- a/README.md +++ b/README.md @@ -301,18 +301,21 @@ Once you have completed the above steps you can complete the file values.yaml to | ui.serviceType | Yes | ClusterIP/NodePort/LoadBalancer/ExternalName | | ui.securityContext | No | Fill securityContext field | | ui.containerSecurityContext | No | Fill securityContext field in the container spec | +| ingress.ui.ingressClassName | Yes | Default is set to nginx | | ingress.ui.useTls | Yes | true/false | | ingress.ui.enabled | Yes | true/false | | ingress.ui.domain | Yes | | | ingress.ui.path | Yes | ImplementationSpecific/Exact/Prefix | | ingress.ui.pathType | Yes | | | ingress.ui.annotations | Yes | Ingress annotations | +| ingress.api.ingressClassName | Yes | Default is set to nginx | | ingress.api.useTls | Yes | | | ingress.api.enabled | Yes | | | ingress.api.domain | Yes | | | ingress.api.path | Yes | | | ingress.api.pathType | Yes | ImplementationSpecific/Exact/Prefix | | ingress.api.annotations | Yes | Ingress annotations | +| ingress.registry.ingressClassName | Yes | Default is set to nginx | | ingress.registry.useTls | Yes | | | ingress.registry.enabled | Yes | | | ingress.registry.domain | Yes | | diff --git a/charts/terrakube/Chart.yaml b/charts/terrakube/Chart.yaml index 6c92584..a61ed3f 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.14.2 +version: 3.15.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 5a0c5b0..46a09d9 100644 --- a/charts/terrakube/templates/ingress-api.yaml +++ b/charts/terrakube/templates/ingress-api.yaml @@ -8,6 +8,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: + ingressClassName: {{ .Values.ingress.api.ingressClassName | nginx }} {{ if and .Values.ingress.useTls .Values.ingress.includeTlsHosts }} tls: - hosts: diff --git a/charts/terrakube/templates/ingress-registry.yaml b/charts/terrakube/templates/ingress-registry.yaml index 643c100..7358bac 100644 --- a/charts/terrakube/templates/ingress-registry.yaml +++ b/charts/terrakube/templates/ingress-registry.yaml @@ -8,6 +8,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: + ingressClassName: {{ .Values.ingress.registry.ingressClassName | nginx }} {{ if and .Values.ingress.useTls .Values.ingress.includeTlsHosts }} tls: - hosts: diff --git a/charts/terrakube/templates/ingress-ui.yaml b/charts/terrakube/templates/ingress-ui.yaml index 93fc5f7..65e04ba 100644 --- a/charts/terrakube/templates/ingress-ui.yaml +++ b/charts/terrakube/templates/ingress-ui.yaml @@ -8,6 +8,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: + ingressClassName: {{ .Values.ingress.ui.ingressClassName | nginx }} {{ if and .Values.ingress.useTls .Values.ingress.includeTlsHosts }} tls: - hosts: diff --git a/charts/terrakube/values.yaml b/charts/terrakube/values.yaml index 62117a4..320e94a 100644 --- a/charts/terrakube/values.yaml +++ b/charts/terrakube/values.yaml @@ -248,6 +248,7 @@ ingress: domain: "terrakube-ui.minikube.net" path: "/" pathType: "Prefix" + ingressClassName: "nginx" tlsSecretName: tls-secret-ui-terrakube annotations: nginx.ingress.kubernetes.io/use-regex: "true" @@ -256,6 +257,7 @@ ingress: domain: "terrakube-api.minikube.net" path: "/" pathType: "Prefix" + ingressClassName: "nginx" tlsSecretName: tls-secret-api-terrakube annotations: nginx.ingress.kubernetes.io/use-regex: "true" @@ -265,6 +267,7 @@ ingress: domain: "terrakube-reg.minikube.net" path: "/" pathType: "Prefix" + ingressClassName: "nginx" tlsSecretName: tls-secret-reg-terrakube annotations: nginx.ingress.kubernetes.io/use-regex: "true"