From d7f34a3a632a0ba5e689309d4cc422959f60ebd2 Mon Sep 17 00:00:00 2001 From: YZ775 Date: Mon, 11 Mar 2024 00:41:19 +0000 Subject: [PATCH] change CKE to proceed rebooting immediately after draining of node is completed --- op/reboot_decide.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/op/reboot_decide.go b/op/reboot_decide.go index 14e0bb7a..9c547d7a 100644 --- a/op/reboot_decide.go +++ b/op/reboot_decide.go @@ -198,10 +198,10 @@ func ChooseDrainedNodes(c *cke.Cluster, apiServers map[string]bool, rqEntries [] } if len(workerInProgress) >= maxConcurrentReboots { return nil - } else if len(workerInProgress)+len(workerDrainable) <= maxConcurrentReboots { - return workerDrainable + } else if len(workerDrainable) > 0 { + return workerDrainable[:1] } else { - return workerDrainable[:maxConcurrentReboots-len(workerInProgress)] + return nil } }