You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from: targetRoutes = append(targetRoutes, pRoute)
to: targetRoutes = append([]*v1alpha3.HTTPRoute{pRoute}, targetRoutes...)
This is because istio selects the first matching entry and since we have default services for the path and are matching headers for feature environments I needed the header matches to be listed first.
Not sure if you want this change as a PR but for now I've built my own image with the change and it is working for us.
The text was updated successfully, but these errors were encountered:
I agree that the default implementation will have issues if a more generalized route is at then top of the list since istio chooses a route by doing sequential match testing.
However, since it's a list, I think appending new routes to the end seems more natural.
I have a proposal for us to have priority routes:
Can we have an optional -number suffix to the route name define in the patch that the operator can use to sort the VS route slice after adding new ones before updating?
In order to support matching based on headers or query params for the same path I had to change line 148 of
https://github.com/monimesl/istio-virtualservice-merger/blob/main/api/v1alpha1/virtualservicemerge_types.go
from:
targetRoutes = append(targetRoutes, pRoute)
to:
targetRoutes = append([]*v1alpha3.HTTPRoute{pRoute}, targetRoutes...)
This is because istio selects the first matching entry and since we have default services for the path and are matching headers for feature environments I needed the header matches to be listed first.
Not sure if you want this change as a PR but for now I've built my own image with the change and it is working for us.
The text was updated successfully, but these errors were encountered: