@@ -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`
@@ -172,6 +177,11 @@ type MachineDeploymentTopology struct {
172177 // +optional
173178 Replicas * int32 `json:"replicas,omitempty"`
174179
180+ // MachineHealthCheck allows to enable, disable and override
181+ // the MachineHealthCheck configuration in the ClusterClass for this MachineDeployment.
182+ // +optional
183+ MachineHealthCheck * MachineHealthCheckTopology `json:"machineHealthCheck,omitempty"`
184+
175185 // NodeDrainTimeout is the total amount of time that the controller will spend on draining a node.
176186 // The default value is 0, meaning that the node can be drained without any time limitations.
177187 // NOTE: NodeDrainTimeout is different from `kubectl drain --timeout`
@@ -194,6 +204,25 @@ type MachineDeploymentTopology struct {
194204 Variables * MachineDeploymentVariables `json:"variables,omitempty"`
195205}
196206
207+ // MachineHealthCheckTopology defines a MachineHealthCheck for a group of machines.
208+ type MachineHealthCheckTopology struct {
209+ // Enable controls if a MachineHealthCheck should be created for the target machines.
210+ //
211+ // If false: No MachineHealthCheck will be created.
212+ //
213+ // If not set(default): A MachineHealthCheck will be created if it is defined here or
214+ // in the associated ClusterClass. If no MachineHealthCheck is defined then none will be created.
215+ //
216+ // If true: A MachineHealthCheck is guaranteed to be created. Cluster validation will
217+ // block if `enable` is true and no MachineHealthCheck definition is available.
218+ // +optional
219+ Enable * bool `json:"enable,omitempty"`
220+
221+ // MachineHealthCheckClass defines a MachineHealthCheck for a group of machines.
222+ // If specified (any field is set), it entirely overrides the MachineHealthCheckClass defined in ClusterClass.
223+ MachineHealthCheckClass `json:",inline"`
224+ }
225+
197226// ClusterVariable can be used to customize the Cluster through
198227// patches. It must comply to the corresponding
199228// ClusterClassVariable defined in the ClusterClass.
0 commit comments