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

Support StatefulSet PVC retention feature #3101

Closed
alemuro opened this issue Oct 19, 2023 · 2 comments
Closed

Support StatefulSet PVC retention feature #3101

alemuro opened this issue Oct 19, 2023 · 2 comments
Labels
type/enhancement New feature or request

Comments

@alemuro
Copy link
Contributor

alemuro commented Oct 19, 2023

Feature Description

Kubernetes released a feature for automatically purging PVCs when the StatefulSet controller removes one of the pods.

This issue is for asking to expose this configuration in the Helm chart so we can parametrise it and set the proper value depending on the environment.

https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention

According to the documentation what we need is to add the following lines to the StatefulSet, and to parametrise it with Helm chart variables:

apiVersion: apps/v1
kind: StatefulSet
...
spec:
  persistentVolumeClaimRetentionPolicy:
    whenDeleted: Retain
    whenScaled: Retain
...

Use Case(s)

This is useful when testing the chart, as in those cases we want to create it/remove it, but the PVCs are not removed. This feature would allow us to remove PVCs on test environments but to retain them on production.

@alemuro alemuro added the type/enhancement New feature or request label Oct 19, 2023
@alemuro
Copy link
Contributor Author

alemuro commented Oct 19, 2023

I will try to implement it!

@david-yu
Copy link
Contributor

david-yu commented Nov 9, 2023

Closing as addressed by #3180

@david-yu david-yu closed this as completed Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants