Repository navigation
Closed
Labels
area/databaseIssues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse)Issues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse)kind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a bugpriority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next releaseMust be staffed and worked on either currently, or very soon, ideally in time for the next release
Description
Describe the bug
After deleting an OpenBAO app CR, the StatefulSet data PVC remains, consuming storage permanently.
Environment
- Cozystack version: v1.4.0-rc.2
- Provider: on-prem (bare-metal)
To Reproduce
- Create a tenant, deploy
OpenBAO/test. - Wait until Ready.
- Delete the OpenBAO CR; wait ~120s.
kubectl -n <ns> get pvc—data-openbao-test-0remains.
Expected behaviour
Data PVC is released (or explicitly cleaned) after the CR is deleted.
Actual behaviour
pvc/data-openbao-test-0 Bound
Additional context
- Root cause: OpenBAO app is a thin wrapper rendering a Flux
HelmRelease(<release>-system) over the vendored upstream OpenBAO chart (packages/apps/openbao/templates/openbao.yaml:31-36,server.dataStorage). The PVC is the upstream StatefulSetvolumeClaimTemplate. STS-templated PVCs are never deleted on STS deletion by design, and nopersistentVolumeClaimRetentionPolicyis set. - Proposed fix (one of):
- (A) If the upstream chart supports it, pass through the HelmRelease values:
server: dataStorage: persistentVolumeClaimRetentionPolicy: { whenDeleted: Delete }
- (B) Add a
post-deletePVC cleanup hook underpackages/apps/openbao/templates/hooks/, selectingapp.kubernetes.io/instance={{ .Release.Name }}. - The vendored upstream STS template must not be edited directly (AGENTS.md).
- (A) If the upstream chart supports it, pass through the HelmRelease values:
Found during a create→delete leak sweep of all 22 apps on Cozystack v1.4.0-rc.2.
Reacted by dosubot
Metadata
Metadata
Assignees
Labels
area/databaseIssues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse)Issues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse)kind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a bugpriority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next releaseMust be staffed and worked on either currently, or very soon, ideally in time for the next release
Activity
fix(openbao): garbage-collect the data PVC on delete (#3058)
fix(openbao): garbage-collect the data PVC on delete (#3058) (#3073)