File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
cmd/kubeadm/app/phases/controlplane Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -315,11 +315,8 @@ func getControllerManagerCommand(cfg *kubeadmapi.ClusterConfiguration) []string
315
315
// Let the controller-manager allocate Node CIDRs for the Pod network.
316
316
// Each node will get a subspace of the address CIDR provided with --pod-network-cidr.
317
317
if cfg .Networking .PodSubnet != "" {
318
- // TODO(Arvinderpal): Needs to be fixed once PR #73977 lands. Should be a list of maskSizes.
319
- maskSize := calcNodeCidrSize (cfg .Networking .PodSubnet )
320
318
defaultArguments ["allocate-node-cidrs" ] = "true"
321
319
defaultArguments ["cluster-cidr" ] = cfg .Networking .PodSubnet
322
- defaultArguments ["node-cidr-mask-size" ] = maskSize
323
320
if cfg .Networking .ServiceSubnet != "" {
324
321
defaultArguments ["service-cluster-ip-range" ] = cfg .Networking .ServiceSubnet
325
322
}
@@ -329,6 +326,10 @@ func getControllerManagerCommand(cfg *kubeadmapi.ClusterConfiguration) []string
329
326
// Note: The user still retains the ability to explicitly set feature-gates and that value will overwrite this base value.
330
327
if enabled , present := cfg .FeatureGates [features .IPv6DualStack ]; present {
331
328
defaultArguments ["feature-gates" ] = fmt .Sprintf ("%s=%t" , features .IPv6DualStack , enabled )
329
+ } else if cfg .Networking .PodSubnet != "" {
330
+ // TODO(Arvinderpal): Needs to be fixed once PR #73977 lands. Should be a list of maskSizes.
331
+ maskSize := calcNodeCidrSize (cfg .Networking .PodSubnet )
332
+ defaultArguments ["node-cidr-mask-size" ] = maskSize
332
333
}
333
334
334
335
command := []string {"kube-controller-manager" }
You can’t perform that action at this time.
0 commit comments