Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control-plane nodes which are marked as schedulable are also given worker role. #985

Merged
merged 1 commit into from
Mar 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cluster-up/cluster/kind/common.sh
Original file line number Diff line number Diff line change
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=""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can break SR-IOV
see please kubevirt/kubevirt#9505 (comment)

fi
done

Expand Down