-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Wildcard Host for Kubernetes Ingress #792
Comments
I suggest you to have a look at the documentation http://docs.traefik.io/basics/#frontends and use the rule |
I can't for the life of me figure out how to select |
There is no way to do this with the kubernetes integration at present. We allow a Path* rule type to be chosen using annotations. The definition of the kubernetes Ingress type is far more restrictive than the config that traefik can support. Would it make sense to look at the host to detect if any regex characters are being used then switch the rule type? Or do we wan't to do something explicit with another annotation? |
I believe the Kubernetes host definition is too strict to allow for many regex characters, so detection of a regex on the host may not really work. Given Kubernetes' strictness, simply detecting the wildcard and converting it to an appropriate regex in Traefik might be sufficient for at least a decent portion of use cases (it'd be sufficient here). It'd have the benefit of also being portable, for those experimenting with multiple Ingress controllers. |
I just stumbled upon this. I think the simple solution is to simply allow the "*" what works in kubernetes to work in Traefik as expected instead of some weird {subdomain:[a-z]+} regex prefix. Also path rules allow to select the type via annotation so the same could be done for the host as well. https://github.com/containous/traefik/blob/master/provider/kubernetes.go#L137 |
Hi, any development with this or working hack? I just realized that I really needs this for my CDN forward proxy because I am using subdomains as client identifiers and I already have * host routed to my app because of this so I cannot have two of these ingresses. I'm not a golang guy but something like:
Although I am not sure how Traefik works internally, maybe wildcards are supported only for subdomains/beginning of the host, in which case the |
Same issue ;( If someone manages to hack it somehow, please post here |
I've prepared an enhancement at #1029 |
How do you create a wildcard host using kubernetes ingress? The following format does not work:
The text was updated successfully, but these errors were encountered: