Skip to content

Commit

Permalink
Support more than one redirect being set on a cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed Apr 11, 2023
1 parent 675bee1 commit 3a4ea7e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions helm-charts/support/templates/redirects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ metadata:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/server-snippet: |
return {{ .code | default 302 }} $scheme://{{ .to }}$request_uri;
name: ingress-redirect
name: ingress-redirect-{{ .from }}
spec:
ingressClassName: nginx
tls:
- hosts:
- {{ .from }}
# .from is a DNS name, but dots aren't allo
secretName: redirect-{{ .from }}-tls
rules:
- host: {{ .from }}
# This object separator is required, as we generate multiple k8s
# objects from this one file.
---
{{ end }}

0 comments on commit 3a4ea7e

Please sign in to comment.