Use apps/v1 type for StatefulSetSpec in RabbitmqCluster override #1152
Labels
closed-stale
Issue or PR closed due to long period of inactivity
stale
Issue or PR with long period of inactivity
sync-up
Issue to discuss during sync-up
Is your feature request related to a problem? Please describe.
Currently, if a new field is exposed in the StatefulSetSpec by the upstream Kubernetes API, it is not usable in the StatefulSet Override feature of the cluster-operator until it is manually added to the rabbitmq.com/v1beta1 API.
This is because the API in this operator defines its own StatefulSetSpec, which is a subset of the fields available in the upstream StatefulSetSpec.
I would like to be able to use the new v1.25 StatefulSet feature Minimum ready seconds in the operator, but as it requires it to be specifically added to the subset StatefulSetSpec structure, I cannot currently.
Describe the solution you'd like
I would like for everything in apps/v1.StatefulSetSpec to be able to be provided in
rabbitmqCluster.spec.override.statefulSet.spec
.Describe alternatives you've considered
We could add just this field, but we would be left with the long-term complexity of maintaining this separate list of fields, and the context behind why not all fields are passable.
Additional context
There was originally a bug in kubebuilder that forced us to create our own EmbeddedObjectMeta. See @ChunyiLyu's comment in the Context of this PR: #175
The fix is now in, meaning we should be able to use the core API types as requested above, making sure that we add the flag
generateEmbeddedObjectMeta=true
to controller-gen.Converting a type in our API may require the use of a conversion webhook and a new API version.
The text was updated successfully, but these errors were encountered: