-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support messageExpression
in CRD validation rules
#858
Comments
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle rotten We should definitely be implementing this support |
I'd be willing to contribute a patch for this if someone provided guidance what would be needed. |
@pmalek I think you can start from here:
and then try to implement it analog to Rule and/or Message (also grep for rule/message in the repo in general and see if there are relevant occurences) Apologies for the fuzzy guidance but that's literally all I know without diving a lot deeper into it :) |
Thanks @sbueringer 🙇 I've pushed #927 with an attempt to provide support for |
/assign |
Problem statement
Currently, kubebuilder supports
rule
andmessage
fields when specifying+kubebuilder:validation:XValidation
.Kubernetes 1.25 introduced CRD validation rules (beta0 which also allow specifying
messageExpression
.The following is now possible when specifying CRD validations:
Unfortunately kubebuilder doesn't support this:
This issue tracks the proposal and implementation of support for
messageExpression
in// +kubebuilder:validation:XValidation
.https://book.kubebuilder.io/reference/markers/crd-validation.html
The text was updated successfully, but these errors were encountered: