From 9aa31f3a6556775e67d329f8b3ee64194855d77f Mon Sep 17 00:00:00 2001 From: Damika Gamlath Date: Thu, 7 Mar 2024 08:50:19 +0000 Subject: [PATCH] Remove shadow err variable in deleteCreatedNodesWithErros func --- cluster-autoscaler/core/static_autoscaler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cluster-autoscaler/core/static_autoscaler.go b/cluster-autoscaler/core/static_autoscaler.go index 1b9f0c3100a2..f136a7f85829 100644 --- a/cluster-autoscaler/core/static_autoscaler.go +++ b/cluster-autoscaler/core/static_autoscaler.go @@ -856,7 +856,8 @@ func (a *StaticAutoscaler) deleteCreatedNodesWithErrors() (bool, error) { if nodeGroup == nil { err = fmt.Errorf("node group %s not found", nodeGroupId) } else { - opts, err := nodeGroup.GetOptions(a.NodeGroupDefaults) + var opts *config.NodeGroupAutoscalingOptions + opts, err = nodeGroup.GetOptions(a.NodeGroupDefaults) if err != nil { klog.Warningf("Failed to get node group options for %s: %s", nodeGroupId, err) continue