carvel-dev / carvel-dev/kapp-controller
kapp-controller hangs waiting for StatefulSet PVCs deletion
- Dominant language
- Go
- Stars
- 323
- Forks
- 127
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 4
Description
The team is working on creating a Carvel repository that includes most of the Bitnami Helm charts using the App.spec [`helmTemplate`](https://carvel.dev/kapp-controller/docs/latest/app-overview/#spectemplate).
Based on [https://github.com/vmware-tanzu/carvel-kapp/issues/36](https://github.com/vmware-tanzu/carvel-kapp/issues/36), the `StatefulSets` are the responsible of creating the `PVCs`, so `kapp-controller` wont delete them, but only will wait for it to be deleted. That hangs the process to fully remove the `packageInstall` as there is not any process that would remove them. This is also a [known issue in Helm](https://github.com/helm/helm/issues/5156) and that project decided not to remove them.
Based on [other tickets](https://github.com/vmware-tanzu/carvel-kapp/issues/99), it seems the suggested approach is to use the annotation `kapp.k14s.io/owned-for-deletion` for removing those PVCs, so `kapp-controller` will not hang and it will remove those volumes.
This solution would work for users who can modify the `yaml` files and are specific built for Carvel packages. In our case, we are using the Helm charts as the source-of-truth for building the Carvel packages so adding that annotation to the Helm templates would mean to mix Carvel annotations there.
What would be the recommended approach for `kapp-controller` to avoid hanging the deletion process when there is a PVC created by a `StatefulSet`?
Contributor guide
Assessment
This issue has not been assessed yet.