-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add IPv6 unittests for cluster setup #698
Conversation
@@ -81,7 +81,7 @@ func kubelet(snap snap.Snap, hostname string, nodeIP net.IP, clusterDNS string, | |||
args["--cluster-domain"] = clusterDomain | |||
} | |||
if nodeIP != nil && !nodeIP.IsLoopback() { | |||
args["--node-ip"] = utils.ToIPString(nodeIP) | |||
args["--node-ip"] = nodeIP.String() |
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.
drive-by fix: brackets around the IPv6 are only required/accepted if combined with a port.
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.
Maybe we need to document this somewhere. I personally totally forgot about out brackets convention.
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.
This is not our convention but the actual IP standard.
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.
Thanks a lot @bschimke95! Left some minor comments.
key string | ||
expectedVal string | ||
}{ | ||
{key: "--advertise-address", expectedVal: "2001:db8::"}, |
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.
nit: Maybe we can extract these IP strings.
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.
this test validates that the --advertise-address
flag is configured with the IP string that we expect. I don't think it makes sense to have this as an IP object just to stringify it later in the test.
Or do I misunderstand your comment?
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.
No no I mean that we could have variables for these IPs that we pass to both setup.KubeAPIServer()
and expectedVal
. It's not really important, ignore this if you don't feel like it.
@@ -81,7 +81,7 @@ func kubelet(snap snap.Snap, hostname string, nodeIP net.IP, clusterDNS string, | |||
args["--cluster-domain"] = clusterDomain | |||
} | |||
if nodeIP != nil && !nodeIP.IsLoopback() { | |||
args["--node-ip"] = utils.ToIPString(nodeIP) | |||
args["--node-ip"] = nodeIP.String() |
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.
Maybe we need to document this somewhere. I personally totally forgot about out brackets convention.
cf185c9
to
c4029e4
Compare
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.
LGTM, we should get this in before #697 since that PR changes some of these setup functions. I can rebase and adjust the unit tests there.
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.
Thanks a lot @bschimke95! LGTM
No description provided.