From a3b457c3bc4cad845ac8c249213e4bc32a7c6cda Mon Sep 17 00:00:00 2001 From: yahel Date: Mon, 27 May 2024 13:26:29 +0300 Subject: [PATCH 1/3] Support templates in ingress host --- charts/localstack/templates/ingress.yaml | 6 ++++-- charts/localstack/test-values.yaml | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/charts/localstack/templates/ingress.yaml b/charts/localstack/templates/ingress.yaml index b7cae6f..285c29b 100644 --- a/charts/localstack/templates/ingress.yaml +++ b/charts/localstack/templates/ingress.yaml @@ -26,15 +26,17 @@ spec: tls: {{- range .Values.ingress.tls }} - hosts: + {{- $base := . }} {{- range .hosts }} - - {{ . | quote }} + - {{ tpl . $base | quote }} {{- end }} secretName: {{ .secretName }} {{- end }} {{- end }} rules: + {{- $base := . }} {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} + - host: {{ tpl .host $base | quote }} http: paths: {{- range .paths }} diff --git a/charts/localstack/test-values.yaml b/charts/localstack/test-values.yaml index e4c73c1..87e5bb1 100644 --- a/charts/localstack/test-values.yaml +++ b/charts/localstack/test-values.yaml @@ -20,6 +20,12 @@ mountDind: forceTLS: true +ingressHost: chart-example.local +ingress: + enabled: true + hosts: + - host: {{ .Values.ingressHost }} + # enable localstack pro (don't forget to set your API key) # image: # repository: localstack/localstack-pro From c5510d9c42873865b8144d3efee64cd84ca99b21 Mon Sep 17 00:00:00 2001 From: yahel Date: Tue, 28 May 2024 12:06:43 +0300 Subject: [PATCH 2/3] PR #121 fixes --- charts/localstack/templates/ingress.yaml | 6 ++---- charts/localstack/test-values.yaml | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/charts/localstack/templates/ingress.yaml b/charts/localstack/templates/ingress.yaml index 285c29b..da46633 100644 --- a/charts/localstack/templates/ingress.yaml +++ b/charts/localstack/templates/ingress.yaml @@ -26,17 +26,15 @@ spec: tls: {{- range .Values.ingress.tls }} - hosts: - {{- $base := . }} {{- range .hosts }} - - {{ tpl . $base | quote }} + - {{ tpl . $ | quote }} {{- end }} secretName: {{ .secretName }} {{- end }} {{- end }} rules: - {{- $base := . }} {{- range .Values.ingress.hosts }} - - host: {{ tpl .host $base | quote }} + - host: {{ tpl .host $ | quote }} http: paths: {{- range .paths }} diff --git a/charts/localstack/test-values.yaml b/charts/localstack/test-values.yaml index 87e5bb1..e1c39c3 100644 --- a/charts/localstack/test-values.yaml +++ b/charts/localstack/test-values.yaml @@ -24,7 +24,7 @@ ingressHost: chart-example.local ingress: enabled: true hosts: - - host: {{ .Values.ingressHost }} + - host: "{{ .Values.ingressHost }}" # enable localstack pro (don't forget to set your API key) # image: From c05aa02858ac60d94dae8d471ca5914a9620842e Mon Sep 17 00:00:00 2001 From: yahel Date: Tue, 28 May 2024 14:01:42 +0300 Subject: [PATCH 3/3] PR #121 fixes 2 --- charts/localstack/templates/NOTES.txt | 2 +- charts/localstack/test-values.yaml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/charts/localstack/templates/NOTES.txt b/charts/localstack/templates/NOTES.txt index 0ec939e..3132aae 100644 --- a/charts/localstack/templates/NOTES.txt +++ b/charts/localstack/templates/NOTES.txt @@ -2,7 +2,7 @@ {{- if .Values.ingress.enabled }} {{- range $host := .Values.ingress.hosts }} {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ (tpl $host.host $) }}{{ .path }} {{- end }} {{- end }} {{- else if contains "NodePort" .Values.service.type }} diff --git a/charts/localstack/test-values.yaml b/charts/localstack/test-values.yaml index e1c39c3..cf5e3be 100644 --- a/charts/localstack/test-values.yaml +++ b/charts/localstack/test-values.yaml @@ -25,6 +25,9 @@ ingress: enabled: true hosts: - host: "{{ .Values.ingressHost }}" + paths: + - path: / + pathType: ImplementationSpecific # enable localstack pro (don't forget to set your API key) # image: