We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
See https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/2335-vanilla-crd-openapi-subset-structural-schemas#metadata
I want to change the pattern of the metadata.name.
The text was updated successfully, but these errors were encountered:
When you say you would like to change the pattern, is that to say, you want to enforce some kind of regex on the value of the metadata.name field?
Have you considered using CEL?
type MyCustomResource struct { *metav1.TypeMeta `json:",inline" // +kubebuilder:validation:XValidation:rule="self.name.matches("<insert regex>"),message="CRD name must match..." *metav1.ObjectMeta `json:"metadata,omitempty" ... }
Sorry, something went wrong.
That's what I need, thanks. I'll try it first
No branches or pull requests
See https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/2335-vanilla-crd-openapi-subset-structural-schemas#metadata
I want to change the pattern of the metadata.name.
The text was updated successfully, but these errors were encountered: