From 2d196b5fb8e80c6d02914530c7c66566bf27e3e4 Mon Sep 17 00:00:00 2001 From: Asaf Levy Date: Tue, 1 Aug 2023 17:17:12 +0300 Subject: [PATCH] proper ssl-redirect for alb - list order --- charts/console/Chart.yaml | 2 +- charts/console/templates/ingress.yaml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/charts/console/Chart.yaml b/charts/console/Chart.yaml index 95d691f..732b2d1 100644 --- a/charts/console/Chart.yaml +++ b/charts/console/Chart.yaml @@ -5,7 +5,7 @@ description: A Helm chart for Kubernetes type: application # This is the chart version. -version: 0.4.0 +version: 0.5.0 # This is the version number of the application being deployed. appVersion: "4.11.0" # https://access.redhat.com/support/policy/updates/openshift # paragraph "OpenShift Support Matrix" diff --git a/charts/console/templates/ingress.yaml b/charts/console/templates/ingress.yaml index 9de523a..44e403d 100644 --- a/charts/console/templates/ingress.yaml +++ b/charts/console/templates/ingress.yaml @@ -41,6 +41,15 @@ spec: - host: {{ .host | quote }} http: paths: + {{- if $.Values.ingress.sslRedirect }} + - path: {{ .path }} + backend: + service: + name: ssl-redirect + port: + name: use-annotation + pathType: {{ .pathType }} + {{- end }} {{- range .paths }} - path: {{ .path }} {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} @@ -56,15 +65,6 @@ spec: serviceName: {{ $fullName }} servicePort: {{ $svcPort }} {{- end }} - {{- if $.Values.ingress.sslRedirect }} - - path: {{ .path }} - backend: - service: - name: ssl-redirect - port: - name: use-annotation - pathType: {{ .pathType }} - {{- end }} {{- end }} {{- end }} {{- end }} \ No newline at end of file