-
Notifications
You must be signed in to change notification settings - Fork 367
Common Expression Language validation rules to reduce custom logic #2183
Copy link
Copy link
Open
Labels
area/api-serverAffects Kargo's API serverAffects Kargo's API serverarea/kubernetes-webhooksAffects the server that handles Kargo-specific validations on behalf of the Kubernetes API serverAffects the server that handles Kargo-specific validations on behalf of the Kubernetes API serverkind/refactorNon-functional changes to implementation detailsNon-functional changes to implementation detailspriority/lowLow commitment from maintainers; progress is likely to be community-drivenLow commitment from maintainers; progress is likely to be community-driven
Metadata
Metadata
Assignees
Labels
area/api-serverAffects Kargo's API serverAffects Kargo's API serverarea/kubernetes-webhooksAffects the server that handles Kargo-specific validations on behalf of the Kubernetes API serverAffects the server that handles Kargo-specific validations on behalf of the Kubernetes API serverkind/refactorNon-functional changes to implementation detailsNon-functional changes to implementation detailspriority/lowLow commitment from maintainers; progress is likely to be community-drivenLow commitment from maintainers; progress is likely to be community-driven
In Kubernetes 1.29, Common Expression Language validation rules were promoted to GA.
Using CEL, writing complex validation rules without needing validation webhooks and/or custom Go code is possible using the
+kubebuilder:validation:XValidationmarker. As this can potentially reduce the custom logic we have at the moment (but not all), it may be worth looking into.