Skip to content
Draft
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
9 changes: 0 additions & 9 deletions plugin/impl/eviction.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,6 @@ func (e *Eviction) Trigger(params plugin.Parameters) error {
params.Node.Spec.Unschedulable = false
return nil
case Drain:
// original comment:
// The implementation below is technically wrong.
// Just assigning true to Unschedulable does not patch the node object on the api server.
// This done at the end of the reconciliation loop.
// Actively patching within this plugin increases the resource version to increase.
// The increment causes the patch at then end of the reconciliation loop to fail,
// which consistently drops state.
// Assigning true to unschedulable here is a sanity action.
// The user should configure to run the cordon action before running the drain action.
params.Node.Spec.Unschedulable = true
drained, err := common.EnsureDrain(params.Ctx, params.Node, params.Log, common.DrainParameters{
AwaitDeletion: common.WaitParameters{
Expand Down
Loading