Skip to content

Commit

Permalink
default ipv6 subnet to /56
Browse files Browse the repository at this point in the history
we were defaulting IPv6 subnet to a /64, this was working because
kubeadm was calculating and modifying directly the node-cidr-mask,
so the controller manager does not complain.

Kubeadm should only validate that the config is correct and fail
in case of error, this behavior will be changed soon, but once
this happen it will break kind default deployment.
  • Loading branch information
Antonio Ojea committed Oct 20, 2020
1 parent c9b98b3 commit 60074a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pkg/apis/config/v1alpha4/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ func SetDefaultsCluster(obj *Cluster) {
if obj.Networking.PodSubnet == "" {
obj.Networking.PodSubnet = "10.244.0.0/16"
if obj.Networking.IPFamily == "ipv6" {
obj.Networking.PodSubnet = "fd00:10:244::/64"
// node-mask cidr default is /64 so we need a larger subnet, we use /56 following best practices
// xref: https://www.ripe.net/publications/docs/ripe-690#4--size-of-end-user-prefix-assignment---48---56-or-something-else-
obj.Networking.PodSubnet = "fd00:10:244::/56"
}
}
// default the service CIDR using a different subnet than kubeadm default
Expand Down
4 changes: 3 additions & 1 deletion pkg/internal/apis/config/default.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 60074a9

Please sign in to comment.