From 1fd417bdb05ce70a5028db8a85ab1d56e7680f3d Mon Sep 17 00:00:00 2001 From: swamyan Date: Fri, 4 Nov 2022 22:07:28 +0530 Subject: [PATCH] fix for providerIDList in managed node pools --- pkg/cloud/services/eks/nodegroup.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkg/cloud/services/eks/nodegroup.go b/pkg/cloud/services/eks/nodegroup.go index a4edbbbd7d..24a052ea32 100644 --- a/pkg/cloud/services/eks/nodegroup.go +++ b/pkg/cloud/services/eks/nodegroup.go @@ -36,7 +36,6 @@ import ( "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/services/wait" "sigs.k8s.io/cluster-api-provider-aws/pkg/record" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" - "sigs.k8s.io/cluster-api/controllers/noderefutil" ) func (s *NodegroupService) describeNodegroup() (*eks.Nodegroup, error) { @@ -573,12 +572,7 @@ func (s *NodegroupService) setStatus(ng *eks.Nodegroup) error { for _, group := range groups.AutoScalingGroups { replicas += int32(len(group.Instances)) for _, instance := range group.Instances { - id, err := noderefutil.NewProviderID(fmt.Sprintf("aws://%s/%s", *instance.AvailabilityZone, *instance.InstanceId)) - if err != nil { - s.Error(err, "couldn't create provider ID for instance", "id", *instance.InstanceId) - continue - } - providerIDList = append(providerIDList, id.String()) + providerIDList = append(providerIDList, fmt.Sprintf("aws:///%s/%s", *instance.AvailabilityZone, *instance.InstanceId)) } } managedPool.Spec.ProviderIDList = providerIDList