traefik-helm-chart
traefik-helm-chart copied to clipboard
fix(rbac): do not create clusterrole for namespace deployment
A namespace scoped deployment should not create cluster scoped rbac.
@ChandonPierre Thanks. You found an interesting way for rbac namespaced.
Would you please add test and some documentation in values.yaml ?
@ChandonPierre Thanks. You found an interesting way for rbac namespaced.
Would you please add test and some documentation in values.yaml ?
Updated!
This PR only works with traefik v3.0.0. Please update your if statements and your tests accordingly by adding something like:
{{- if semverCompare "<3.0.0-0" (include "imageVersion" $) }}
Yes, you are correct. Updated to use the previous behavior on Traefik V2, and disable ingressclass lookup/ClusterRole when Traefik V3 and namespaced
@ChandonPierre In its current form, this PR will be breaking for v3 users, using spec.ingressClassname with rbac.namespaced
enabled. They will be forced to add annotations.
Wdyt about:
- Introducing this new
provider.kubernetesIngress.disableIngressClassLookup
in values for v3 users - When both
provider.kubernetesIngress.disableIngressClassLookup
andrbac.namespaced
are set, then it won't generateClusterRole
@ChandonPierre In its current form, this PR will be breaking for v3 users, using spec.ingressClassname with
rbac.namespaced
enabled. They will be forced to add annotations.Wdyt about:
- Introducing this new
provider.kubernetesIngress.disableIngressClassLookup
in values for v3 users- When both
provider.kubernetesIngress.disableIngressClassLookup
andrbac.namespaced
are set, then it won't generateClusterRole
I would argue the previous behvaior was a bug, or at the very least, a misnomer.
But I agree not regressing existing functionality. Updated PR with the suggested behavior.