You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
allErrs=append(allErrs, field.Invalid(field.NewPath("hostSubnetLength"), clusterNet.HostSubnetLength, "subnet length is too large for clusterNetwork"))
39
-
} elseifclusterNet.HostSubnetLength<2 {
40
-
allErrs=append(allErrs, field.Invalid(field.NewPath("hostSubnetLength"), clusterNet.HostSubnetLength, "subnet length must be at least 2"))
37
+
ifcn.HostSubnetLength>uint32(addrLen-maskLen) {
38
+
allErrs=append(allErrs, field.Invalid(field.NewPath("hostSubnetLength"), cn.HostSubnetLength, "subnet length is too large for clusterNetwork"))
39
+
} elseifcn.HostSubnetLength<2 {
40
+
allErrs=append(allErrs, field.Invalid(field.NewPath("hostSubnetLength"), cn.HostSubnetLength, "subnet length must be at least 2"))
allErrs=append(allErrs, field.Invalid(field.NewPath("ClusterDef"), clusterNet.ClusterNetworks, "cannot change the default ClusterNetwork record via API"))
64
+
allErrs=append(allErrs, field.Invalid(field.NewPath("ClusterNetworks"), clusterNet.ClusterNetworks, "cannot change the default ClusterNetwork record via API"))
65
65
}
66
66
// if clusterNet.Network != defaultClusterNetwork.Network {
67
67
// allErrs = append(allErrs, field.Invalid(field.NewPath("network"), clusterNet.Network, "cannot change the default ClusterNetwork record via API."))
allErrs=append(allErrs, field.Invalid(field.NewPath("hostSubnetLength"), clusterNet.HostSubnetLength, "cannot change the default ClusterNetwork record via API."))
71
-
}
69
+
// if clusterNet.HostSubnetLength != defaultClusterNetwork.HostSubnetLength {
70
+
// allErrs = append(allErrs, field.Invalid(field.NewPath("hostSubnetLength"), clusterNet.HostSubnetLength, "cannot change the default ClusterNetwork record via API."))
allErrs=append(allErrs, field.Invalid(field.NewPath("serviceNetwork"), clusterNet.ServiceNetwork, "cannot change the default ClusterNetwork record via API."))
0 commit comments