Skip to content

Commit 197d806

Browse files
committed
bindata,ovn-k,cudn: Validate excludeSubnet match specified subnets
Add CEL validation on OVN-K CUDN CRD for localnet to topology, to ensure the specified excludeSubnetes match the specified subnets. This change make the CRD diverge from the CRD on U/S due to a bug [1] that its fix is available on D/S [2] [3] but not available on U/S yet. [1] https://issues.redhat.com/browse/OCPBUGS-54426 [2] openshift/kubernetes#2263 [3] openshift/kubernetes#2267 Signed-off-by: Or Mergi <[email protected]>
1 parent bcf7b32 commit 197d806

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bindata/network/ovn-kubernetes/common/001-crd.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -4032,6 +4032,11 @@ spec:
40324032
IPv6 subnet is used
40334033
rule: '!has(self.subnets) || !has(self.mtu) || !self.subnets.exists_one(i,
40344034
isCIDR(i) && cidr(i).ip().family() == 6) || self.mtu >= 1280'
4035+
- fieldPath: .excludeSubnets
4036+
message: excludeSubnets must be subnetworks of the networks
4037+
specified in the subnets field
4038+
rule: '!has(self.excludeSubnets) || self.excludeSubnets.all(e,
4039+
self.subnets.exists(s, cidr(s).containsCIDR(cidr(e))))'
40354040
topology:
40364041
description: |-
40374042
Topology describes network configuration.

0 commit comments

Comments
 (0)