From 6ce65e6e0d9af398364d27a22274435bbbc217dd Mon Sep 17 00:00:00 2001 From: Cameron Rozean Date: Thu, 9 Mar 2023 14:24:07 -0800 Subject: [PATCH] Add SSL redirect and default service backend to Athens ingress template The upstream template does not have the SSL redirect rule and the default service backend configured, so this patch adds it. We need this for the redirect ingress annotations to work. Signed-off-by: Abhay Krishna Arunachalam --- charts/athens-proxy/templates/ingress.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/charts/athens-proxy/templates/ingress.yaml b/charts/athens-proxy/templates/ingress.yaml index eda575a8..a6fd7594 100644 --- a/charts/athens-proxy/templates/ingress.yaml +++ b/charts/athens-proxy/templates/ingress.yaml @@ -26,6 +26,11 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: + defaultBackend: + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} ingressClassName: {{ .Values.ingress.className }} {{- end }} @@ -44,6 +49,13 @@ spec: - host: {{ .host | quote }} http: paths: + - path: / + pathType: ImplementationSpecific + backend: + service: + name: ssl-redirect + port: + name: use-annotation {{- range .paths }} - path: {{ .path }} {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} -- 2.39.2