aws: Ignore overlapping pod and network CIDRs with AWS VPC CNI

This commit is contained in:
Ciprian Hacman 2023-08-17 06:52:50 +03:00
parent 1593aabee9
commit 460a327fc5
1 changed files with 1 additions and 1 deletions

View File

@ -611,7 +611,7 @@ func validateSubnet(subnetSpec *kops.ClusterSubnetSpec, c *kops.ClusterSpec, fie
allErrs = append(allErrs, field.Forbidden(fieldPath.Child("cidr"), fmt.Sprintf("subnet %q cidr %q is not a subnet of the networkCIDR %q%s", subnetSpec.Name, subnetSpec.CIDR, c.Networking.NetworkCIDR, extraMsg)))
}
}
if subnet.Overlap(subnetCIDR, podCIDR) {
if subnet.Overlap(subnetCIDR, podCIDR) && c.Networking.AmazonVPC == nil {
allErrs = append(allErrs, field.Forbidden(fieldPath.Child("cidr"), fmt.Sprintf("subnet %q cidr %q must not overlap podCIDR %q", subnetSpec.Name, subnetSpec.CIDR, podCIDR)))
}
if subnet.Overlap(subnetCIDR, serviceClusterIPRange) {