Skip to content

fix(template): pvc not deleted for multi component instances#6986

Open
Nixieboluo wants to merge 1 commit into
labring:mainfrom
Nixieboluo:fix/multicomp-pvc-deletion
Open

fix(template): pvc not deleted for multi component instances#6986
Nixieboluo wants to merge 1 commit into
labring:mainfrom
Nixieboluo:fix/multicomp-pvc-deletion

Conversation

@Nixieboluo

@Nixieboluo Nixieboluo commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Fix Template StatefulSet PVC cleanup.

This PR makes Template PVC ownership explicit and keeps legacy cleanup paths contained:

  • Injects cloud.sealos.io/deploy-on-sealos into StatefulSet volumeClaimTemplates so newly created PVCs can be selected by Template instance label.
  • Adds unified Instance PVC cleanup covering four modes: legacy resources, ownerReference-only resources, labeled PVC resources, and K8s native retention-
    policy resources.
  • Keeps app label cleanup as a deprecated legacy fallback via legacyAppLabelKey, with comments and legacy-focused naming.
  • Updates Instance delete paths to use the unified PVC cleanup before deleting the Instance.
  • Adds unit tests for label injection, four PVC cleanup modes, 404 handling, non-404 failures, default replicas, and multi-template PVC inference.

Signed-off-by: Nixieboluo <me@sagirii.me>
@Nixieboluo Nixieboluo requested a review from a team as a code owner June 4, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants