Skip to content

Commit

Permalink
fix: some STS and DS pods not tracked and their errors ignored
Browse files Browse the repository at this point in the history
Signed-off-by: Ilya Lesikov <[email protected]>
  • Loading branch information
ilya-lesikov committed Jun 25, 2024
1 parent 7c603d8 commit b9b3803
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions pkg/trackers/dyntracker/dynamic_readiness_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ func (t *DynamicReadinessTracker) trackStatefulSet(ctx context.Context, tracker
t.taskState.RWTransaction(func(ts *statestore.ReadinessTaskState) {
t.handlePodsFromStatefulSetStatus(&report.StatefulSetStatus, ts)
t.handleStatefulSetStatus(&report.StatefulSetStatus, ts)
t.handleReplicaSetPodError(&report.ReplicaSetPodError, ts)
t.handlePodError(&report.ReplicaSetPodError.PodError, ts)
abort, abortErr = t.handleTaskStateStatus(ts)
})

Expand Down Expand Up @@ -572,7 +572,7 @@ func (t *DynamicReadinessTracker) trackDaemonSet(ctx context.Context, tracker *d
t.taskState.RWTransaction(func(ts *statestore.ReadinessTaskState) {
t.handlePodsFromDaemonSetStatus(&report.DaemonSetStatus, ts)
t.handleDaemonSetStatus(&report.DaemonSetStatus, ts)
t.handleReplicaSetPodError(&report.PodError, ts)
t.handlePodError(&report.PodError.PodError, ts)
abort, abortErr = t.handleTaskStateStatus(ts)
})

Expand Down Expand Up @@ -946,10 +946,6 @@ func (t *DynamicReadinessTracker) handlePodsFromDeploymentPodAddedReport(report
}

func (t *DynamicReadinessTracker) handlePodsFromStatefulSetPodAddedReport(report *statefulset.PodAddedReport, taskState *statestore.ReadinessTaskState) {
if !report.ReplicaSetPod.ReplicaSet.IsNew {
return
}

taskState.AddResourceState(report.ReplicaSetPod.Name, taskState.Namespace(), podGvk)
taskState.AddDependency(taskState.Name(), taskState.Namespace(), taskState.GroupVersionKind(), report.ReplicaSetPod.Name, taskState.Namespace(), podGvk)

Expand All @@ -963,10 +959,6 @@ func (t *DynamicReadinessTracker) handlePodsFromStatefulSetPodAddedReport(report
}

func (t *DynamicReadinessTracker) handlePodsFromDaemonSetPodAddedReport(report *daemonset.PodAddedReport, taskState *statestore.ReadinessTaskState) {
if !report.Pod.ReplicaSet.IsNew {
return
}

taskState.AddResourceState(report.Pod.Name, taskState.Namespace(), podGvk)
taskState.AddDependency(taskState.Name(), taskState.Namespace(), taskState.GroupVersionKind(), report.Pod.Name, taskState.Namespace(), podGvk)

Expand Down

0 comments on commit b9b3803

Please sign in to comment.