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

Allow configuring a cache sync timeout #1219

Closed
alvaroaleman opened this issue Oct 17, 2020 · 5 comments · Fixed by #1247
Closed

Allow configuring a cache sync timeout #1219

alvaroaleman opened this issue Oct 17, 2020 · 5 comments · Fixed by #1247
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Milestone

Comments

@alvaroaleman
Copy link
Member

alvaroaleman commented Oct 17, 2020

Currently when a cache can not be synced (for example due to misconfigured rbac) the Controller will just block indefinitely/until the binary gets stopped:

if err := syncingSource.WaitForSync(ctx); err != nil {

As an author of controllers I want to configure a timeout for this and want my Controller to error out if its unable to sync its caches within this timeout.

@vincepri
Copy link
Member

/help
/milestone v0.7.x

@k8s-ci-robot
Copy link
Contributor

@vincepri:
This request has been marked as needing help from a contributor.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/help
/milestone v0.7.x

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.

@k8s-ci-robot k8s-ci-robot added this to the v0.7.x milestone Oct 19, 2020
@k8s-ci-robot k8s-ci-robot added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Oct 19, 2020
@varshaprasad96
Copy link
Member

varshaprasad96 commented Oct 29, 2020

Hi @alvaroaleman , I would like to work on this issue. Would the implementation be to:

  • Wrap WaitForSync to pass a Context with a timeout so that the ctx is cancelled when WaitForCacheSync is called.
  • include a Timeout variable in the controller which falls back to a default value if not set by the user.

Is this the right approach for the implementation?

@alvaroaleman
Copy link
Member Author

@varshaprasad96 yes, that sounds exactly right

@varshaprasad96
Copy link
Member

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants