Merge pull request #90439 from SataQiu/dual-stack-node-cidr-20200424

Dual-stack: make nodeipam compatible with existing single-stack clusters when dual-stack feature gate become enabled by default
This commit is contained in:
Kubernetes Prow Robot 2020-09-10 19:34:14 -07:00 committed by GitHub
commit 56b9a69d39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -157,13 +157,13 @@ func startNodeIpamController(ctx ControllerContext) (http.Handler, bool, error)
}
var nodeCIDRMaskSizeIPv4, nodeCIDRMaskSizeIPv6 int
if utilfeature.DefaultFeatureGate.Enabled(features.IPv6DualStack) {
if dualStack {
// only --node-cidr-mask-size-ipv4 and --node-cidr-mask-size-ipv6 supported with dual stack clusters.
// --node-cidr-mask-size flag is incompatible with dual stack clusters.
nodeCIDRMaskSizeIPv4, nodeCIDRMaskSizeIPv6, err = setNodeCIDRMaskSizesDualStack(ctx.ComponentConfig.NodeIPAMController)
} else {
// only --node-cidr-mask-size supported with single stack clusters.
// --node-cidr-mask-size-ipv4 and --node-cidr-mask-size-ipv6 flags are incompatible with dual stack clusters.
// --node-cidr-mask-size-ipv4 and --node-cidr-mask-size-ipv6 flags are incompatible with single stack clusters.
nodeCIDRMaskSizeIPv4, nodeCIDRMaskSizeIPv6, err = setNodeCIDRMaskSizes(ctx.ComponentConfig.NodeIPAMController)
}