charts icon indicating copy to clipboard operation
charts copied to clipboard

postgresql-ha multiple existingClaim (one claim per pod)

Open r0b1ndot opened this issue 2 years ago • 1 comments

Name and Version

bitnami/postgresql-ha 9.2.8

What is the problem this feature will solve?

currently the chart supports only one existingClaim or one storage class. but also in order to spread the files and increase reliability it would be awesome if you can define per pod which storageClass or which existingClaim the pod should use.

something like (if you have replica 3):

existingClaimPod1: claim1
existingClaimPod2: claim2
existingClaimPod3: claim3

What is the feature you are proposing to solve the problem?

this feature increases the possibility to spread and also use pre-configured claims for each pod.

What alternatives have you considered?

/

r0b1ndot avatar Aug 05 '22 11:08 r0b1ndot

Hi,

Would you like to send a PR implementing this ? We will be glad to review and merge it.

rafariossaa avatar Aug 08 '22 08:08 rafariossaa

Just wanted to know how do we approach to solve this issue? searching for a head-start. @reyerdam any luck on this one?

Gaethje avatar Aug 23 '22 06:08 Gaethje

Not sure of the right approach, I think it won't be easy as you can scale the chart in any moment, so you will have to take into account how many nodes already exists to set the counter.

rafariossaa avatar Aug 23 '22 06:08 rafariossaa

Hello @rafariossaa Thanks for the thought. I am trying to reinstall postgres in a new on-prem cluster. My scenario is --> we had 3 replicas in old on-prem cluster. cluster failed and what we have left is just the volumes in our remote volume repo. so in new cluster- we manually created pv and pvc;then at existingClaim section of the helm chart- since we are able to mention only one pvc- 3 replicas cant spin up because statefulset won't allow to share same pv across pods(which is anyway the reason we use statefulset at the first place). if we reduce replicas to 1, application comes up. but since there is only one pod and it is attached to only one node as statefulset's fundamental behavior- we are exposed to single point of failure. if that node goes down then there is no replica to become master again. Is there any other way we can scale that pod to multiply the replicas and feed separate pvc in separate nodes? even manually? Thanks.

Gaethje avatar Aug 23 '22 07:08 Gaethje

I think, in this case what you need to do is to reuse the PVC from the master in the new cluster, start it with one node, and then scale the cluster up to the number of desired nodes. That should create the new PVCs and the new postgresql nodes should replicate the info from master.

rafariossaa avatar Aug 24 '22 06:08 rafariossaa

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

bitnami-bot avatar Sep 09 '22 01:09 bitnami-bot

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

bitnami-bot avatar Sep 15 '22 01:09 bitnami-bot

Issue is still exists. Need to have possibility to attach to already created PVCs, 1 PVC to 1 Pod.

crackoffnet avatar Jan 06 '23 19:01 crackoffnet

I have the same issue. Our K3s Master crashed and postgres-ha got messed up. I have the 3 old PVCs, but when I restart the helm chart, it doesn't see all my old data.

StathisKap avatar Feb 21 '24 22:02 StathisKap

Hi, Could you open a issue with your case ? That way we could properly handle it.

rafariossaa avatar Feb 22 '24 08:02 rafariossaa