feat(deployment): add traefikVersion toggle for v2/v3#6292
Draft
theosanderson-agent wants to merge 1 commit intomainfrom
Draft
feat(deployment): add traefikVersion toggle for v2/v3#6292theosanderson-agent wants to merge 1 commit intomainfrom
theosanderson-agent wants to merge 1 commit intomainfrom
Conversation
Adds a `traefikVersion` Helm value (default: 2) that controls the
apiVersion used for Traefik Middleware CRDs. When set to 2, the chart
uses `traefik.containo.us/v1alpha1` (Traefik v2). When set to 3, it
uses `traefik.io/v1alpha1` (Traefik v3).
Also swaps the keycloak ingress path from `/{+}` to `/` with
`pathType: Prefix`. The `/{+}` syntax causes 404s with Traefik v3;
`/` achieves the same catch-all behavior without Traefik-specific
path syntax and works on both versions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
This PR may be related to: #6014 (Support traefik v3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
traefikVersionHelm value (default2) that selects the Middleware CRDapiVersiongroup used by the chart:traefikVersion: 2→traefik.containo.us/v1alpha1(Traefik v2, unchanged default)traefikVersion: 3→traefik.io/v1alpha1(Traefik v3)The templates compute a single
$traefikApiVersionvariable via a ternary on the value, and everyMiddlewareresource intemplates/ingressroute.yamlandtemplates/lapis-ingress.yaml(compression, redirect-to-https, basic-auth, noindex-robots-header, redirect-www, cors-all-origins, strip-*-prefix, redirect-slash) renders with that group.values.schema.jsondeclarestraefikVersionas an integer withenum: [2, 3].While in the area, this also changes the keycloak ingress path from
/{+}to/withpathType: Prefix. The/{+}syntax causes 404s under Traefik v3;/achieves the same catch-all behavior using standard Ingress path semantics and works identically under v2.This lets existing v2 deployments stay on their current defaults and lets operators migrate to Traefik v3 by flipping a single value — no chart fork or template patching required.
Test plan
helm lint kubernetes/loculus -f kubernetes/loculus/values.yamlpasseshelm template kubernetes/loculus --set traefikVersion=2emits onlytraefik.containo.us/v1alpha1for Middleware resourceshelm template kubernetes/loculus --set traefikVersion=3emits onlytraefik.io/v1alpha1for Middleware resourcestraefikVersion: 3— same/no longer 404s on v3)2or3fortraefikVersion🤖 Generated with Claude Code
🚀 Preview: Add
previewlabel to enable