Skip to content

Commit

Permalink
Use all addresses for configuring k8s agents
Browse files Browse the repository at this point in the history
  • Loading branch information
wallyworld authored and manadart committed Apr 5, 2020
1 parent 1a5d4af commit 990a98c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions state/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,14 @@ func (st *State) apiHostPortsForCAAS(public bool) (addresses []network.SpaceHost
}

// select public address.
publicAddr, _ := addrs.OneMatchingScope(network.ScopeMatchPublic)
if public {
addr, _ := addrs.OneMatchingScope(network.ScopeMatchPublic)
return addrsToHostPorts(addr), nil
return addrsToHostPorts(publicAddr), nil
}
// select internal address.
return addrsToHostPorts(addrs.AllMatchingScope(network.ScopeMatchCloudLocal)...), nil

// TODO(wallyworld) - for now, return all addresses for agents to try, public last
result := addrsToHostPorts(addrs.AllMatchingScope(network.ScopeMatchCloudLocal)...)
return append(result, addrsToHostPorts(publicAddr)...), nil
}

// apiHostPortsForKey returns API addresses extracted from the document
Expand Down

0 comments on commit 990a98c

Please sign in to comment.