solr-operator icon indicating copy to clipboard operation
solr-operator copied to clipboard

Add more built-in validation and defaulting to the Solr CRDs

Open HoustonPutman opened this issue 3 years ago • 0 comments

Currently the Solr Operator does not have a lot of CRD Spec validations or defaults built in. Instead we rely on a first-step of defaulting the Spec in the controller code before anything else is done. This works, however it would be much better for the user for these checks and defaults to be built into the CRD.

The minimum supported Kubernetes version is v1.19, as of #320, which opens up a lot of the possible validation and defaulting options that have been added in recent kubernetes versions.

List of validation/default options: https://book.kubebuilder.io/reference/markers/crd-validation.html https://book.kubebuilder.io/reference/markers/crd-processing.html https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#defaulting

HoustonPutman avatar Sep 29 '21 15:09 HoustonPutman