Skip to content

Commit

Permalink
fix: don't delete config resources while deleting the cluster definit…
Browse files Browse the repository at this point in the history
…ion CRs (#8358)
  • Loading branch information
leon-inf authored Oct 31, 2024
1 parent 051b826 commit 5782dea
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions controllers/apps/clusterdefinition_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log"

appsv1 "github.com/apecloud/kubeblocks/apis/apps/v1"
appsconfig "github.com/apecloud/kubeblocks/controllers/apps/configuration"
"github.com/apecloud/kubeblocks/pkg/constant"
"github.com/apecloud/kubeblocks/pkg/controller/component"
intctrlutil "github.com/apecloud/kubeblocks/pkg/controllerutil"
Expand Down Expand Up @@ -117,11 +116,8 @@ func (r *ClusterDefinitionReconciler) deletionHandler(rctx intctrlutil.RequestCt
}

func (r *ClusterDefinitionReconciler) deleteExternalResources(rctx intctrlutil.RequestCtx, clusterDef *appsv1.ClusterDefinition) error {
// delete any external resources associated with the cronJob
//
// Ensure that delete implementation is idempotent and safe to invoke
// multiple times for same object.
return appsconfig.DeleteConfigMapFinalizer(r.Client, rctx, clusterDef)
// delete any external resources associated with the cluster definition CR.
return nil
}

func (r *ClusterDefinitionReconciler) available(rctx intctrlutil.RequestCtx, clusterDef *appsv1.ClusterDefinition) error {
Expand Down

0 comments on commit 5782dea

Please sign in to comment.