Skip to content

chore: improve logging and error reporting across controllers, webhoooks , and the condition reporter - #323

Open
Nachiket-Roy wants to merge 1 commit into
kubernetes-sigs:mainfrom
Nachiket-Roy:improve-logging-and-debugging
Open

chore: improve logging and error reporting across controllers, webhoooks , and the condition reporter#323
Nachiket-Roy wants to merge 1 commit into
kubernetes-sigs:mainfrom
Nachiket-Roy:improve-logging-and-debugging

Conversation

@Nachiket-Roy

Copy link
Copy Markdown

Description

This PR improves observability in the node-readiness-controller by adding logging for several failure paths that were previously silent, while avoiding excessive log noise in hot code paths.

Changes

  • Log unhealthy health check results and successful node condition updates in the readiness condition reporter.
  • Log label selector parsing errors in the validating webhook instead of silently treating them as overlapping.
  • Log Kubernetes API errors in isBootstrapCompleted to make bootstrap-related failures easier to diagnose.
  • Validate node selectors when caching rules and log invalid selectors once.
  • Downgrade selector parsing logs in ruleAppliesTo to a verbose log level to avoid flooding logs during reconciliation.

Type of Change

/kind cleanup

Checklist

  • make test
  • make lint

Does this PR introduce a user-facing change?

Improved logging for node readiness health checks, selector validation, and controller error paths to make debugging and operational troubleshooting easier.

…ks, and the condition reporter

Signed-off-by: Nachiket Roy <nachiket.roy.2@gmail.com>
@kubernetes-prow kubernetes-prow Bot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Jul 24, 2026
@netlify

netlify Bot commented Jul 24, 2026

Copy link
Copy Markdown

Deploy Preview for node-readiness-controller canceled.

Name Link
🔨 Latest commit b27dbcb
🔍 Latest deploy log https://app.netlify.com/projects/node-readiness-controller/deploys/6a63a0889d8dc400085fea8b

@kubernetes-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Nachiket-Roy
Once this PR has been reviewed and has the lgtm label, please assign dchen1107 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

@kubernetes-prow kubernetes-prow Bot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 24, 2026
@kubernetes-prow

Copy link
Copy Markdown

Welcome @Nachiket-Roy!

It looks like this is your first PR to kubernetes-sigs/node-readiness-controller 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/node-readiness-controller has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@kubernetes-prow kubernetes-prow Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 24, 2026
@kubernetes-prow

Copy link
Copy Markdown

Hi @Nachiket-Roy. 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.

@kubernetes-prow kubernetes-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 24, 2026
@Nachiket-Roy Nachiket-Roy changed the title chore: improve logging and error reporting across controllers, webhoo… chore: improve logging and error reporting across controllers, webhoooks , and the condition reporter Jul 24, 2026
@ajaysundark

Copy link
Copy Markdown
Contributor

/ok-to-test

@kubernetes-prow kubernetes-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 29, 2026
@kubernetes-prow

Copy link
Copy Markdown

@Nachiket-Roy: The following test 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-node-readiness-controller-lint b27dbcb link true /test pull-node-readiness-controller-lint

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.

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

@kubernetes-prow kubernetes-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 19, 2026
@kubernetes-prow

Copy link
Copy Markdown

PR needs rebase.

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.

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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants