aiven/aiven-operator

disk_space field on OpenSearch resources is poorly documented and validated

Closed this issue · 2 comments

https://aiven.github.io/aiven-operator/api-reference/opensearch.html#spec.disk_space-property

When creating a new resource of type OpenSearch with a disk_space property set, the newly created OpenSearch service has only the default amount of disk for the selected plan.

Changing the property after creation triggers a reconciliation, but no change happens in the service.

After trying to find where in the code this was handled I found that the problem seems to be more about documentation/validation.

I attempted to set the value using just the number of MB I wanted (because that is what the REST API uses).
This was accepted with no warning or error, but ignored.

When changing the value to the number of GB I wanted, with the G suffix, behavior was as expected, and the service was configured correctly.

This seems like should be denied when applying the resources to the cluster, or at least received a warning or error when the operator handles it.

It would also be helpful if the documentation details the expectations for this field.

Thanks for reporting. I'll take a look at this.