From 4e0c2ff8c5198544e43aafd69fc46e3af94a5e0b Mon Sep 17 00:00:00 2001 From: Kubernetes Prow Robot Date: Thu, 1 Oct 2020 02:30:54 -0700 Subject: [PATCH] Merge pull request #3570 from towca/jtuznik/scale-down-after-delete-fix Remove ScaleDownNodeDeleted status since we no longer delete nodes synchronously --- cluster-autoscaler/core/static_autoscaler.go | 2 +- .../processors/status/scale_down_status_processor.go | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cluster-autoscaler/core/static_autoscaler.go b/cluster-autoscaler/core/static_autoscaler.go index dd3e6b6e6ca7..c6fa9342b219 100644 --- a/cluster-autoscaler/core/static_autoscaler.go +++ b/cluster-autoscaler/core/static_autoscaler.go @@ -516,7 +516,7 @@ func (a *StaticAutoscaler) RunOnce(currentTime time.Time) errors.AutoscalerError scaleDownStatus.RemovedNodeGroups = removedNodeGroups - if scaleDownStatus.Result == status.ScaleDownNodeDeleted { + if scaleDownStatus.Result == status.ScaleDownNodeDeleteStarted { a.lastScaleDownDeleteTime = currentTime a.clusterStateRegistry.Recalculate() } diff --git a/cluster-autoscaler/processors/status/scale_down_status_processor.go b/cluster-autoscaler/processors/status/scale_down_status_processor.go index 789cbc256acf..abb5b886bd47 100644 --- a/cluster-autoscaler/processors/status/scale_down_status_processor.go +++ b/cluster-autoscaler/processors/status/scale_down_status_processor.go @@ -88,8 +88,6 @@ const ( ScaleDownNoUnneeded // ScaleDownNoNodeDeleted - unneeded nodes present but not available for deletion. ScaleDownNoNodeDeleted - // ScaleDownNodeDeleted - a node was deleted. - ScaleDownNodeDeleted // ScaleDownNodeDeleteStarted - a node deletion process was started. ScaleDownNodeDeleteStarted // ScaleDownNotTried - the scale down wasn't even attempted, e.g. an autoscaling iteration was skipped, or