Skip to content

Commit

Permalink
Merge pull request kubernetes#6892 from Shubham82/cherry-picked-of-#6…
Browse files Browse the repository at this point in the history
…528-upstream-cluster-autoscaler-release-1.28

Backport kubernetes#6528 [CA] Fix expectedToRegister to respect instances with nil status into CA1.28
  • Loading branch information
k8s-ci-robot authored Jun 7, 2024
2 parents 52aafb0 + a400607 commit 0c97874
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cluster-autoscaler/clusterstate/clusterstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ func getNotRegisteredNodes(allNodes []*apiv1.Node, cloudProviderNodeInstances ma
}

func expectedToRegister(instance cloudprovider.Instance) bool {
return instance.Status != nil && instance.Status.State != cloudprovider.InstanceDeleting && instance.Status.ErrorInfo == nil
return instance.Status == nil || (instance.Status.State != cloudprovider.InstanceDeleting && instance.Status.ErrorInfo == nil)
}

// Calculates which of the registered nodes in Kubernetes that do not exist in cloud provider.
Expand Down

0 comments on commit 0c97874

Please sign in to comment.