From da0fc1a09dbb1c323f912f2771d0958965792f01 Mon Sep 17 00:00:00 2001 From: Lorenz Holland Date: Fri, 27 Mar 2026 14:43:29 +0100 Subject: [PATCH] Cleanup of original comment, as it is no longer accurate --- plugin/impl/eviction.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/plugin/impl/eviction.go b/plugin/impl/eviction.go index 0e5e9aa3..67d2dc73 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{