Skip to content

Commit

Permalink
add missing call to fetch autodiscovered nodegroups
Browse files Browse the repository at this point in the history
  • Loading branch information
marwanad committed Mar 24, 2021
1 parent 90bccb0 commit b5c5c50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ func TestNodeGroupForNode(t *testing.T) {

registered := provider.azureManager.RegisterNodeGroup(
newTestScaleSet(provider.azureManager, "test-asg"))
provider.azureManager.explicitlyConfigured["test-asg"] = true
assert.True(t, registered)
assert.Equal(t, len(provider.NodeGroups()), 1)

Expand Down
3 changes: 3 additions & 0 deletions cluster-autoscaler/cloudprovider/azure/azure_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ func (m *AzureManager) Refresh() error {
}

func (m *AzureManager) forceRefresh() error {
if err := m.fetchAutoNodeGroups(); err != nil {
klog.Errorf("Failed to fetch autodiscovered nodegroups: %v", err)
}
if err := m.azureCache.regenerate(); err != nil {
klog.Errorf("Failed to regenerate Azure cache: %v", err)
return err
Expand Down

0 comments on commit b5c5c50

Please sign in to comment.