vshn / appcat-service-postgresql

AppCat Service Provider for PostgreSQL
https://vshn.github.io/appcat-service-postgresql/
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Add storage class field to operator config #75

Open zugao opened 2 years ago

zugao commented 2 years ago

Summary

As Developer \ I want a configurable storage class \ So that so that I can choose which storage class to use for my postgresql instance

Context

The storage class of KIND does not allow to change storage capacity for existing PVCs:

persistentvolumeclaims "postgresql-pvc" is forbidden: only dynamically provisioned pvc can be resized

We need to make sure that the postgresql PVC can be updated thus, we need to specify the storage class in the Operator Config CRD in case the default storage provisioner does not allow storage resize.

Currently the update phase is being implemented and the PVC will no longer be managed by the Helm Chart instead it will be managed by the Operator. The reason behind this decision is that the HelmChart uses a PVC volume template definition in StatefulSet which cannot be updated.

Moreover for development environment the KIND setup will be updated and a new storage provisioner will be installed during the update phase.

Out of Scope

Further links

No response

Acceptance Criteria

Given and operator config
When I add a storage class
Then all postgresql instances will use that storage class for their PVCs
Given and operator config
When I skip a storage class
Then all postgresql instances will use default storage class

Implementation Ideas

In the Operator Config CRD add a new flag with the storage class name. The operator should update the storage class when creating the PVCs