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

Delete the cloud node IP annotation if it is stale #112184

Merged

Conversation

danwinship
Copy link
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

If you run "kubelet --cloud-provider X --node-ip Y", kubelet will set an annotation on the node, but previously, if you then ran just "kubelet --cloud-provider X" (or just "kubelet --node-ip Y"), it wouldn't delete the stale annotation. Fix that.

Which issue(s) this PR fixes:

Related to #111695, but does not fix the actual reported bug there.

Does this PR introduce a user-facing change?

Kubelet now cleans up the Node's cloud node IP annotation correctly if you
stop using `--node-ip`. (In particular, this fixes the problem where people who
were unnecessarily using `--node-ip` with an external cloud provider in 1.23,
and then running into problems with 1.24, could not fix the problem by just
removing the unnecessary `--node-ip` from the kubelet arguments, because
that wouldn't remove the annotation that caused the problems.)

/sig network
/sig node
/priority important-soon
cc @mdbooth @thockin

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/node Categorizes an issue or PR as relevant to SIG Node. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 1, 2022
If you run "kubelet --cloud-provider X --node-ip Y", kubelet will set
an annotation on the node, but previously, if you then ran just
"kubelet --cloud-provider X" (or just "kubelet --node-ip Y"), it
wouldn't delete the stale annotation. Fix that.
@danwinship danwinship force-pushed the kubelet-node-ip-annotation-cleanup branch from ddee544 to e23f1a6 Compare September 1, 2022 20:43
@aojea
Copy link
Member

aojea commented Sep 1, 2022

/test pull-kubernetes-integration
weird failures, but look unrelated

@aojea
Copy link
Member

aojea commented Sep 1, 2022

/lgtm

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

/assign @thockin

Copy link
Member

@SergeyKanzhelev SergeyKanzhelev left a comment

Choose a reason for hiding this comment

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

/lgtm
/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 Sep 29, 2022
@SergeyKanzhelev SergeyKanzhelev moved this from Triage to Needs Approver in SIG Node PR Triage Sep 29, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danwinship, mrunalp, SergeyKanzhelev

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 Sep 30, 2022
@mrunalp mrunalp moved this from Needs Approver to Done in SIG Node PR Triage Sep 30, 2022
@k8s-ci-robot k8s-ci-robot merged commit 5bcdc82 into kubernetes:master Sep 30, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.26 milestone Sep 30, 2022
@danwinship danwinship deleted the kubelet-node-ip-annotation-cleanup branch October 3, 2022 19:50
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. area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/network Categorizes an issue or PR as relevant to SIG Network. 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
Development

Successfully merging this pull request may close these issues.

None yet

6 participants