From 180b42d8e6a3e0ecb884820e6e0899e698d2eefa Mon Sep 17 00:00:00 2001 From: shehbaz-pathan <46107507+shehbaz-pathan@users.noreply.github.com> Date: Wed, 25 Sep 2024 14:14:15 +0530 Subject: [PATCH] Enabled SSL re-direction in istio gateway (#31) * Updated version to 1.5.2 * corrected kiali chart name in getting port * Added TLS redirection if TLS is enabled --- charts/nopo11y-stack/Chart.yaml | 2 +- charts/nopo11y-stack/templates/_helpers.tpl | 2 +- .../nopo11y-stack/templates/istio-gateway.yaml | 16 +++++++++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/charts/nopo11y-stack/Chart.yaml b/charts/nopo11y-stack/Chart.yaml index 19107ca..ca0e767 100644 --- a/charts/nopo11y-stack/Chart.yaml +++ b/charts/nopo11y-stack/Chart.yaml @@ -48,4 +48,4 @@ dependencies: description: A Helm chart for observability stack name: nopo11y-stack type: application -version: 1.5.1 \ No newline at end of file +version: 1.5.2 \ No newline at end of file diff --git a/charts/nopo11y-stack/templates/_helpers.tpl b/charts/nopo11y-stack/templates/_helpers.tpl index e4f4255..a5f6edc 100644 --- a/charts/nopo11y-stack/templates/_helpers.tpl +++ b/charts/nopo11y-stack/templates/_helpers.tpl @@ -105,7 +105,7 @@ {{- if (index .Values "kiali-server" "enabled") }} {{- $kiali:= dict }} {{- $kiali = set $kiali "name" (printf "%s" (include "kiali-server.fullname" (index .Subcharts "kiali-server"))) }} - {{- $kiali = set $kiali "port" .Values.kiali.server.port }} + {{- $kiali = set $kiali "port" (index .Values "kiali-server" "server" "port") }} {{- if (index .Values "kiali-server" "server" "web_root") }} {{- if ne (index .Values "kiali-server" "server" "web_root") "/" }} {{- $kiali = set $kiali "path" (index .Values "kiali-server" "server" "web_root") }} diff --git a/charts/nopo11y-stack/templates/istio-gateway.yaml b/charts/nopo11y-stack/templates/istio-gateway.yaml index 816054a..bf06ce7 100644 --- a/charts/nopo11y-stack/templates/istio-gateway.yaml +++ b/charts/nopo11y-stack/templates/istio-gateway.yaml @@ -20,7 +20,7 @@ spec: {{- else }} number: 80 name: http - protocol: HTTP + protocol: HTTP2 {{- end }} hosts: {{- if .Values.nopo11y_ingress.host }} @@ -33,5 +33,19 @@ spec: mode: SIMPLE credentialName: {{ $.Release.Name }}-{{ $.Release.Namespace }}-tls-secret {{- end }} + {{- if .Values.nopo11y_ingress.tls.enabled }} + - port: + number: 80 + name: http + protocol: HTTP2 + hosts: + {{- if .Values.nopo11y_ingress.host }} + - {{ .Values.nopo11y_ingress.host |quote }} + {{- else }} + - "*" + {{- end }} + tls: + httpsRedirect: true + {{- end }} {{- end }} {{- end }}