I just realized that externalNames are no longer allowed by default in Traefik 2.0 so I added allowExternalNameServices: true
and allowEmptyServices: true
as mentioned here, I ran helm upgrade using my values files with both parameters and I can see that the helm chart has the new values in place but I continue seeing in the logs:
time="2021-09-03T03:14:08Z" level=error msg="externalName services not allowed: devops/dev-canales-esvc" providerName=kubernetescrd ingress=dev-canales-ingress-route-tls namespace=devops
This is how the configuration looks in my helm chart:
providers:
kubernetesCRD:
allowEmptyServices: true
allowExternalNameServices: true
enabled: true
ingressClass: stg-traefik
namespaces: []
throttleDuration: 10s
kubernetesIngress:
allowEmptyServices: true
allowExternalNameServices: true
enabled: true
ingressClass: stg-traefik-ing
namespaces: []
publishedService:
enabled: false
What could be causing the problem?
I tried also using the flag --providers.kubernetescrd.allowexternalnameservices=true as mentioned [here](https://doc.traefik.io/traefik/providers/kubernetes-crd/#allowexternalnameservices) but it didn't work, it seems to be an issue with
Traefik v2.5.2`, I had to roll back my edge router to version 2.4.9 which doesn't disable externalName, any help is highly appreciated.
helm upgrade stg-traefik traefik/traefik -f stg-values.yaml --namespace stg-traefik-ingress --set providers.kubernetescrd.allowexternalnameservices=true
`
Hello @lungosta
Thanks for your interest in Traefik!
It seems that this option is not configurable right now with the Helm chart, as there is an open PR for that: https://github.com/traefik/traefik-helm-chart/pull/463.
Thus, as per this comment on PR #457, did you tried this:
additionalArguments:
- "--providers.kubernetesingress.allowemptyservices=true"
- "--providers.kubernetesingress.allowexternalnameservices=true"
- "--providers.kubernetescrd.allowemptyservices=true"
- "--providers.kubernetescrd.allowexternalnameservices=true"
Hi @rtribotte thanks for your prompt answer, it didn't work either, I guess we will need to wait for someone to fix the helm chart, for now I continue working with v2.4.9.
I appreciate your help here.
both:
additionalArguments:
- "--providers.kubernetesingress.allowemptyservices=true"
- "--providers.kubernetesingress.allowexternalnameservices=true"
- "--providers.kubernetescrd.allowemptyservices=true"
- "--providers.kubernetescrd.allowexternalnameservices=true"
and
providers:
kubernetesCRD:
allowCrossNamespace: false
allowEmptyServices: true
allowExternalNameServices: true
enabled: true
namespaces: []
kubernetesIngress:
allowEmptyServices: true
allowExternalNameServices: true
enabled: true
namespaces: []
publishedService:
enabled: false
Still produce:
externalName services not allowed: myns/myservice" providerName=kubernetescrd
MAGIC! I just deleted helm release and dropped all CRDs for Traefik and then reinstalled it. Now it works
1 Like