Is there any way to validation string array items in enum #2811
Replies: 2 comments
-
type AA struct {
// +kubebuilder:validation:MinItems=1
Role []RoleValue `json:"role,omtiempty"
}
// +kubebuilder:validation:Enum=admin;reseller;operator
type RoleValue string |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
camilamacedo86
-
Closing since it is answered. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
if I have a struct like
and make manifests, will get below result
The desired output is
but I don't know how to mark the field.
Beta Was this translation helpful? Give feedback.
All reactions