mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #46960 from lukaszo/fedint
Automatic merge from submit-queue Add NodeInternalIP as a fallback to federation api-server nodeport service Previously NodeLegacyHostIP was used as a fallback (see #41243) but in 1.7 it was removed (#44830) Now clusters where nodes have not set ExternalIP can not be used by kubefed to setup federation. cc @shashidharatd ```release-note kubefed will now configure NodeInternalIP as the federation API server endpoint when NodeExternalIP is unavailable for federation API servers exposed as NodePort services ```
This commit is contained in:
commit
ce76bab3b3
@ -496,6 +496,7 @@ func createService(cmdOut io.Writer, clientset client.Interface, namespace, svcN
|
|||||||
func getClusterNodeIPs(clientset client.Interface) ([]string, error) {
|
func getClusterNodeIPs(clientset client.Interface) ([]string, error) {
|
||||||
preferredAddressTypes := []api.NodeAddressType{
|
preferredAddressTypes := []api.NodeAddressType{
|
||||||
api.NodeExternalIP,
|
api.NodeExternalIP,
|
||||||
|
api.NodeInternalIP,
|
||||||
}
|
}
|
||||||
nodeList, err := clientset.Core().Nodes().List(metav1.ListOptions{})
|
nodeList, err := clientset.Core().Nodes().List(metav1.ListOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user