external-dns
external-dns copied to clipboard
Add flag for setting the cache sync timeout
Description
Fixes #2999
Checklist
- [X] Unit tests updated
- [x] End user documentation updated
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: idgenchev / name: Ivan Genchev (a0dcd2fd6e25bf14277a3eaafab5fed8b0712473)
Welcome @idgenchev!
It looks like this is your first PR to kubernetes-sigs/external-dns 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.
You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.
You can also check if kubernetes-sigs/external-dns has its own contribution guidelines.
You may want to refer to our testing guide if you run into trouble with your tests not passing.
If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!
Thank you, and welcome to Kubernetes. :smiley:
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: idgenchev
Once this PR has been reviewed and has the lgtm label, please assign raffo for approval by writing /assign @raffo
in a comment. For more information see:The Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
@idgenchev: PR needs rebase.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Will this change be accepted? We are experiencing the same thing on several of our clusters.
Why you don't pass the TTL by using context.WithValue and have a huge change all over the place?
Why you don't pass the TTL by using context.WithValue and have a huge change all over the place?
Hey Sandor, I do like your suggestion better and I'm happy to pass the value around this way. The reason I didn't use it initially was because it seemed like passing a parameter to the waitForCacheSync
function, which is discouraged in the docs:
Use context Values only for request-scoped data that transits processes and APIs, not for passing optional parameters to functions.
@Raffo @njuettner wdyt? Parameter or context ?
@idgenchev I prefer this to be a parameter, I understand it's a lot of changes, but I like that the signature of the waitForCacheSync
method it's very explicit about the fact that it can get a configurable parameter. If you rebase this PR, I can proceed with its review.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: idgenchev
Once this PR has been reviewed and has the lgtm label, please assign raffo for approval by writing /assign @raffo
in a comment. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
@idgenchev I prefer this to be a parameter, I understand it's a lot of changes, but I like that the signature of the
waitForCacheSync
method it's very explicit about the fact that it can get a configurable parameter. If you rebase this PR, I can proceed with its review.
sgtm, thanks @Raffo!
Hi, I'm Sean and we've run into this problem recently at Datadog which caused some issues for us.
I opened #3209 to solve this before seeing your PR. This PR looks good to me, but I also added a separate flag for configuring dynamic cache timeouts. Could we bring that functionality into this PR, or should I open a second PR against this branch to do so?
Hi, I'm Sean and we've run into this problem recently at Datadog which caused some issues for us.
I opened #3209 to solve this before seeing your PR. This PR looks good to me, but I also added a separate flag for configuring dynamic cache timeouts. Could we bring that functionality into this PR, or should I open a second PR against this branch to do so?
Hey @seanduncandatadog, thanks for pointing this out! It won't take long at all, so I'll add it here :)
Thank you @idgenchev ! I will close #3209 👍
@idgenchev I prefer this to be a parameter, I understand it's a lot of changes, but I like that the signature of the
waitForCacheSync
method it's very explicit about the fact that it can get a configurable parameter. If you rebase this PR, I can proceed with its review.
Hi @Raffo can you please advice if there is anything else outstanding for this PR to be merged? Thanks!
PR needs rebase.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
We are facing the same issue and would be nice to see this PR merged! Thanks
Rebase is required.
I reviewed the code and it looks straight forward, however no feature without test, so I miss the new test.
I would also recommend to have somewhere set a DefaultCacheSyncTimeout and use that const instead of N times 60 * time.Second
. Also great would be in case cache has 0 value to set it to the default, then we don't need to pass everywhere the 60s.
Since there has been no activity on this PR since 6 months, I close it. It's not definitive : anyone needing it can re-open it. /close
@mloiseleur: Closed this PR.
In response to this:
Since there has been no activity on this PR since 6 months, I close it. It's not definitive : anyone needing it can re-open it. /close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.