Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions machine/v1beta1/types_machinehealthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I named it MHCPausedAnnotation because no other Machine API components support paused state, a more generic name can be confusing now.

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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 MachineHealthCheck.machine.openshift.io. If it is a downstream controller and a downstream API, this seems like a good choice for either

  1. a spec field
  2. handling by simply deleting the machinehealthcheck

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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

Expand Down