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
ocis authenticated (provided by theopenshift-client-runnercontext and the post-install stage) - Member machines have their final node names set (DRP machine
Namematches 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¶
- blueprints openshift-cluster-add-nodes in Openshift as part of Tasks (declared)
Objects used by openshift-label-machines¶
- templates openshift-label-machines.sh.tmpl in field Templates[0].ID as value openshift-label-machines.sh.tmpl