Skip to content

Commit

Permalink
Fix not able schedule an agent to a draining node
Browse files Browse the repository at this point in the history
When draining a node we taint `kubevirt.io/drain=draining:NoSchedule` to the node.
The change allows agent daemon set to be scheduled on draining nodes.

Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
  • Loading branch information
bk201 committed Mar 18, 2022
1 parent 5209beb commit 911af2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/manager/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ func (a *AgentDaemonSet) Create(image string, managerURL string) error {
NodeSelector: a.sbm.getNodeSelector(),
Tolerations: []corev1.Toleration{
{
Key: types.DrainKey,
Value: "scheduling",
Key: types.KubevirtDrainKey,
Operator: corev1.TolerationOpExists,
},
{
Key: corev1.TaintNodeUnschedulable,
Expand Down
2 changes: 1 addition & 1 deletion pkg/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const (

// labels
SupportBundleLabelKey = "rancher/supportbundle"
DrainKey = "kubevirt.io/drain"
KubevirtDrainKey = "kubevirt.io/drain"

SupportBundleManager = "support-bundle-manager"
SupportBundleAgent = "support-bundle-agent"
Expand Down

0 comments on commit 911af2b

Please sign in to comment.