controller-tools
controller-tools copied to clipboard
Better docs for `UniqueItems`
Afaik the kubebuilder docs are autogenerated from this repo.
I would like to improve the docs about UniqueItems
https://book.kubebuilder.io/reference/markers/crd-validation.html#crd-validation
I get:
Forbidden: uniqueItems cannot be set to true since the runtime complexity becomes quadratic
I would like to add the answer to this question to the docs:
What alternatives does a CRD author have (except writing a web hook)?
Example CRD:
type FooSpec struct {
// +kubebuilder:validation:UniqueItems=true
MyItems []string `json:"myItems"`