Skip to content

Fix re-taint in bootstrap-only mode when annotation fails#208

Open
rawadhossain wants to merge 1 commit intokubernetes-sigs:mainfrom
rawadhossain:bootstrap-annotation
Open

Fix re-taint in bootstrap-only mode when annotation fails#208
rawadhossain wants to merge 1 commit intokubernetes-sigs:mainfrom
rawadhossain:bootstrap-annotation

Conversation

@rawadhossain
Copy link
Copy Markdown

Description

Fixes an issue where nodes can get re-tainted in bootstrap-only mode if the bootstrap completion annotation fails to be written.

Currently, the controller removes the taint but doesn’t record completion if the annotation write fails. This can cause the controller to treat the node as incomplete and reapply the taint on later reconciles.

To fix this:

  • made sure errors from the annotation write aren’t ignored
  • kept NodeEvaluation in sync even if the annotation step fails
  • skipped nodes that are already marked as bootstrap-completed during rule reconciliation

This keeps bootstrap-only behavior consistent after the first successful taint removal.

Related Issue

Fixes #207

Type of Change

/kind bug
/kind cleanup

Testing

  • Added tests to cover:
    • annotation patch failure after taint removal
    • skipping evaluation when bootstrap is already completed
  • Ran:
    • make test
    • make lint

Checklist

  • make test passes
  • make lint passes

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels May 4, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 4, 2026

Deploy Preview for node-readiness-controller canceled.

Name Link
🔨 Latest commit 5c40403
🔍 Latest deploy log https://app.netlify.com/projects/node-readiness-controller/deploys/69fb13271fb5670008855b12

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found here.

Details 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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 4, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @rawadhossain. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 4, 2026
@ajaysundark ajaysundark requested review from Karthik-K-N and ajaysundark and removed request for dchen1107 and haircommander May 4, 2026 20:34
@ajaysundark
Copy link
Copy Markdown
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 4, 2026
Signed-off-by: Rawad Hossain <rawad.hossain00@gmail.com>
@rawadhossain rawadhossain force-pushed the bootstrap-annotation branch from 889ea19 to 5c40403 Compare May 6, 2026 10:08
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bootstrap-only mode may reapply taint if bootstrap annotation fails

3 participants