Skip to content

Conversation

@adityathebe
Copy link
Member

resolves: #183

@adityathebe adityathebe requested a review from Copilot September 23, 2025 04:34
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the Kubernetes Node health check functionality by implementing a comprehensive condition evaluation system. The changes replace the previous simplistic approach with a proper mapping of node conditions to their expected states and severity levels.

  • Introduces a structured ConditionExpectation system to map node conditions to expected states and health severities
  • Replaces the previous ad-hoc condition checking with a comprehensive lookup table covering standard Kubernetes conditions and vendor-specific conditions
  • Improves the health determination logic to properly handle multiple conditions and their priorities

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
pkg/health/testdata/Kubernetes/Node/etcd-is-voter.yaml Adds test data for a Kubernetes node with etcd voter condition to validate the new health check logic
pkg/health/health_node.go Implements structured condition expectations mapping and refactors health evaluation logic with proper condition handling

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@moshloop moshloop merged commit d8b151f into main Sep 29, 2025
3 checks passed
@moshloop moshloop deleted the fix/is-healthy-node branch September 29, 2025 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kubernetes Node mislabelled as warning and wrong status

3 participants