Routing based on hostname with regex / wildcards and priorities / weights #3952
Unanswered
niklaskorz
asked this question in
Q&A
Replies: 1 comment
-
@niklaskorz right now, we don't support any wildcard hostname matching at all for HTTPProxy (see #1228 for more background), but for Ingress and the new Gateway API support, we only support full-label wildcards, as in their spec. We are planning on implementing single-label wildcards for HTTPProxy at some point, which would allow you to do this fallback-style config, I think. The path parts are easy to implement using HTTPProxy or Ingress already, it's just the hostname parts that are tricky. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are currently using Traefik for our staging and review environments.
Our setup looks like this:
example.com
andreview-([a-z0-9-]+).example.com
and has a priority of 30review-{env}.example.com
and have a priority of 40This way, we can have review environments that only spawn some microservices and fallback the staging services for services that aren't deployed in the environment.
For example, if a web frontend service is deployed at
/
in staging and in a review environment calledtest
, but the api service at/api
is only deployed in staging, accessing:review-test.example.com/
routes the request to the review environment web frontendreview-test.example.com/api
routes the request to the staging api serviceWe had a similar setup before using Ambassador which is also based on Envoy, suggesting that this workflow generally works with Envoy.
Can something like this be accomplished with Contour as well?
Beta Was this translation helpful? Give feedback.
All reactions