Files
cozystack/packages/extra
Алексей Артамонов fff2e7716f fix(seaweedfs)!: clean up orphaned data PVCs and cert/db secrets on tenant module delete (#3092)
When the seaweedfs tenant module is disabled, the StatefulSet volume PVCs and
a set of certificate/credential secrets were left orphaned. Add a post-delete
cleanup hook that deletes the volume PVCs by their release-scoped labels and
the secrets by name (all templated from .Release.Name). CNPG PVCs are not
targeted (CNPG cleans them). The cleanup Job is hardened (non-root, read-only
root fs, dropped caps, resource limits); RBAC scoped via resourceNames;
failures are logged, never blocking teardown.

The PVC selector matches on name + instance only, without an
app.kubernetes.io/component clause, so volume PVCs from custom storage pools
and MultiZone topologies (component volume-<pool>/volume-<zone>[-<pool>]) are
cleaned up too, not just the default pool. Both deletes use --wait=false and
the Job has activeDeadlineSeconds so a finalizer-stuck resource cannot hang
the post-delete hook.

NOTE: disabling seaweedfs now permanently removes its volume PVCs and the data
they hold.

BREAKING CHANGE: disabling the seaweedfs tenant module now permanently deletes
its volume PVCs and the object data they hold. Back up before disabling if the
data matters.

Signed-off-by: Алексей Артамонов <aleksei.artamonov@aenix.io>
2026-07-01 16:42:43 +03:00
..
2026-06-22 10:55:37 +00:00