-
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
Validate pod CIDR and service CIDR #695
Conversation
5de2c0e
to
4ad35aa
Compare
b3ef7f3
to
b70219f
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.
Wonderful job @eaudetcobello! Thanks a lot. Left some minor comments.
src/k8s/cmd/k8s/k8s_bootstrap.go
Outdated
} | ||
|
||
// Check CIDR size | ||
// Ref: https://documentation.ubuntu.com/canonical-kubernetes/latest/snap/howto/networking/dualstack/#cidr-size-limitations |
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.
/64 is too large for the Service CIDR: Using a /64 CIDR for services may cause issues like failure to initialize the IPv6 allocator.
This makes me feel that the problem might not only be with the IPv6 but that IPv6 problem is just an example, WDYT? Do we need to change the docs or check for IPv4 here as well?
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.
That is a limitation of the Kubernetes controller. I understand your point, but IMHO we should describe the limitation for a user (-> use smaller CIDR size) as they normally don't care about the internals of some Kubernetes controller.
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.
Did some tests with @berkayoz and we will be going with /108. Cluster fails to bootstrap at /64 and /96.
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 check should be done on the server side (in the bootstrap hook) otherwise you'd need to implement this for every client.
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.
looking good - couple of comments
1141072
to
27d2359
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.
Thanks a lot @eaudetcobello! Left some minor comments.
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, great work @eaudetcobello
please resolve the conflicts then this is good to merge |
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, thanks a lot @eaudetcobello!
We should verify that the user provides valid CIDRs when bootstrapping the cluster.
This PR adds validation at bootstrap-time.
The Pod CIDR and Service CIDR do not overlap
Are within Kubernetes CIDR limitations
Examples
bootstrap-config:
bootstrap-config: