-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 dualstack e2e test #8517
🌱 Add dualstack e2e test #8517
Conversation
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.
Q: should this be implemented with ClusterClass? Should the ipv6 test be on ClusterClass?
80385dd
to
d32c5c8
Compare
initConfiguration: | ||
nodeRegistration: | ||
kubeletExtraArgs: | ||
node-ip: "0.0.0.0" # Note: The control plane node should use an ipv6 address as an internalIP. The worker node should use an ipv4 address as an internalIP. |
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.
Kubernetes (kubeadm) doesn't allow setting this field as unspecified - i.e. 0.0.0.0
/ ::
- for dualstack. The compromise here is to mix the nodes between ipv4 and ipv6.
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.
Be careful here kubernetes/kubernetes#116305
There is problem with Dual stack node-ip with external cloud-provider, kubernetes/enhancements#3705
It's fixed in k8s 1.27, added here
Before that, node will only show single IP stack IP with external cloud-provider. Please correct me if I'm wrong @christianang
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.
If I understand the issue correctly - setting this config on Kubelet means that the node object will only ever advertise one node address. Is that roughly right @lubronzhan?
I think, if we need to have explicitly dualstack nodes here, I can remove this flag and patch the node in the docker provider similar to what a cloud provider would do.
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.
Hi @killianmuldoon the issue is only with external cloud-provider. if it's baremetal it's fine. Will you set cloud-provider=external on kubelet when using docker provider? If not setting to external it's probably ok
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.
Yeah I think you both have it covered. As Lubron said it probably depends on if you set cloud-provider to external because in the end both affect the node-ips that are set in the node status.
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
Just wondering if there's something so we could extend the QuickStartSpec
to check if the nodes actually have the dualstack / ips (something like via kubectl get nodes
(of course via client) or so 🤔
LGTM label has been added. Git tree hash: 1d315f6a3fe0d95b713d536a6a64bbebc0f6df75
|
Probably a good idea - we could us a hook like we have in the upgrade test to run this check. Unfortunately though this test doesn't give us dual-stack node IPs, at least not in its current form. It results in mixed IPs - some 6, some 4. |
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.
Overall looks good.
I'm a bit confused why this seems to work while we needed a separate job where we run kind with IPv6 to get the IPv6-only stuff working. But if it just works that's fine, although we should have a follow-up to check if we still need a separate job for IPv6 and if we do figure out why IPv6 only doesn't work while DualStack works.
But maybe it's just that things changed either in kind or in our test framework and the problems we had in the past have been resolved
test/e2e/data/infrastructure-docker/main/cluster-template-dualstack/kcp-dualstack.yaml
Outdated
Show resolved
Hide resolved
test/e2e/data/infrastructure-docker/main/cluster-template-dualstack/cluster-dualstack.yaml
Outdated
Show resolved
Hide resolved
d32c5c8
to
3e61c27
Compare
You could deploy dual stack with different “primary” ip families, where the CIDRs and listen addresses, node-ip, etc are either IPv6 or IPv4. It could be worth testing both families as the “primary” ip family to get additional coverage on if a field can work with both IPv6 or IPv4. Related, it is interesting that you configure the control plane as IPv6 family and the worker as IPv4, which I assume is to get similar coverage as what I’m suggesting above. Probably fine to do and probably gets some of the coverage I’m suggesting above. |
3e61c27
to
ee525fa
Compare
2fb6ede
to
cdf9a42
Compare
9268327
to
7be3410
Compare
@killianmuldoon I did another retry and it's green now. What is the current state of this PR? |
I've got a couple of fixups pending, should be ready for another round later today. |
b3bc55a
to
3325f45
Compare
/retest |
eb9627d
to
26a9598
Compare
test/e2e/data/infrastructure-docker/main/clusterclass-quick-start.yaml
Outdated
Show resolved
Hide resolved
26a9598
to
4451c3e
Compare
Signed-off-by: killianmuldoon <[email protected]>
4451c3e
to
68213cf
Compare
Thank you! /lgtm /assign @fabriziopandini |
LGTM label has been added. Git tree hash: 2795c6f201d9f2b5d7b0ad07c3ccadfe8fd2c106
|
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.
great work!
/lgtm
/approve
@@ -70,7 +70,15 @@ func WithDockerSockMount() KindClusterOption { | |||
// the new kind cluster. | |||
func WithIPv6Family() KindClusterOption { | |||
return kindClusterOptionAdapter(func(k *KindClusterProvider) { | |||
k.ipFamily = clusterv1.IPv6IPFamily | |||
k.ipFamily = clusterv1.DualStackIPFamily |
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.
Can we add a note why are we setting DuaStack for WithIPv6Family
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Adds a dualstack e2e quick start test for CAPI
/area testing