-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
🐛 Clarify cluster paused and skipping remediation steps #10817
🐛 Clarify cluster paused and skipping remediation steps #10817
Conversation
- A cluster or a machine is usually paused automatically by Cluster API when it detects a migration. | ||
- Users can skip remediation for a specific machine by setting the `cluster.x-k8s.io/skip-remediation` annotation on it. | ||
- Paused Machines (Machines with the `cluster.x-k8s.io/paused` annotation) are not considered for remediation. | ||
- If a specific MHC resource is paused (using `cluster.x-k8s.io/paused` annotation), it will stop to remediate the corresponding target machines. |
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.
- If a specific MHC resource is paused (using `cluster.x-k8s.io/paused` annotation), it will stop to remediate the corresponding target machines. | |
- If a specific MachineHealthCheck resource is paused (using `cluster.x-k8s.io/paused` annotation), it will stop to remediate the corresponding target machines. |
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.
Updated.
- Users can skip remediation for a specific machine by setting the `cluster.x-k8s.io/skip-remediation` annotation on it. | ||
- Paused Machines (Machines with the `cluster.x-k8s.io/paused` annotation) are not considered for remediation. | ||
- If a specific MHC resource is paused (using `cluster.x-k8s.io/paused` annotation), it will stop to remediate the corresponding target machines. | ||
- If the Cluster is paused (using the `cluster.x-k8s.io/paused` annotation or by setting `cluster.spec.paused` to true), all the MHC resources belonging to the Cluster will be implicitly paused, and thus stop remediating target machines. |
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.
- If the Cluster is paused (using the `cluster.x-k8s.io/paused` annotation or by setting `cluster.spec.paused` to true), all the MHC resources belonging to the Cluster will be implicitly paused, and thus stop remediating target machines. | |
- If the Cluster is paused (using the `cluster.x-k8s.io/paused` annotation or by setting `cluster.spec.paused` to `true`), all the MachineHealthCheck resources belonging to the Cluster will be implicitly paused, and thus stop remediating target machines. |
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.
Updated.
b1b1dda
to
a350b75
Compare
@chrischdi Added your suggested changes, let me know if you have any other suggestions. Thanks! |
@@ -209,15 +209,14 @@ This is useful for dynamically scaling clusters where the number of machines kee | |||
|
|||
## Skipping Remediation | |||
|
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.
I would suggest to further simplify this to
There are scenarios where remediation for a machine may be undesirable (eg. during cluster migration using `clusterctl move`). For such cases, MachineHealthCheck skips marking a Machine for remediation if:
- the Machine has the `cluster.x-k8s.io/skip-remediation` annotation
- the Machine has the `cluster.x-k8s.io/paused` annotation
- the MachineHealthCheck has the `cluster.x-k8s.io/paused` annotation
- the Cluster has `.spec.paused` set to `true`
Just a lot easier to parse in my opinion
(I didn't find any evidence of handling of the cluster.x-k8s.io/paused
annotation on clusters, please let me know if I missed it. I think the same was written in the issue: #9026 (comment))
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.
@sbueringer I agree, this is more readable.
I think cluster.x-k8s.io/paused
is being handled similar to other annotation.
a350b75
to
335d46f
Compare
lgtm |
Thank you!! /lgtm |
LGTM label has been added. Git tree hash: 969b0b13b8599d51acab3190fb0fec9f1dbd6e4b
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer 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 |
Fixes #9026