Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently there is no support to watch multiple namespaces due to a limitation in the client-go library. The informers doesn't support a list of namespaces due to which you can either watch one or all namespaces. With the evolution of multi-tenancy, heterogeneous deployments for example: Virtual Service and Gateway deployed on different namespaces is a very common use case.
Because of the above mentioned limitation, it's not possible to achieve the heterogeneous deployment scenario's. You can check this issue for one such failed scenario(kubernetes-sigs#2911).
With this PR, the GW sources are fetched by watching the gateway namespace instead of the virtualservice namespace.
Tested for both namespace and cluster scoped deployed on EKS with Route53.
To add more context to this PR, currently the gateway targets are fetched via the service metadata fetched as part of the informers watching the namespace where virtual services are deployed. This works well when both the virtual service and gateway resource are deployed in the same namespace but would fail if the gateway is deployed in another namespace. This PR fixes this problem by fetching the gateway targets directly from the gateway resource namespace.
Fixes kubernetes-sigs#2911
Checklist
Unit tests updatedEnd user documentation updated