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
Validate that SDN API object CIDRs are in canonical form
Eg, if you want ClusterNetwork to be "10.128.0.0/14", you have to say
"10.128.0.0/14", not "10.128.0.1/14" or "10.128.32.99/14".
All OpenShift-generated objects already did this correctly, but this
might cause previously-considered-valid EgressNetworkPolicy objects to
start failing to validate.
// oldSize/newSize is, eg the "16" in "10.1.0.0/16", so "newSize < oldSize" means
56
57
// the new network is larger
57
-
ifnewSize<oldSize&&newNet.Contains(oldBase) {
58
+
ifnewSize<oldSize&&newNet.Contains(oldNet.IP) {
58
59
returnnil
59
60
} else {
60
61
returnfield.Invalid(field.NewPath("network"), obj.Network, "cannot change the cluster's network CIDR to a value that does not include the existing network.")
0 commit comments