projectcontour / contour

Contour is a Kubernetes ingress controller using Envoy proxy.
https://projectcontour.io
Apache License 2.0
3.67k stars 669 forks source link

Utilize CEL validation in Contour CRDs #6122

Open sunjayBhatia opened 6 months ago

sunjayBhatia commented 6 months ago

Our CRD field validation is a bit inconsistent and could use a refresh. We don't have consistent validation for similar fields and should probably introduce dedicated common types for some. For example, namespace name validation:

Also, much of our HTTPProxy|ExtensionService|etc. Processor logic is dedicated to validating CRD fields and setting Invalid status on resources that have bad config. If we can use CEL validations to do some of this work at resource creation time we may be able to prevent This would enable us to immediately surface configuration errors rather than requiring users to create a resource, check status, etc.

flawedmatrix commented 5 months ago

Assigning to myself since I've been looking at this today.