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

add new source for istio virtual services #1607

Merged
merged 1 commit into from
Jul 1, 2020

Conversation

tariq1890
Copy link
Contributor

@tariq1890 tariq1890 commented May 28, 2020

Raising this PR since we would really love to test this feature out in our Istio setup. I have seen that there is a lot of request for this PR to be merged.

This is a dup of #1358. Thanks to @devkid and @elsesiy for their efforts in creating this

Closes #1340
Closes #1358

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 28, 2020
@tariq1890
Copy link
Contributor Author

Not sure if the failures are related to this PR.

@sheerun I believe the ticker is being triggered twice and because of that, we are sending to a closed channel which causes the panic in source_test.go

@elsesiy
Copy link
Contributor

elsesiy commented May 29, 2020

@tariq1890 This is a dup of #1358. I didn't open another PR myself because @devkid did most of the work already..

@sheerun
Copy link
Contributor

sheerun commented May 29, 2020

@tariq1890 Could you try to fix this test?

@tariq1890
Copy link
Contributor Author

@elsesiy If you see that PR thread, I had followed up and I hadn't heard back in 10 days.

He will be added as a co-author of this PR of course

@elsesiy
Copy link
Contributor

elsesiy commented May 29, 2020

@tariq1890 Sure I understand. Why don’t you preserve the commits from the original PR?

@tariq1890
Copy link
Contributor Author

I usually squash my commit history and like to keep it clean that way. Plus it was easier making the changes manually instead of git rebasing as a lot of changes have been made since that PR was created

@tariq1890 tariq1890 force-pushed the add_vs branch 2 times, most recently from 9b2e3dc to 0176a7a Compare May 29, 2020 17:48
@elsesiy
Copy link
Contributor

elsesiy commented May 29, 2020

That's fine but in my opinion you should add everybody who contributed code to this as co-author then :)

@tariq1890
Copy link
Contributor Author

@elsesiy Done!

@tariq1890
Copy link
Contributor Author

@thomasv314 Requesting you to test this PR on your clusters. It would be good to confirm if istio client-go works as expected :)

@thomasv314
Copy link
Contributor

@tariq1890 if i have bandwidth today i will give it a go on our development cluster

@tariq1890
Copy link
Contributor Author

@njuettner @Raffo Requesting your review on this.

@tariq1890
Copy link
Contributor Author

@thomasv314 Were you able to test this?

Copy link
Contributor

@Raffo Raffo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a few comments, I'm definitely not a istio expert, but the changes do look good.

Is there anything that we can do to validate this, for example by testing it in prod @thomasv314 ?

source/source_test.go Outdated Show resolved Hide resolved
},
)

// TODO informer is not explicitly stopped since controller is not passing in its channel.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What can we do to fix that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another copy pasta from the existing gateway source. Unfortunately, I haven't looked into this too much. I can tackle this is another PR if that's okay with you

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha, works.

source/virtualservice.go Show resolved Hide resolved
source/virtualservice.go Show resolved Hide resolved
source/virtualservice.go Outdated Show resolved Hide resolved
@Raffo
Copy link
Contributor

Raffo commented Jun 24, 2020

@tariq1890 are you able to address the comments?

@tariq1890
Copy link
Contributor Author

@Raffo Thanks for the follow-up. I have addressed your comments.

@tariq1890
Copy link
Contributor Author

ping ping @njuettner @Raffo

I have tested this in my development cluster and can confirm that it works

@tariq1890
Copy link
Contributor Author

@steerben Have you tested this branch?

@Raffo
Copy link
Contributor

Raffo commented Jun 28, 2020

If we can get an additional +1 from @steerben or anyone else I'm gonna approve for merge.

@steerben
Copy link

steerben commented Jun 29, 2020

I will give it a run again this evening and will respond! @tariq1890 @Raffo

@steerben
Copy link

Hey!

I got some issues:

Build went through but tests failed in the docker build:
ok sigs.k8s.io/external-dns/registry 0.060s --- FAIL: TestIngress (10.75s) --- FAIL: TestIngress/Endpoints (10.71s) --- FAIL: TestIngress/Endpoints/template_for_ingress_if_host_is_missing (10.02s) ingress_test.go:1038: Error Trace: ingress_test.go:1038 Error: Received unexpected error: timed out waiting for the condition Test: TestIngress/Endpoints/template_for_ingress_if_host_is_missing FAIL FAIL sigs.k8s.io/external-dns/source 50.725s FAIL make: *** [Makefile:41: test] Error 1

Furthermore I only used istio-virtualservice as source which is not allowed in the current implementation. I got an error from the initial flag parsing, I think this has to be adjusted since it has not been altered in your PR yet your adjusted istio.md doc file states that only one of gateway or virtualservice can be chosen.

Fix has to be made in types.go (pkg/api/externaldns) line 304

I fixed that on my end and it set the DNS entries corrrectly.

Co-authored-by: Alfred Krohmer <alfred.krohmer@logmein.com>
Co-authored-by: Jonas-Taha El Sesiy <github@elsesiy.com>
@tariq1890
Copy link
Contributor Author

tariq1890 commented Jun 29, 2020

@steerben Thank you so much for trying this out! I have fixed the flag issues, but I was not able to replicate those test failures. They seem to be running fine in and out of the docker context.

@tariq1890
Copy link
Contributor Author

@steerben @thomasv314 Would one of you be able to sign off on this?

@steerben
Copy link

Fine for me. :)
Thanks for the update.

@Raffo
Copy link
Contributor

Raffo commented Jul 1, 2020

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 1, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Raffo, tariq1890

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 1, 2020
@k8s-ci-robot k8s-ci-robot merged commit a11414f into kubernetes-sigs:master Jul 1, 2020
@tariq1890 tariq1890 deleted the add_vs branch August 10, 2020 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Discussion] Support for istio VirtualService as source
8 participants