Unverified Commit 7ff49c99 authored by k8s-ci-robot's avatar k8s-ci-robot Committed by GitHub

Merge pull request #71126 from rosti/warn-api-bind-override

kubeadm: Warn on API server bind address override
parents 4e9c2a7a b46fbbc4
...@@ -19,6 +19,7 @@ package config ...@@ -19,6 +19,7 @@ package config
import ( import (
"io/ioutil" "io/ioutil"
"net" "net"
"reflect"
"strings" "strings"
"github.com/pkg/errors" "github.com/pkg/errors"
...@@ -175,5 +176,8 @@ func ChooseAPIServerBindAddress(bindAddress net.IP) (net.IP, error) { ...@@ -175,5 +176,8 @@ func ChooseAPIServerBindAddress(bindAddress net.IP) (net.IP, error) {
} }
return nil, err return nil, err
} }
if bindAddress != nil && !bindAddress.IsUnspecified() && !reflect.DeepEqual(ip, bindAddress) {
klog.Warningf("WARNING: overriding requested API server bind address: requested %q, actual %q", bindAddress, ip)
}
return ip, nil return ip, nil
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment