Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 💥 support http redirections and http challenges with cert-manager #934

Merged
merged 6 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions traefik/templates/_podtemplate.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@
{{- $toPort := index $.Values.ports $config.redirectTo }}
- "--entrypoints.{{ $entrypoint }}.http.redirections.entryPoint.to=:{{ $toPort.exposedPort }}"
- "--entrypoints.{{ $entrypoint }}.http.redirections.entryPoint.scheme=https"
- "--entrypoints.{{ $entrypoint }}.http.redirections.entryPoint.priority=10"
{{- end }}
{{- if $config.middlewares }}
- "--entrypoints.{{ $entrypoint }}.http.middlewares={{ join "," $config.middlewares }}"
Expand Down
19 changes: 18 additions & 1 deletion traefik/tests/deployment-config_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,21 @@ tests:
content: "--entrypoints.websecure.http3"
- contains:
path: spec.template.spec.containers[0].args
content: "--entrypoints.websecure.http3.advertisedPort=443"
content: "--entrypoints.websecure.http3.advertisedPort=443"
- it: should have http redirections enabled, when enabled with redirectTo
set:
ports:
web:
redirectTo: websecure
websecure:
exposedPort: 443
asserts:
- contains:
path: spec.template.spec.containers[0].args
content: "--entrypoints.web.http.redirections.entryPoint.to=:443"
- contains:
path: spec.template.spec.containers[0].args
content: "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- contains:
path: spec.template.spec.containers[0].args
content: "--entrypoints.web.http.redirections.entryPoint.priority=10"