Skip to content

Commit

Permalink
chore: intctrlutil.HandleCRDeletion may cause resources to be rolled …
Browse files Browse the repository at this point in the history
…back to an older version
  • Loading branch information
sophon-zt committed Oct 25, 2023
1 parent 5fbe5dd commit f6be9be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controllers/apps/configuration/configuration_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"

appsv1alpha1 "github.com/apecloud/kubeblocks/apis/apps/v1alpha1"
"github.com/apecloud/kubeblocks/pkg/constant"
"github.com/apecloud/kubeblocks/pkg/controller/component"
intctrlutil "github.com/apecloud/kubeblocks/pkg/controllerutil"
)
Expand Down Expand Up @@ -74,8 +73,9 @@ func (r *ConfigurationReconciler) Reconcile(ctx context.Context, req ctrl.Reques
return intctrlutil.CheckedRequeueWithError(err, reqCtx.Log, "cannot find configuration")
}

if res, err := intctrlutil.HandleCRDeletion(reqCtx, r, configuration, constant.ConfigurationTemplateFinalizerName, nil); res != nil {
return *res, err
if !configuration.GetDeletionTimestamp().IsZero() {
reqCtx.Log.Info("configuration is deleting, skip reconcile")
return intctrlutil.Reconciled()
}

tasks := make([]Task, 0, len(configuration.Spec.ConfigItemDetails))
Expand Down

0 comments on commit f6be9be

Please sign in to comment.