diff --git a/pkg/controllers/operationjob/operationjob_controller.go b/pkg/controllers/operationjob/operationjob_controller.go index 4538fc32..464fb52a 100644 --- a/pkg/controllers/operationjob/operationjob_controller.go +++ b/pkg/controllers/operationjob/operationjob_controller.go @@ -117,7 +117,6 @@ func (r *ReconcileOperationJob) Reconcile(ctx context.Context, req reconcile.Req return reconcile.Result{Requeue: true}, nil } - //actionHandler, enablePodOpsLifecycle := r.getActionHandler(instance) candidates, err := r.listTargets(ctx, instance) if err != nil { return reconcile.Result{}, err diff --git a/pkg/controllers/operationjob/utils/common.go b/pkg/controllers/operationjob/utils/common.go index 64f40dba..38acdb67 100644 --- a/pkg/controllers/operationjob/utils/common.go +++ b/pkg/controllers/operationjob/utils/common.go @@ -29,7 +29,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" "kusionstack.io/kuperator/pkg/controllers/operationjob/opscore" - ctrlutils "kusionstack.io/kuperator/pkg/controllers/utils" ) const ( @@ -37,14 +36,6 @@ const ( ReasonGetObjectFailed = "GetObjectFailed" ) -func MarkOperationJobFailed(instance *appsv1alpha1.OperationJob) { - if instance.Status.Progress != appsv1alpha1.OperationProgressSucceeded { - now := ctrlutils.FormatTimeNow() - instance.Status.Progress = appsv1alpha1.OperationProgressFailed - instance.Status.EndTimestamp = &now - } -} - func MapOpsStatusByPod(instance *appsv1alpha1.OperationJob) map[string]*appsv1alpha1.OpsStatus { opsStatusMap := make(map[string]*appsv1alpha1.OpsStatus) for i, opsStatus := range instance.Status.TargetDetails {