Skip to content

Commit

Permalink
Add multiple hosts support in ingress template
Browse files Browse the repository at this point in the history
  • Loading branch information
veloek committed Jan 24, 2024
1 parent 5cb63a3 commit a5837eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 5 additions & 3 deletions helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ metadata:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: {{ .Values.ingress.host }}
{{- range $ingress := .Values.ingress }}
- host: {{ $ingress.host }}
http:
paths:
- backend:
service:
name: {{ include "tevling.fullname" . }}
name: {{ include "tevling.fullname" $ }}
port:
name: {{ .Values.ingress.backend.port }}
name: {{ $ingress.backend.port }}
path: /
pathType: Prefix
{{- end }}
5 changes: 4 additions & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ service:
targetPort: http

ingress:
host: tevling.vtek.no
- host: tevling.com
backend:
port: http
- host: tevling.no
backend:
port: http

Expand Down

0 comments on commit a5837eb

Please sign in to comment.