-
Notifications
You must be signed in to change notification settings - Fork 40.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Prepare for deprecating NodeLegacyHostIP #36095
[RFC] Prepare for deprecating NodeLegacyHostIP #36095
Conversation
Jenkins unit/integration failed for commit 73743d6. Full PR test history. The magic incantation to run this job again is |
func findExternalAddress(node *api.Node) (string, error) { | ||
var fallback string | ||
// findAddress returns address in this order: ExternalIP, InternalIP, LegacyHostIP. | ||
func findAddress(node *api.Node) (string, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use GetPreferredNodeAddress(node, []{externalIP, internalIP, legacyHostIP})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. PTAL. Thanks.
73743d6
to
1fe68b2
Compare
preferredAddressTypes := []api.NodeAddressType{ | ||
api.NodeExternalIP, | ||
api.NodeInternalIP, | ||
api.NodeLegacyHostIP, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would like someone familiar with the tunneling setup to comment... @mikedanese / @cjcullen? we weren't using NodeInternalIP for tunneling before... is that valid? I think the point of tunneling is that the master isn't on the same network, so internal IP is not likely to work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. We can't use an internal IP for tunneling.
1fe68b2
to
42c03a8
Compare
42c03a8
to
10b95b5
Compare
@@ -354,14 +355,18 @@ type nodeAddressProvider struct { | |||
} | |||
|
|||
func (n nodeAddressProvider) externalAddresses() (addresses []string, err error) { | |||
preferredAddressTypes := []api.NodeAddressType{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I misunderstood the tunneling healthz. The tunneling shouldn't use the InternalIP.
Now the changes to this file do not change any logic. The only change is reusing the utility function in pkg/util/node.
@liggitt do you agree with the cloudprovider changes? |
@@ -408,7 +408,11 @@ func (i *Instances) NodeAddresses(nodeName types.NodeName) ([]api.NodeAddress, e | |||
glog.V(2).Infof("NodeAddresses(%v) => %v", serverName, ip) | |||
|
|||
// net.ParseIP().String() is to maintain compatibility with the old code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parse to string once, assign multiple times
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thanks.
I think so. If a cloudprovider doesn't differentiate between internal/external, it makes sense to register it for both |
10b95b5
to
f3c096e
Compare
|
LGTM otherwise |
Mark NodeLegacyHostIP will be deprecated in 1.7; Let cloudprovider that used to only set NodeLegacyHostIP set the IP as both InternalIP and ExternalIP, to allow dprecation in 1.7
Thanks! Applying the label per comment. |
Jenkins verification failed for commit f3c096e2723ebe820661815dfa8f4024ae997db5. Full PR test history. The magic incantation to run this job again is |
f3c096e
to
783af94
Compare
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue |
Automatic merge from submit-queue (batch tested with PRs 50537, 49699, 50160, 49025, 50205) When not using a CloudProvider, set both InternalIP and ExternalIP on Nodes #36095 changed all of the cloudproviders to set both InternalIP and ExternalIP on Nodes, but the non-cloudprovider fallback code now only sets InternalIP. This causes the test "should be able to create a functioning NodePort service" in test/e2e/service.go to fail on cloud-provider-less clusters, because (with LegacyHostIP gone), it now will only try to work with ExternalIPs, and will fail if the node has only an InternalIP. There isn't much other code that assumes that ExternalIP will always be set (there's something in pkg/master/master.go, but I don't know what it's doing, so maybe it's only useful in the case where InternalIP != ExternalIP anyway). But given that several of the cloudproviders (mesos, ovirt, rackspace) now explicitly set both InternalIP and ExternalIP to the same value always, it seemed right to do that in the fallback case too. @deads2k FYI **Release note**: ```release-note NONE ```
Ref #9267 (comment)
What this PR does
@liggitt @justinsb @bgrant0607
This change is