Open jeremycolin opened 5 years ago
Thanks for describing the issue!
If I get it right the idea is to use path parameter in the backend hostname.
This is possible with a help of template placeholders and a route:
PathSubtree("/api/:buildVersion") ->
setRequestHeader("X-Backend", "https://${buildVersion}-domain.test") ->
setDynamicBackendUrlFromHeader("X-Backend") ->
setPath("/") ->
<dynamic>
Note that setDynamicBackendUrlFromHeader
does not change path, setPath
filter can be used for that.
We may think about adding template placeholder support directly into setDynamicBackend*
filters to avoid auxiliary header.
@jeremycolin can you check if @AlexanderYastrebov got your feature request correctly? thanks!
Is your feature request related to a problem? Please describe.
We have 2 use cases:
custer-test
. Those branches can be accessed withhttps://domain/branches/:buildVersion
iehttps://domain/branches/pr-123
We have a unique skipper route mapping those to a single unique host:
https://domain-branches
.Every branch deployment then exposes its own ingress with the following:
We then have a kubernetes ingress exposing this single unique host but every ingress "filters out" the request if its not its own BUILD_VERSION.
https://engine
We want to be able to route calls such as/api/:buildVersion/
to the correct buildVersion stack. Currently it is not possible to do it at skipper level easily so we have again different ingress (managed by stacksets in this case) with the same logicskipper-predicate, skipper-filter
combo to handle the traffic correctly.Downsides in both cases:
Describe the solution you would like Be able to extract route parameter such as buildVersion in
/api/:buildVersion/...
and target dynamically a backend as a result:https://engine.buildVersion
Describe alternatives you've considered (optional) Already described above with kubernetes ingress and skipper-filter / skipper-predicate
Additional context (optional) I am a Zalando employee and this is for Zalando internal use cases. Can provide more detalled information on our current setup.
Would you like to work on it? No