-
Task
-
Resolution: Unresolved
-
Major
-
None
-
rhos-18.0.z
-
None
-
False
-
-
False
-
-
Outcome of OSPRH-645
**
Goal:
Since there is not an automated way of synchronizing ovn-provider with OVN DBs, it is benefitial to change PersistentVolumeClaimRetentionPolicy type to Retain in SB and NB OVN DBs so as to not end on an inconsistent state after a removal.
We need to ensure PVCs and its PVs are not deleted or released after a removal. To do this, we can follow examples from other operators like mariaDB-operator, which does this already.
We would need not just to change the policy https://github.com/openstack-k8s-operators/ovn-operator/blob/main/pkg/ovndbcluster/statefulset.go#L189C23-L189C69 but also to delete finalizers that might be present as seen in: https://github.com/openstack-k8s-operators/mariadb-operator/blob/e98cf8957b16be543ab8611ac8ea7c38e74d7818/api/v1beta1/mariadbdatabase_funcs.go#L533
More sources:
https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention