From d29a5cdc2260ac246070520c4b35e1655507fb21 Mon Sep 17 00:00:00 2001 From: Ilya Lesikov Date: Wed, 7 Feb 2024 17:21:17 +0300 Subject: [PATCH] fix: force resource status to Ready for low-level trackers Signed-off-by: Ilya Lesikov --- pkg/trackers/dyntracker/dynamic_readiness_tracker.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/trackers/dyntracker/dynamic_readiness_tracker.go b/pkg/trackers/dyntracker/dynamic_readiness_tracker.go index 182be40..c51101c 100644 --- a/pkg/trackers/dyntracker/dynamic_readiness_tracker.go +++ b/pkg/trackers/dyntracker/dynamic_readiness_tracker.go @@ -242,6 +242,8 @@ func (t *DynamicReadinessTracker) trackDeployment(ctx context.Context, tracker * abort bool abortErr error ) + status.IsReady = true + t.taskState.RWTransaction(func(ts *statestore.ReadinessTaskState) { t.handlePodsFromDeploymentStatus(&status, ts) t.handleDeploymentStatus(&status, ts) @@ -373,6 +375,8 @@ func (t *DynamicReadinessTracker) trackStatefulSet(ctx context.Context, tracker abort bool abortErr error ) + status.IsReady = true + t.taskState.RWTransaction(func(ts *statestore.ReadinessTaskState) { t.handlePodsFromStatefulSetStatus(&status, ts) t.handleStatefulSetStatus(&status, ts) @@ -490,6 +494,8 @@ func (t *DynamicReadinessTracker) trackDaemonSet(ctx context.Context, tracker *d abort bool abortErr error ) + status.IsReady = true + t.taskState.RWTransaction(func(ts *statestore.ReadinessTaskState) { t.handlePodsFromDaemonSetStatus(&status, ts) t.handleDaemonSetStatus(&status, ts) @@ -607,6 +613,8 @@ func (t *DynamicReadinessTracker) trackJob(ctx context.Context, tracker *job.Tra abort bool abortErr error ) + status.IsSucceeded = true + t.taskState.RWTransaction(func(ts *statestore.ReadinessTaskState) { t.handlePodsFromJobStatus(&status, ts) t.handleJobStatus(&status, ts) @@ -723,6 +731,8 @@ func (t *DynamicReadinessTracker) trackCanary(ctx context.Context, tracker *cana abort bool abortErr error ) + status.IsSucceeded = true + t.taskState.RWTransaction(func(ts *statestore.ReadinessTaskState) { t.handleCanaryStatus(&status, ts) abort, abortErr = t.handleTaskStateStatus(ts)