Skip to content

Commit

Permalink
remove unused codes
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdsteelRail committed Oct 9, 2024
1 parent 18d0e7b commit 6949006
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion pkg/controllers/operationjob/operationjob_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions pkg/controllers/operationjob/utils/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,13 @@ import (
"sigs.k8s.io/controller-runtime/pkg/reconcile"

"kusionstack.io/kuperator/pkg/controllers/operationjob/opscore"
ctrlutils "kusionstack.io/kuperator/pkg/controllers/utils"
)

const (
ReasonUpdateObjectFailed = "UpdateObjectFailed"
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 {
Expand Down

0 comments on commit 6949006

Please sign in to comment.