-
Notifications
You must be signed in to change notification settings - Fork 613
Add paused annotation for MachineHealthCheck #1046
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,12 @@ import ( | |
| "k8s.io/apimachinery/pkg/util/intstr" | ||
| ) | ||
|
|
||
| const ( | ||
| // PausedAnnotation is an annotation that can be applied to MachineHealthCheck objects to prevent the MHC controller | ||
| // from processing it. | ||
| MHCPausedAnnotation = "cluster.x-k8s.io/paused" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is the machine health check controller an upstream controller or downstream one? I thought it was a downstream controller that watched
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The machinehealthcheck is a fork of the upstream controller which is currently feature paired. We do have our own CRDs but they match the upstream identically at the moment. The paused feature is something we picked from their implementation and we decided, to avoid potential future discrepancies between OCP and HyperShift, to keep the same annotation. This was shipped in 4.9 and so I don't think we want to make a change to this now, though I appreciate based on our prior conversations about API compatibility that we should have made this a first class field when we backported it |
||
| ) | ||
|
|
||
| // RemediationStrategyType contains remediation strategy type | ||
| type RemediationStrategyType string | ||
|
|
||
|
|
||
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.
Do we want to call this
MHCPausedAnnotation? I know it's only used for MHC at the moment but that does restrict us in the future if we wanted to use this elsewhere, WDYT?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 named it
MHCPausedAnnotationbecause no other Machine API components support paused state, a more generic name can be confusing now.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 guess in the future we can rename it to something more generic, but we will have to keep this constant around, deprecate it, etc. I'm fine with this for now so long as API folks are