Skip to content

Commit

Permalink
Revert "Use cloudProvider.GetInstanceID() to get unregistered nodes"
Browse files Browse the repository at this point in the history
This reverts commit f4ef957.
  • Loading branch information
feiskyer committed Mar 8, 2019
1 parent 2b6087e commit b721438
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cluster-autoscaler/clusterstate/clusterstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ func (csr *ClusterStateRegistry) UpdateNodes(nodes []*apiv1.Node, nodeInfosForGr
if err != nil {
return err
}
notRegistered := getNotRegisteredNodes(csr.cloudProvider, nodes, cloudProviderNodeInstances, currentTime)
notRegistered := getNotRegisteredNodes(nodes, cloudProviderNodeInstances, currentTime)

csr.Lock()
defer csr.Unlock()
Expand Down Expand Up @@ -932,10 +932,10 @@ func getCloudProviderNodeInstances(cloudProvider cloudprovider.CloudProvider) (m
}

// Calculates which of the existing cloud provider nodes are not registered in Kubernetes.
func getNotRegisteredNodes(cloudProvider cloudprovider.CloudProvider, allNodes []*apiv1.Node, cloudProviderNodeInstances map[string][]cloudprovider.Instance, time time.Time) []UnregisteredNode {
func getNotRegisteredNodes(allNodes []*apiv1.Node, cloudProviderNodeInstances map[string][]cloudprovider.Instance, time time.Time) []UnregisteredNode {
registered := sets.NewString()
for _, node := range allNodes {
registered.Insert(cloudProvider.GetInstanceID(node))
registered.Insert(node.Spec.ProviderID)
}
notRegistered := make([]UnregisteredNode, 0)
for _, instances := range cloudProviderNodeInstances {
Expand Down

0 comments on commit b721438

Please sign in to comment.