diff --git a/pkg/apis/sdn/DESIGN.md b/pkg/apis/sdn/DESIGN.md index 017da9d9a..f7c10609f 100644 --- a/pkg/apis/sdn/DESIGN.md +++ b/pkg/apis/sdn/DESIGN.md @@ -184,4 +184,4 @@ The aggregated-API + controller model is intentionally minimal. The following ca - **Cluster-scope** SecurityGroups projecting to CiliumClusterwideNetworkPolicy. - Reusable **CIDR/FQDN groups**, and exposing more of the CiliumNetworkPolicy rule surface (ICMP, `toServices`, CIDR-set exceptions) as demand appears. - An optional **existence/authorization check** on attachments and SG peers (SubjectAccessReview) to fail fast on a typo instead of silently matching zero pods. -- **Richer spec validation.** Create and update already validate the highest-risk fields synchronously — CIDR syntax, port range, the protocol enum, attachment/peer label validity, reserved-entity names — and reject a bad value with `Invalid` instead of writing a policy Cilium would silently discard. Still deferred: FQDN `matchName`/`matchPattern` syntax and cross-rule consistency, which pass through to Cilium. +- **Richer spec validation.** Create and update already validate the highest-risk fields synchronously — CIDR syntax, port number bounds (a `first-last` port range is rejected, since a port entry carries a single port and Cilium's `endPort` is not exposed), the protocol enum, attachment/peer label validity, reserved-entity names, and FQDN selectors against the CiliumNetworkPolicy CRD's own rules (exactly one of `matchName`/`matchPattern`, the CRD's patterns, at most 255 characters) — and reject a bad value with a field error on the SecurityGroup path instead of writing a policy that Cilium would silently discard or that the CiliumNetworkPolicy schema would refuse on the backing write. Still deferred: cross-rule consistency, which passes through to Cilium.