Skip to content

Latest commit

 

History

History
43 lines (38 loc) · 1.28 KB

machine-health-checks-resource.adoc

File metadata and controls

43 lines (38 loc) · 1.28 KB

Sample MachineHealthCheck resource

The MachineHealthCheck resource resembles the following YAML file:

MachineHealthCheck
apiVersion: machine.openshift.io/v1beta1
kind: MachineHealthCheck
metadata:
  name: example (1)
  namespace: openshift-machine-api
spec:
  selector:
    matchLabels:
      machine.openshift.io/cluster-api-machine-role: <role> (2)
      machine.openshift.io/cluster-api-machine-type: <role> (2)
      machine.openshift.io/cluster-api-machineset: <cluster_name>-<label>-<zone> (3)
  unhealthyConditions:
  - type:    "Ready"
    timeout: "300s"
  - type:    "Ready"
    timeout: "300s"
  maxUnhealthy: "40%" (4)
  1. Specify the name of the MachineHealthCheck to deploy.

  2. Specify a label for the machine pool that you want to check.

  3. Specify the MachineSet to track in <cluster_name>-<label>-<zone> format. For example, prod-node-us-east-1a.

  4. Specify the amount of unhealthy machines allowed in the targeted pool of machines. This can be set as a percentage or an integer.

Note

The matchLabels are examples only; you must map your machine groups based on your specific needs.