Skip to content

qdrant: StatefulSet data PVC is orphaned after deletion #3059

Description

@scooby87

Describe the bug

After deleting a Qdrant 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

  1. Create a tenant, deploy Qdrant/test.
  2. Wait until Ready.
  3. Delete the Qdrant CR; wait ~120s.
  4. kubectl -n <ns> get pvc — qdrant-storage-qdrant-test-0 remains.

Expected behaviour
Data PVC is released (or explicitly cleaned) after the CR is deleted.

Actual behaviour

pvc/qdrant-storage-qdrant-test-0   Bound

Additional context

  • Root cause: Identical mechanism to OpenBAO. The app renders a Flux HelmRelease (<release>-system) over the vendored upstream Qdrant chart (packages/apps/qdrant/templates/qdrant.yaml:32-36, persistence). The persistence: block passes only size/storageClassName, no retention policy; the STS-templated PVC survives STS deletion.
  • Proposed fix: Same as OpenBAO — (A) values.qdrant.persistence.persistentVolumeClaimRetentionPolicy: { whenDeleted: Delete } if the upstream chart supports it, or (B) a post-delete PVC cleanup hook.

Found during a create→delete leak sweep of all 22 apps on Cozystack v1.4.0-rc.2.

Metadata

Metadata

Assignees

Labels

area/databaseIssues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse)kind/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 release

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions