Skip to content

Commit

Permalink
Control-plane nodes which are marked as schedulable are also given wo…
Browse files Browse the repository at this point in the history
…rker role. (#985)

Signed-off-by: prnaraya <prnaraya@redhat.com>
  • Loading branch information
prnaraya committed Mar 23, 2023
1 parent 58e2672 commit 2e998c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cluster-up/cluster/kind/common.sh
Expand Up @@ -163,13 +163,15 @@ function _get_pods() {
function _fix_node_labels() {
# Due to inconsistent labels and taints state in multi-nodes clusters,
# it is nessecery to remove taint NoSchedule and set role labels manualy:
# Control-plane nodes might lack 'scheduable=true' label and have NoScheduable taint.
# Control-plane nodes might lack 'schedulable=true' label and have NoScheduable taint.
# Control-plane nodes which have 'schedulable=true' should have worker role label
# Worker nodes might lack worker role label.
master_nodes=$(_get_nodes | grep -i $MASTER_NODES_PATTERN | awk '{print $1}')
for node in ${master_nodes[@]}; do
# removing NoSchedule taint if is there
if _kubectl taint nodes $node node-role.kubernetes.io/master:NoSchedule-; then
_kubectl label node $node kubevirt.io/schedulable=true
_kubectl label node $node node-role.kubernetes.io/worker=""
fi
done

Expand Down

0 comments on commit 2e998c2

Please sign in to comment.