Skip to content

Preserve all Volcano CRDs and custom resources after uninstall #5727

Description

@3th4novo

Description

When Volcano is installed using Helm, uninstalling the release also deletes its Helm-managed CRDs. Kubernetes then deletes all custom resources stored under those CRDs.

The issue was reproduced with jobs.batch.volcano.sh: both the CRD and existing Volcano Jobs disappeared after helm uninstall.

Volcano should use a consistent retention policy for all 11 CRDs:

  • jobs.batch.volcano.sh
  • cronjobs.batch.volcano.sh
  • commands.bus.volcano.sh
  • colocationconfigurations.config.volcano.sh
  • numatopologies.nodeinfo.volcano.sh
  • podgroups.scheduling.volcano.sh
  • queues.scheduling.volcano.sh
  • nodeshards.shard.volcano.sh
  • hypernodes.topology.volcano.sh
  • jobflows.flow.volcano.sh
  • jobtemplates.flow.volcano.sh

Some of these resources are maintained internally by Volcano, but deleting them during uninstall is still destructive and makes the CRD lifecycle inconsistent.

Steps to reproduce the issue

  1. Install Volcano with Helm:

    helm install volcano <volcano-chart> -n volcano-system --create-namespace
  2. Create a Volcano Job:

    kubectl apply -f example/job.yaml
    kubectl get vcjob,podgroup -A
  3. Uninstall Volcano:

    helm uninstall volcano -n volcano-system
  4. Check the Job CRD and resources:

    kubectl get crd jobs.batch.volcano.sh
    kubectl get vcjob -A

Evidence and production path

Cluster reproduction confirmed that jobs.batch.volcano.sh and its Job resources were deleted.

The complete failure path is:

helm uninstall
-> Helm deletes the release-managed CRDs
-> Kubernetes deletes all CRs under those CRDs
-> workload and internal Volcano state is lost

Only the Job CRD has been independently reproduced in a cluster. Source review confirms that the other CRDs use the same Helm-managed lifecycle.

Describe the results you received and expected

Actual:

  • Volcano is uninstalled.
  • The Job CRD and existing Volcano Jobs are also deleted.

Expected:

  • Volcano components are uninstalled.
  • All 11 Volcano CRDs and their custom resources are preserved.
  • Existing workloads are not deleted because their CRDs were removed.
  • Reconciliation can resume after Volcano is installed again.

What version of Volcano are you using?

Volcano 1.14.1

Any other relevant information

No response

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions