Return correct ProviderID format from GetAsgNodes

This matches the way that the [gce does it][1] and fixes issues with the
[cluster state][2].

1: https://github.com/kubernetes/contrib/blob/master/cluster-autoscaler/cloudprovider/gce/gce_manager.go#L247
2: https://github.com/kubernetes/contrib/issues/2228#issuecomment-274896211
This commit is contained in:
Phil Kates 2017-02-06 11:38:34 -08:00
parent 4d9770939d
commit c2cb357e7d
1 changed files with 2 additions and 1 deletions

View File

@ -224,7 +224,8 @@ func (m *AwsManager) GetAsgNodes(asg *Asg) ([]string, error) {
return []string{}, err
}
for _, instance := range group.Instances {
result = append(result, *instance.InstanceId)
result = append(result,
fmt.Sprintf("aws:///%s/%s", *instance.AvailabilityZone, *instance.InstanceId))
}
return result, nil
}