@@ -116,6 +116,11 @@ type ControlPlaneTopology struct {
116116 // +optional
117117 Replicas * int32 `json:"replicas,omitempty"`
118118
119+ // MachineHealthCheck allows to enable, disable and override
120+ // the MachineHealthCheck configuration in the ClusterClass for this control plane.
121+ // +optional
122+ MachineHealthCheck * MachineHealthCheckTopology `json:"machineHealthCheck,omitempty"`
123+
119124 // NodeDrainTimeout is the total amount of time that the controller will spend on draining a node.
120125 // The default value is 0, meaning that the node can be drained without any time limitations.
121126 // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout`
@@ -167,6 +172,11 @@ type MachineDeploymentTopology struct {
167172 // +optional
168173 Replicas * int32 `json:"replicas,omitempty"`
169174
175+ // MachineHealthCheck allows to enable, disable and override
176+ // the MachineHealthCheck configuration in the ClusterClass for this MachineDeployment.
177+ // +optional
178+ MachineHealthCheck * MachineHealthCheckTopology `json:"machineHealthCheck,omitempty"`
179+
170180 // NodeDrainTimeout is the total amount of time that the controller will spend on draining a node.
171181 // The default value is 0, meaning that the node can be drained without any time limitations.
172182 // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout`
@@ -184,6 +194,25 @@ type MachineDeploymentTopology struct {
184194 Variables * MachineDeploymentVariables `json:"variables,omitempty"`
185195}
186196
197+ // MachineHealthCheckTopology defines a MachineHealthCheck for a group of machines.
198+ type MachineHealthCheckTopology struct {
199+ // Enable controls if a MachineHealthCheck should be created for the target machines.
200+ //
201+ // If false: No MachineHealthCheck will be created.
202+ //
203+ // If not set(default): A MachineHealthCheck will be created if it is defined here or
204+ // in the associated ClusterClass. If no MachineHealthCheck is defined then none will be created.
205+ //
206+ // If true: A MachineHealthCheck is guaranteed to be created. Cluster validation will
207+ // block if `enable` is true and no MachineHealthCheck definition is available.
208+ // +optional
209+ Enable * bool `json:"enable,omitempty"`
210+
211+ // MachineHealthCheckClass defines a MachineHealthCheck for a group of machines.
212+ // If specified (any field is set), it entirely overrides the MachineHealthCheckClass defined in ClusterClass.
213+ MachineHealthCheckClass `json:",inline"`
214+ }
215+
187216// ClusterVariable can be used to customize the Cluster through
188217// patches. It must comply to the corresponding
189218// ClusterClassVariable defined in the ClusterClass.
0 commit comments