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

📖 Improve docs for manager.Options.SyncPeriod #1232

Merged
merged 3 commits into from
Mar 3, 2021

Conversation

dlipovetsky
Copy link
Contributor

The comment tries to capture more of the thoughts exchanged in #88.

It explains why a period sync happens. It also addresses two (common?) reasons for making the period shorter, and recommends an alternative.

The current comment includes this warning: "Change this value only if you know what you are doing." I found this unsatisfying, and wanted to add more context to the comment. I'm not an authority on the behavior/history of SyncPeriod, and I welcome feedback 🙂.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 29, 2020
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 29, 2020
The comment tries to capture more of the thoughts exchanged in
kubernetes-sigs#88.
@dlipovetsky
Copy link
Contributor Author

(Updated for clarity and force-pushed)

//
// If you want
// 1. to insure against missed watch events, or
// 2. to poll services that cannot be watched,
Copy link
Contributor

Choose a reason for hiding this comment

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

Depending on the use case, this can be better served by a channel watch and a background goroutine, but that's definitely the more advanced version :)

pkg/manager/manager.go Show resolved Hide resolved
pkg/manager/manager.go Outdated Show resolved Hide resolved
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 28, 2021
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 27, 2021
@joejulian
Copy link
Contributor

joejulian commented Feb 27, 2021

@gerred @shawn-hurley @joelanford @alvaroaleman Can this get an approval please?

@alvaroaleman
Copy link
Member

@joejulian
Copy link
Contributor

Ah, I see. I'm not used to PR's being held up by comments marked as nits. My mistake.

dlipovetsky and others added 2 commits March 2, 2021 21:22
Co-authored-by: Joe Julian <me@joejulian.name>
Co-authored-by: Joe Julian <me@joejulian.name>
@dlipovetsky
Copy link
Contributor Author

Thanks addressing the feedback @joejulian!

/retest

Copy link
Member

@alvaroaleman alvaroaleman left a comment

Choose a reason for hiding this comment

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

/label tide/merge-method-squash
/lgtm
/approve

thank you!

@k8s-ci-robot k8s-ci-robot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Mar 3, 2021
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 3, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alvaroaleman, dlipovetsky, joejulian

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 Mar 3, 2021
@k8s-ci-robot k8s-ci-robot merged commit eaf06ce into kubernetes-sigs:master Mar 3, 2021
RainbowMango pushed a commit to RainbowMango/controller-runtime that referenced this pull request Sep 1, 2021
* Improve docs for manager.Options.SyncPeriod

The comment tries to capture more of the thoughts exchanged in
kubernetes-sigs#88.

* Note that  SyncPeriod applies to all controllers.

Co-authored-by: Joe Julian <me@joejulian.name>

* Make explanation of SyncPeriod more precise..

Co-authored-by: Joe Julian <me@joejulian.name>

Co-authored-by: Joe Julian <me@joejulian.name>
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. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants