Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions helm-charts/support/templates/redirects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nginx-ingress-redirect-{{ .from }}
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.org/server-snippets: |
rewrite "^\/(?!\.well-known\/acme-challenge)(.*)$" "$scheme://{{ .to }}/$1" {{ .type | default "redirect" }};
spec:
# for nginx-ingress controller
ingressClassName: nginx-ingress
tls:
- hosts:
- {{ .from }}
secretName: redirect-{{ .from }}-tls
rules:
- host: {{ .from }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
# for ingress-nginx controller
name: ingress-redirect-{{ .from }}
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
Expand Down
3 changes: 3 additions & 0 deletions helm-charts/support/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ nginx-ingress:
appprotectdos:
enable: false

# Enable custom config snippets, which we use for rewriting
enableSnippets: true

# Get this ingressClass a different name, so we can co-exist with ingress-nginx
ingressClass:
name: nginx-ingress
Expand Down
Loading