-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Description
Welcome!
- Yes, I've searched similar issues on GitHub and didn't find any.
- Yes, I've searched similar issues on the Traefik community forum and didn't find any.
What did you do?
https://doc.traefik.io/traefik/providers/kubernetes-crd/#ingressclass
The above document says,
If the parameter is set, only resources containing an annotation with the same value are processed. Otherwise, resources missing the annotation, having an empty value, or the value traefik are processed.
Then, if providers.kubernetesCRD.ingressClass is left empty, it is expected that IngressRoute without ingressClassName annotations will be processed by traefik.
To reproduce,
- Create a IngressRoute without ingressClassName annotations
What did you see instead?
- no route is created in traefik
What version of Traefik are you using?
Version: 2.5.4
Codename: livarot
Go version: go1.17.3
Built: 2021-11-08T17:41:41Z
OS/Arch: linux/arm64
What is your environment & configuration?
- --global.checknewversion
- --entryPoints.metrics.address=:9100/tcp
- --entryPoints.traefik.address=:9000/tcp
- --entryPoints.web.address=:8000/tcp
- --entryPoints.websecure.address=:8443/tcp
- --api.dashboard=true
- --ping=true
- --metrics.prometheus=true
- --metrics.prometheus.entrypoint=metrics
- --providers.kubernetescrd
- --providers.kubernetescrd.allowCrossNamespace=true
- --providers.kubernetescrd.allowExternalNameServices=true
- --providers.kubernetesingress
- --providers.kubernetesingress.ingressendpoint.publishedservice=kube-system/traefik
- --entrypoints.websecure.http.tls=trueI looked for the source code below.
- https://github.com/traefik/traefik/blob/v2.9.8/pkg/provider/kubernetes/crd/kubernetes.go#L1018-L1019
- https://github.com/traefik/traefik/blob/v2.9.8/pkg/provider/kubernetes/ingress/kubernetes.go#L393-L394
It seems that it is implemented so that
If the parameter is set, only resource containing an annotation with the same values are processed. Otherwise, resources containing an annotation with
traefikas the value is processed.
Should the documentation be updated to match the code, or is this an unexpected bug in Traefik that is causing it to behave incorrectly?
If applicable, please paste the log output in DEBUG level
No response