From f46412f37a50a2d2b2b0e50dfde71e5f1f5e0d7e 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 a16c99a4529e..e0c81a4be379 100644 --- a/cluster-autoscaler/core/static_autoscaler.go +++ b/cluster-autoscaler/core/static_autoscaler.go @@ -848,7 +848,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