-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Feature/add pvc delete toggle #1074
Conversation
Hi @FxKu |
On a second look, yes it's rather the opposite. Sorry 😃 So this option is for protecting the volumes. I think, it could make more sense to have a global config option to keep PVCs, which you can overwrite in the Postgres manifest. What do you think? |
That's fine for me. I'll try to implement this when I have some time. |
@FxKu I added keep_pvc to config. It will be used as default value when KeepPVC is not assigned in the postgresql custom resource. |
Thanks for the update. I would like to see this renamed to For the manifest option, I'm not sure if it should also be a boolean field I could think of something similar here. To delete the PVC when it's globally disabled one has to add a field
What do you think about this? Also @Jan-M ? |
@FxKu For my purposes, the code that I submitted suffices. However I acknowledge that it's important to design and implement this as good as possible. If you and your team agree on a proposal, let me know and I'll implement it. |
…kkie/postgres-operator into feature/add-pvc-delete-toggle
Hi Any chance to have this released ? We would like to be abble to disable pvc deletion. We find it to risky.... |
Hi Any chance to have this released ? We would like to be abble to disable pvc deletion. We find it to risky.... |
@jicki @menardorama we will put it on our list for v1.9.0. At the current state I still see way too many issues in this PR. Will close it for now. Sorry @Lukkie to not get back to you sooner. We can still have a discussion on how this feature should look like. After two years I do have better overview now. |
Any update on this PR? |
In our setup, the postgresql custom resource is often deleted. The operator will first delete the StatefulSets and then explicitly delete the PersistentVolumeClaims. However, we would like to keep our data. A simple solution is to add a toggle for this: .spec.volume.keepPVC, which defaults to false. This will keep all PVCs and Secrets (because otherwise credentials would become inconsistent).
I also did some minor changes for consistency: