diff --git a/controllers/runtimetaskgroup_reconcile.go b/controllers/runtimetaskgroup_reconcile.go index 3f24cca..6d04724 100644 --- a/controllers/runtimetaskgroup_reconcile.go +++ b/controllers/runtimetaskgroup_reconcile.go @@ -137,6 +137,20 @@ func (a *taskGroupReconcileList) deriveViews() { // Pending a.pending = append(a.pending, v) case v.planned == nil: + // Failed + if v.current.Status.ErrorReason != nil || v.current.Status.ErrorMessage != nil { + a.failed = append(a.failed, v) + continue + } + // Mark as Completed + if v.current.Status.CompletionTime != nil { + a.completed = append(a.completed, v) + continue + } + // Keep running + if v.current.Status.StartTime != nil { + a.running = append(a.running, v) + } a.invalid = append(a.invalid, v) } } diff --git a/operations/upgrade.go b/operations/upgrade.go index 1a2ba5d..f5ff12c 100644 --- a/operations/upgrade.go +++ b/operations/upgrade.go @@ -93,6 +93,7 @@ func planUpgrade(operation *operatorv1.Operation, spec *operatorv1.UpgradeOperat }, }, ) + log.Info("add upgrade-apply task group", "task", t1.Name) items = append(items, t1) } @@ -126,6 +127,7 @@ func planUpgrade(operation *operatorv1.Operation, spec *operatorv1.UpgradeOperat }, }, ) + log.Info("add upgrade-cp task group", "task", t2.Name) items = append(items, t2) } @@ -138,6 +140,7 @@ func planUpgrade(operation *operatorv1.Operation, spec *operatorv1.UpgradeOperat }, }, ) + log.Info("add upgrade-kube-proxy task group", "task", t3.Name) items = append(items, t3) } @@ -176,6 +179,7 @@ func planUpgrade(operation *operatorv1.Operation, spec *operatorv1.UpgradeOperat KubectlUncordon: &operatorv1.KubectlUncordonCommandSpec{}, }, ) + log.Info("add upgrade-w task group", "task", t4.Name) items = append(items, t4) }