Skip to content
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

Added fix for istio gateway and vs heterogenous deployment #6

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

rahtr
Copy link
Member

@rahtr rahtr commented Aug 1, 2023

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.

This PR also introduces an optional aws-prefer-cname flag which forces cname record creation.

Fixes kubernetes-sigs#2911

Checklist

  • Unit tests updated
  • End user documentation updated

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5732526282

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.005%) to 69.933%

Files with Coverage Reduction New Missed Lines %
source/openshift_route.go 1 75.6%
Totals Coverage Status
Change from base Build 5718867630: -0.005%
Covered Lines: 13979
Relevant Lines: 19989

💛 - Coveralls

@azun azun merged commit fc05690 into adobe:master Aug 3, 2023
7 of 8 checks passed
@legal90
Copy link

legal90 commented Aug 7, 2023

@rahtr Thank you for fixing this issue!
Would you mind to send a similar PR to the upstream repo https://github.com/kubernetes-sigs/external-dns ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

External-DNS is unable to compute VirtualService's endpoint
4 participants