mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Fetch AWS PrivateDNSName for route recon
This commit is contained in:
parent
63cf00d24f
commit
75674e7f4b
@ -62,8 +62,13 @@ func (s *AWSCloud) ListRoutes(clusterName string) ([]*cloudprovider.Route, error
|
||||
continue
|
||||
}
|
||||
|
||||
instance, err := s.getInstanceById(instanceID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
instanceName := orEmpty(instance.PrivateDNSName)
|
||||
routeName := clusterName + "-" + destinationCIDR
|
||||
routes = append(routes, &cloudprovider.Route{routeName, instanceID, destinationCIDR})
|
||||
routes = append(routes, &cloudprovider.Route{routeName, instanceName, destinationCIDR})
|
||||
}
|
||||
|
||||
return routes, nil
|
||||
|
Loading…
Reference in New Issue
Block a user