Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm delete spilo cluster is deleting underlying PVC #1075

Closed
aditya1808 opened this issue Jul 26, 2020 · 4 comments
Closed

Helm delete spilo cluster is deleting underlying PVC #1075

aditya1808 opened this issue Jul 26, 2020 · 4 comments

Comments

@aditya1808
Copy link

I have deployed a cluster with pg-operator.
And it created statefulset along with PVCs as expected.

helm/helm#5156
If you look at the above issue, helm del --purge shouldnt delete pvc along with the statefulset.
But in my case if i helm delete the cluster, its deleting the pvc.
Does pg-operator handles all this?? is this expected behavior?

@FxKu
Copy link
Member

FxKu commented Jul 27, 2020

If you delete the Postgresql CR this triggers deletion of statefulset and, thus, PVCs. Actually, I thought deleting the chart with --purge does not delete the clusters, see #1057. So in your case everything is deleted? Statefulset, services, PDB?

@aditya1808
Copy link
Author

aditya1808 commented Jul 27, 2020

@FxKu ok may be i was not clear.

I have two helm charts - 1. pg-operator and 2. the cluster manifest as a helm chart (we have some postinstall jobs to run, so we have the manifest file also as a helm chart)

You are correct, helm del --purge of pg-operator doesnt effect the cluster.
My concern was, deleting the cluster manifest helm chart is also deleting the PVC.

But ideally, deleting the helm chart (statefulset of cluster) shouldnt delete the pvc...but in my case its deleting the PVC and you mentioned the same.
Is there a way to not delete PVC?

@FxKu
Copy link
Member

FxKu commented Jul 30, 2020

#1074 makes this configurable.

@FxKu
Copy link
Member

FxKu commented Apr 24, 2024

finally supported with #2579

@FxKu FxKu closed this as completed Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants