Use previously created PVCs for PXDBC resource


I would like to configure the PVCs of each of the 3 replicas in a cluster to be allocated to previously created ones. For example, having previously created PVCs pvc1, pvc2, pvc3 and have each of the replicas use each of them respectively.

One use case for that is, for example, I have 3 separate NFS servers, each with its own Storage Class. I don’t want to be limited to one single StorageClassName in the PXDBC configuration. Instead, by pointing to previously created PVCs, I can have each of them use a different Storage Class and, consequently, a distinct NFS server.

Would that be possible?

I was able to find a solution. Just pre-create the pvcs with the same names that would be dinamically created by the operator. To avoid any inconsistencies, if doing that make sure to disable the item - delete-pxc-pvc from the finalizers key.

Even I’m looking for a similar kind of implementation. I need to attach different NFS PVs created from the same NFS server to the Pods
NFS Server1( - PV1 - POD1
NFS Server1( - PV2 - POD2
NFS Server1( - PV3 - POD3
These Pods are distributed across the 3 worker nodes by affinity rule.

I’ve created the PV1, PV2, and PV3 from the NFS server and also created 3 PVCs with the respected PVs

And I have the following in my cr.yaml
With this config it is always picking up the empty dir and not picking up the created PVCs.
Could you guide me in getting right configuration to achieve the independent NFS volume folder for each pod?

Thanks In Advance,

We are able to solve the problem.