From 8bfe7f8daef007e3eb40ebf21a70517ab8881d40 Mon Sep 17 00:00:00 2001 From: Robert Pothier Date: Wed, 18 Apr 2018 16:01:46 -0400 Subject: [PATCH] Update comments and UT to remove /66 restriction The comments in cmd/kubeadm/app/phases/controlplane/manifests.go mention the IPv6 /66 restriction, and the UT also refers to this. This restriction was removed in PR#60089 --- cmd/kubeadm/app/phases/controlplane/manifests.go | 3 --- .../app/phases/controlplane/manifests_test.go | 15 ++++++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/cmd/kubeadm/app/phases/controlplane/manifests.go b/cmd/kubeadm/app/phases/controlplane/manifests.go index 1019660ba4d..467bab5709e 100644 --- a/cmd/kubeadm/app/phases/controlplane/manifests.go +++ b/cmd/kubeadm/app/phases/controlplane/manifests.go @@ -275,9 +275,6 @@ func getAPIServerCommand(cfg *kubeadmapi.MasterConfiguration) []string { // If the pod network size is /113 or larger, the node CIDR will be set to the same // size and this will be rejected later in validation. // -// NOTE: Currently, the pod network must be /66 or larger. It is not reflected here, -// but a smaller value will fail later validation. -// // NOTE: Currently, the design allows a maximum of 64K nodes. This algorithm splits // the available bits to maximize the number used for nodes, but still have the node // CIDR be a multiple of eight. diff --git a/cmd/kubeadm/app/phases/controlplane/manifests_test.go b/cmd/kubeadm/app/phases/controlplane/manifests_test.go index e36dc708acc..0d43c23cada 100644 --- a/cmd/kubeadm/app/phases/controlplane/manifests_test.go +++ b/cmd/kubeadm/app/phases/controlplane/manifests_test.go @@ -822,16 +822,21 @@ func TestCalcNodeCidrSize(t *testing.T) { podSubnet: "2001:db8::/95", expectedPrefix: "104", }, - { - name: "V6: Largest subnet currently supported", - podSubnet: "2001:db8::/66", - expectedPrefix: "80", - }, { name: "V6: For /64 pod net, use /80", podSubnet: "2001:db8::/64", expectedPrefix: "80", }, + { + name: "V6: For /48 pod net, use /64", + podSubnet: "2001:db8::/48", + expectedPrefix: "64", + }, + { + name: "V6: For /32 pod net, use /48", + podSubnet: "2001:db8::/32", + expectedPrefix: "48", + }, } for _, test := range tests { actualPrefix := calcNodeCidrSize(test.podSubnet)