-
Notifications
You must be signed in to change notification settings - Fork 1.4k
✨ MachineHealthCheck supports checking Machine conditions #12275
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
base: main
Are you sure you want to change the base?
✨ MachineHealthCheck supports checking Machine conditions #12275
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Welcome @justinmir! |
Hi @justinmir. 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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
00e4c09
to
b7b110b
Compare
b7b110b
to
56608f2
Compare
/ok-to-test |
@@ -69,6 +69,14 @@ type MachineHealthCheckSpec struct { | |||
// +kubebuilder:validation:MaxItems=100 | |||
UnhealthyConditions []UnhealthyCondition `json:"unhealthyConditions,omitempty"` | |||
|
|||
// unhealthyMachineConditions contains a list of the machine conditions that determine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently not enough bandwidth for a full review, but a few quick comments already:
- we should only add this to v1beta2
- we have to add this in a few places. I would recommend to rebase on top of main and search for all occurences of "nodeUnhealthyConditions" and check in which places we also need "unhealthyMachineConditions" (it will be in a lot of these cases :))
MachineHealthCheck currently only allows checking Node conditions to validate if a machine is healthy. However, machine conditions capture conditions that do not exist on nodes, for example, control plane node conditions such as EtcdPodHealthy, SchedulerPodHealthy that can indicate if a controlplane machine has been created correctly. Adding support for Machine conditions enables us to perform remediation during control plane upgrades. This PR introduces a new fieldas part of the MachineHealthCheckSpec: - `UnhealthyMachineConditions` This will mirror the behavior of `UnhealthyNodeConditions` but the MachineHealthCheck controller will instead check the machine conditions.
023c191
to
097384d
Compare
/area machinehealthcheck |
PR needs rebase. 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. |
What this PR does / why we need it:
MachineHealthCheck currently only allows checking Node conditions to validate if a machine is healthy. However, machine conditions capture conditions that do not exist on nodes, for example, control plane node conditions such as EtcdPodHealthy, SchedulerPodHealthy that can indicate if a controlplane machine has been created correctly.
Adding support for Machine conditions enables us to perform remediation during control plane upgrades.
This PR introduces a new fieldas part of the MachineHealthCheckSpec:
UnhealthyMachineConditions
This will mirror the behavior of
UnhealthyNodeConditions
but the MachineHealthCheck controller will instead check the machine conditions.Which issue(s) this PR fixes:
Fixes #5450
Label(s) to be applied
/kind feature
/area machinehealthcheck
Notes for Reviewers
We updated the tests to validate the new
MachineHealthCheck
code paths forUnhealthyMachineConditions
in the following ways:UnhealthyNodeConditions
we also specify aUnhealthyMachineConditions
.UnhealthyMachineConditions
field since this is not specified in old APIs.