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

lease controller: add lease renew policies #124535

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

linxiulei
Copy link
Contributor

Lease renew policies can be used to specify how the lease renew interval is decided.

The default and previous policy is using a fixed renew interval, which updates lease for every 1/4 nodeLeaseDurationSeconds or renewInterval provided in NewController().

A new policy is added in this commit to have dynamic renew intervals, which starts with 1/2 nodeLeaseDurationSeconds and decreases 50% of previous interval for next retry. It decreases up to 3 times and reset the interval back to the initial.

What type of PR is this?

/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #123178

Special notes for your reviewer:

Does this PR introduce a user-facing change?

TODO

Lease renew policies can be used to specify how the lease renew interval
is decided.

The default and previous policy is using a fixed renew interval, which
updates lease for every 1/4 `nodeLeaseDurationSeconds` or
`renewInterval` provided in NewController().

A new policy is added in this commit to have dynamic renew intervals,
which starts with 1/2 `nodeLeaseDurationSeconds` and decreases 50%
of previous interval for next retry. It decreases up to 3 times and
reset the interval back to the initial.

Signed-off-by: Eric Lin <exlin@google.com>
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Apr 25, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: linxiulei
Once this PR has been reviewed and has the lgtm label, please assign deads2k, klueska for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 area/kubelet sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/node Categorizes an issue or PR as relevant to SIG Node. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 25, 2024
@k8s-ci-robot
Copy link
Contributor

@linxiulei: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-unit 0c4fb7b link true /test pull-kubernetes-unit
pull-kubernetes-verify 0c4fb7b link true /test pull-kubernetes-verify

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@bart0sh bart0sh added this to Triage in SIG Node PR Triage Apr 27, 2024
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 30, 2024
@cici37
Copy link
Contributor

cici37 commented Apr 30, 2024

/cc @wojtek-t @SergeyKanzhelev

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 30, 2024
@bart0sh
Copy link
Contributor

bart0sh commented May 7, 2024

@linxiulei Thank you for the PR. Please, rebase it and fix CI test failures, thanks.

@bart0sh bart0sh moved this from Triage to Waiting on Author in SIG Node PR Triage May 7, 2024
@bart0sh
Copy link
Contributor

bart0sh commented May 7, 2024

/cc

@k8s-ci-robot k8s-ci-robot requested a review from bart0sh May 7, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/node Categorizes an issue or PR as relevant to SIG Node. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
SIG Node PR Triage
Waiting on Author
Development

Successfully merging this pull request may close these issues.

Dynamic node lease renew interval
4 participants