mirror of https://github.com/linkerd/linkerd2.git
Fix multicluster for EKS (#5159)
`linkerd mc link` wasn't properly setting the `gatewayAddresses` field when such address had a `Hostname` field instead of `Ip`, like is the case in EKS services of type LoadBalancer.
This commit is contained in:
parent
4c106e9c08
commit
ee085f7ae8
|
@ -617,7 +617,14 @@ func newLinkCommand() *cobra.Command {
|
|||
|
||||
gatewayAddresses := []string{}
|
||||
for _, ingress := range gateway.Status.LoadBalancer.Ingress {
|
||||
gatewayAddresses = append(gatewayAddresses, ingress.IP)
|
||||
addr := ingress.IP
|
||||
if addr == "" {
|
||||
addr = ingress.Hostname
|
||||
}
|
||||
if addr == "" {
|
||||
continue
|
||||
}
|
||||
gatewayAddresses = append(gatewayAddresses, addr)
|
||||
}
|
||||
if len(gatewayAddresses) == 0 {
|
||||
return fmt.Errorf("Gateway %s.%s has no ingress addresses", gateway.Name, gateway.Namespace)
|
||||
|
|
Loading…
Reference in New Issue