-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
WorkloadSelector in DestinationRule resulting in route error #49111
Comments
The workload selector in DestinationRule governs where the DestinationRule is applied (in your case it would be limited to only the sidecars for the productpage app) so its likely the traffic is going through a proxy that has no DestinationRule applied and your VirtualService consequently relies on a subset that isn't defined. When you remove the selector in your DestinationRule the subset can then be defined on all proxies and traffic flows as expected. |
https://istio.io/latest/docs/reference/config/networking/destination-rule/#DestinationRule |
"Criteria used to select the specific set of pods/VMs on which this DestinationRule configuration should be applied." (emphasis my own) ref This is the specific verbiage on the field in DestinationRule. It's stating that the field is used to set where the DestinationRules configuration (in your case, the subset) should be applied. It goes on to mention one intended use case which I think helps to explain things: "For example, if specific sidecars need to have egress TLS settings for services outside of the mesh, instead of every sidecar in the mesh needing to have the configuration (which is the default behaviour), a workload selector can be specified." ref I can't speak to exactly why the same field name in different resources has a different effect/behavior but I see how this can be confusing and frustrating. I'd be happy to work with you to improve the clarity of the documentation if you'd like to get some commits in the Istio project or if you just want to leave some suggestions here I can see about updating the documentation myself.. |
Thank you @ilrudie. According to your description, WorkloadSelector in DestinationRule is to specify which pods (request sender) to apply the DR rule. But in ServiceEntry, it is used to specify the endpoints of service. That is to say, WorkloadSelector defines source in DR but destination in SE. It seems very interesting. Is there some special design inside? |
Hi @NaturezzZ, I'm not sure I understand your question. You can look at the envoy config generated by Istio on any of the proxies to confirm whether or not the subset is being configured if that's what you're getting at but I suspect it's not. |
Hi @ilrudie, I add some supplementary explanations in istio/api#3088. Would you mind take a look? Thank you. |
Thanks for adding this @NaturezzZ, I left a few comments/suggestions on the wording of the note but it looks like it'll be a helpful clarification. |
Thanks for polishing @ilrudie 🎉 |
🚧 This issue or pull request has been closed due to not having had activity from an Istio team member since 2024-02-16. If you feel this issue or pull request deserves attention, please reopen the issue. Please see this wiki page for more information. Thank you for your contributions. Created by the issue and PR lifecycle manager. |
Is this the right place to submit this?
Bug Description
My configuration below.
I tried
curl -H"Host:www.example.com" http://1.1.1.1:8080/
and received 503. After I removed the workloadSelector in the DestinationRule, I tried again and received 200.In my configuration, the workloadSelector in DestinationRule shouldn't affect the route correctness of
curl -H"Host:www.example.com" http://1.1.1.1:8080/
. So the behavior above is really confusing for me.Version
Additional Information
No response
The text was updated successfully, but these errors were encountered: