Skip to content

Commit

Permalink
fix: http3 support broken when advertisedPort set
Browse files Browse the repository at this point in the history
  • Loading branch information
davhdavh authored Aug 7, 2023
1 parent 571b36a commit 5015a4d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
7 changes: 3 additions & 4 deletions traefik/templates/_podtemplate.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -595,14 +595,13 @@
- "--experimental.http3=true"
{{- end }}
{{- if semverCompare ">=2.6.0-0" (default $.Chart.AppVersion $.Values.image.tag)}}
{{- if $config.http3.advertisedPort }}
- "--entrypoints.{{ $entrypoint }}.http3.advertisedPort={{ $config.http3.advertisedPort }}"
{{- else }}
- "--entrypoints.{{ $entrypoint }}.http3"
{{- end }}
{{- else }}
- "--entrypoints.{{ $entrypoint }}.enableHTTP3=true"
{{- end }}
{{- if $config.http3.advertisedPort }}
- "--entrypoints.{{ $entrypoint }}.http3.advertisedPort={{ $config.http3.advertisedPort }}"
{{- end }}
{{- end }}
{{- end }}
{{- end }}
Expand Down
14 changes: 14 additions & 0 deletions traefik/tests/deployment-config_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,17 @@ tests:
- equal:
path: metadata.namespace
value: "traefik-ns-override"
- it: should have http3 enabled, when enabled with advertisedPort
set:
ports:
websecure:
http3:
advertisedPort: 443
enabled: true
asserts:
- contains:
path: spec.template.spec.containers[0].args
content: "--entrypoints.websecure.http3"
- contains:
path: spec.template.spec.containers[0].args
content: "--entrypoints.websecure.http3.advertisedPort=443"

0 comments on commit 5015a4d

Please sign in to comment.