Skip to content

openshift-label-machines

Apply compose-expanded openshift/machine-labels to each cluster member via oc label node

This task runs on the cluster coordinator machine after the OpenShift cluster has fully installed. It enumerates all cluster member machines (those with the cluster profile applied and openshift/in-process: true), retrieves the compose-expanded openshift/machine-labels map for each member, and applies the labels to the corresponding OpenShift node using oc label node ... --overwrite.

Requirements

  • Cluster is installed and oc is authenticated (provided by the openshift-client-runner context and the post-install stage)
  • Member machines have their final node names set (DRP machine Name matches the OpenShift node name)

Behaviour

  • Missing openshift/machine-labels: member is skipped silently
  • Node not yet visible: retried 5 times with 10s backoff before logging a warning
  • Failure to apply any label: collected and reported as a task failure

Idempotency

All calls use --overwrite, so the task can be re-run to reconcile labels.

Objects that Reference openshift-label-machines

Objects used by openshift-label-machines