mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
fix log and annotation :cidr mask size must be <= node mask
This commit is contained in:
parent
868cbd119b
commit
1e0b019062
@ -111,11 +111,11 @@ func NewNodeIpamController(
|
|||||||
// - modify mask to allow flexible masks for IPv4 and IPv6
|
// - modify mask to allow flexible masks for IPv4 and IPv6
|
||||||
// - for alpha status they are the same
|
// - for alpha status they are the same
|
||||||
|
|
||||||
// for each cidr, node mask size must be < cidr mask
|
// for each cidr, cidr mask size must be <= node mask
|
||||||
for _, cidr := range clusterCIDRs {
|
for _, cidr := range clusterCIDRs {
|
||||||
mask := cidr.Mask
|
mask := cidr.Mask
|
||||||
if maskSize, _ := mask.Size(); maskSize > nodeCIDRMaskSize {
|
if maskSize, _ := mask.Size(); maskSize > nodeCIDRMaskSize {
|
||||||
klog.Fatal("Controller: Invalid --cluster-cidr, mask size of cluster CIDR must be less than --node-cidr-mask-size")
|
klog.Fatal("Controller: Invalid --cluster-cidr, mask size of cluster CIDR must be less than or equal to --node-cidr-mask-size")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user