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 in the post-flexiflow
sequence, after openshift-cluster-wait-for-bootstrap-complete and
openshift-cluster-transition-to-installation, and before
openshift-cluster-wait-for-install-complete. At this point the cluster
API is up but the install has not yet finished. 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 API is reachable and
ocis authenticated (provided by theopenshift-client-runnercontext and theopenshift-refresh-kubeconfigprerequisite) - 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