diff --git a/modules/machine-health-checks-about.adoc b/modules/machine-health-checks-about.adoc index 166774f3c3f7..21384d84e5e8 100644 --- a/modules/machine-health-checks-about.adoc +++ b/modules/machine-health-checks-about.adoc @@ -33,6 +33,19 @@ To limit the disruptive impact of machine deletions, the controller drains and d To stop the check, remove the custom resource. +[id="machine-health-checks-bare-metal_{context}"] +== MachineHealthChecks on Bare Metal + +Machine deletion on bare metal cluster triggers reprovisioning of a bare metal host. +Usually bare metal reprovisioning is a lengthy process, during which the cluster +is missing compute resources and applications might be interrupted. +To change the default remediation process from machine deletion to host power-cycle, +annotate the MachineHealthCheck resource with the +`machine.openshift.io/remediation-strategy: external-baremetal` annotation. + +After you set the annotation, unhealthy machines are power-cycled by using +BMC credentials. + [id="machine-health-checks-limitations_{context}"] == Limitations when deploying machine health checks diff --git a/modules/machine-health-checks-resource.adoc b/modules/machine-health-checks-resource.adoc index 2dd5f90630c8..c45dc1cf5c19 100644 --- a/modules/machine-health-checks-resource.adoc +++ b/modules/machine-health-checks-resource.adoc @@ -7,9 +7,49 @@ [id="machine-health-checks-resource_{context}"] = Sample `MachineHealthCheck` resource -The `MachineHealthCheck` resource resembles the following YAML file: +The `MachineHealthCheck` resource resembles one of the following YAML files: -.`MachineHealthCheck` +.`MachineHealthCheck` for bare metal +[source,yaml] +---- +apiVersion: machine.openshift.io/v1beta1 +kind: MachineHealthCheck +metadata: + name: example <1> + namespace: openshift-machine-api + annotations: + machine.openshift.io/remediation-strategy: external-baremetal <2> +spec: + selector: + matchLabels: + machine.openshift.io/cluster-api-machine-role: <3> + machine.openshift.io/cluster-api-machine-type: <3> + machine.openshift.io/cluster-api-machineset: -