Skip to content

Commit 6b29436

Browse files
committed
Check and remove PreferNoSchedule taint from nodes after rolling update
1 parent 9edf670 commit 6b29436

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pkg/controller/deployment_rolling.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,19 @@ func (dc *controller) rolloutRolling(ctx context.Context, d *v1alpha1.MachineDep
114114
return err
115115
}
116116
}
117+
// This check is needed because sometimes we can backtrack on a deployment, and this taint can stick
118+
// See https://github.com/gardener/machine-controller-manager/issues/989 for more details
119+
if err = dc.removeTaintNodesBackingMachineSet(
120+
ctx,
121+
newIS,
122+
&v1.Taint{
123+
Key: PreferNoScheduleKey,
124+
Value: "True",
125+
Effect: "PreferNoSchedule",
126+
},
127+
); err != nil {
128+
klog.Warningf("Failed to remove taint %s from all nodes. Error: %s", PreferNoScheduleKey, err)
129+
}
117130
if err := dc.cleanupMachineDeployment(ctx, oldISs, d); err != nil {
118131
return err
119132
}

0 commit comments

Comments
 (0)