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
Adds Support for Node Resource IPv6 Addressing #45551
Conversation
fyi: @Spindel , IPv6 related. |
This change in isolation looks OK to me, but I worry a lot about everything else, since many things use the node address through the API. If this change is made, and the node has only an IPv6 address, can it register itself with the apiserver using that IPv6 address? Obviously we need IPv6 support everywhere in Kube, and adding it in small pieces is a good thing, but we need to figure out what the failure cases are so they don't bite people unawares over the next couple releases while v6 gets added. |
@dcbw thanks for checking out my PR. I agree that we must be sensitive to breaking functionality while adding IPv6. I'm open to guidance from you and others on the best approach to adding IPv6 functionality while preserving stability. As you mentioned, myself and several others are working on small PR's to add IPv6 instead of one massive PR. Should these small IPv6 PR's be labeled and sit in a queue until they can be collectively tested for e2e functionality?
It's my understanding that this PR will allow a node to register itself with the apiserver using an IPv6 address. This is my understanding:
Prior to this PR, only an IPv4 address could be set for |
/release-note-none |
@pmorie thank you for the review. I have not written a proposal for this change. I was anticipating writing a proposal for changes such as multiple pod ip's that effect the api design, but not for low-level functionality such as this. I understand this change can impact dependent services. In this change, I maintain backwards compatibility and continue to prefer v4 over v6. I will look closer at expanding unit tests for this change and would appreciate any guidance on expanding integration/e2e tests. However, I will work on a design proposal if it's required for the PR to get merged. |
/area ipv6 |
ae190a2
to
6e0fe10
Compare
pkg/kubelet/kubelet.go
Outdated
case kl.nodeIP.To16() != nil: | ||
hostDNS = []string{"::1"} | ||
hostSearch = []string{"."} | ||
default: |
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.
It looks some of the conditional logic got munged here:
Seems like this should be:
if kl.resolverConfig == "" {
switch {
...
case kl.nodeIP.To16() != nil:
...
}
} else {
hostSearch = kl.formDNSSearchForDNSDefault(hostSearch, pod)
}
pkg/kubelet/kubelet_node_status.go
Outdated
// Honor IP limitations set in setNodeStatus() | ||
if kl.nodeIP.IsLoopback() { | ||
if nodeIP.IsLoopback() { |
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.
probably should preserve at the top before the other checks:
if kl.nodeIP.To4() == nil && kl.nodeIP.To6() == nil {
return fmt.Errorf("nodeIP must be a valid IP address")
}
|
/test pull-kubernetes-unit |
Adds support for the following: 1. A node resource to be assigned an IPv6 address. 2. Expands IPv4/v6 address validation checks. Which issue this PR fixes: fixes kubernetes#44848 in combination with PR kubernetes#45116 Special notes for your reviewer: Release note: With this PR, nodes can be assigned an IPv6 address. An IPv4 address is preferred over an IPv6 address. IP address validation has been expanded to check for multicast, link-local and unspecified addresses.
@thockin anything needed to get this PR merged? We need this for IPv6 alpha support in 1.9. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danehans, dcbw, MrHohn, pmichali, thockin Associated issue: 44848 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/retest Review the full test history for this PR. |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
This PR adds support for the following:
Which issue this PR fixes:
Fixes Issue #44848 (in combination with PR #45116).
Special notes for your reviewer:
This PR is part of a larger effort, Issue #1443 to add IPv6 support to k8s.
Release note: