Skip to content

Commit

Permalink
Support templates in ingress host (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
yahel2410 authored May 28, 2024
1 parent 8308a20 commit f562712
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/localstack/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions charts/localstack/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ spec:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
- {{ tpl . $ | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
- host: {{ tpl .host $ | quote }}
http:
paths:
{{- range .paths }}
Expand Down
9 changes: 9 additions & 0 deletions charts/localstack/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ mountDind:
forceTLS: true


ingressHost: chart-example.local
ingress:
enabled: true
hosts:
- host: "{{ .Values.ingressHost }}"
paths:
- path: /
pathType: ImplementationSpecific

# enable localstack pro (don't forget to set your API key)
# image:
# repository: localstack/localstack-pro
Expand Down

0 comments on commit f562712

Please sign in to comment.