-
Notifications
You must be signed in to change notification settings - Fork 460
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
Enable StatefulSetAutoDeletePVC feature for alertmanager, compactor, ingester & store-gateway StatefulSets #6106
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution! You might have to run make build-helm-tests
and commit and push the changes you get locally to get the CI passing.
There are three other statefulSets in the chart with persistent volumes - store-gateway, compactor, and alertmanager. It would be greatly appreciated if you have the time to carry out the changes in those too. If not, that's ok too, I can do it in a follow-up PR as well. Thanks again!
operations/helm/charts/mimir-distributed/templates/ingester/ingester-statefulset.yaml
Outdated
Show resolved
Hide resolved
operations/helm/charts/mimir-distributed/templates/ingester/ingester-statefulset.yaml
Outdated
Show resolved
Hide resolved
9874e69
to
58f33d9
Compare
58f33d9
to
a8e685e
Compare
operations/helm/charts/mimir-distributed/templates/ingester/ingester-statefulset.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, i have one more question
operations/helm/charts/mimir-distributed/templates/ingester/ingester-statefulset.yaml
Outdated
Show resolved
Hide resolved
Signed-off-by: Ivan Farre <ivan@bluelabs.eu>
bb5c5cd
to
ede4667
Compare
ede4667
to
55b49d8
Compare
55b49d8
to
d004fff
Compare
@dimitarvdimitrov could you add a review when you have time, please? 😀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some suggestions wrt how this flag is called. I think enableStatefulSetAutoDeletePVC may be slightly confusing. Let me know what you think. Also can you add a line to the helm CHANGELOG.md to mention this new feature.
operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-statefulset.yaml
Outdated
Show resolved
Hide resolved
operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-statefulset.yaml
Outdated
Show resolved
Hide resolved
operations/helm/charts/mimir-distributed/templates/compactor/compactor-statefulset.yaml
Outdated
Show resolved
Hide resolved
operations/helm/charts/mimir-distributed/templates/ingester/ingester-statefulset.yaml
Outdated
Show resolved
Hide resolved
operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-statefulset.yaml
Outdated
Show resolved
Hide resolved
…ay/store-gateway-statefulset.yaml Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
…ompactor-statefulset.yaml Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
…gester-statefulset.yaml Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
…ay/store-gateway-statefulset.yaml Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
…r/alertmanager-statefulset.yaml Co-authored-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
…C-ingester-mimir-distributed
@dimitarvdimitrov I'm glad with the revisions that are being made. I've updated the Changelog too. Let me know if there is anything else to update. |
Let me know if I missed anything to pass the required checks 🤖 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for the contribution!!
What this PR does
I followed a similar implementation for
loki-distributed
https://github.com/grafana/helm-charts/pull/2649/files to enable PersistentVolumeClaim retention policy.Which issue(s) this PR fixes or relates to
What is missing?
An ability to choose whether k8s deletes or retains PVCs in tandem with the lifecycle of a StatefulSet, due to the new beta field spec.persistentVolumeClaimRetentionPolicy in the latest version of Kubernetes. There is no way to configure the StatefulSet of Prometheus in kube-prometheus.
Why do we need it?
Because the new field defaults to Retain, PVCs remain bound to their PVs during cluster deletion while StatefulSets are being removed. This provides surface for a CSI Driver to see a stale, but intact PVC from a pod who no longer is requesting resources during cluster deletion. The CSI Driver then lacks the ability to manage(delete) unbound, available Volumes that otherwise would have been destroyed, resulting in orphaned resources.
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]