diff --git a/plugin/impl/eviction.go b/plugin/impl/eviction.go index 0e5e9aa..67d2dc7 100644 --- a/plugin/impl/eviction.go +++ b/plugin/impl/eviction.go @@ -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{