From 8aca45a478a10c847c615eab800709cebd12d401 Mon Sep 17 00:00:00 2001 From: Ilya Lesikov Date: Thu, 29 Feb 2024 14:42:53 +0300 Subject: [PATCH] fix: tracking old deployment pods as new Should work MOST of the time. Signed-off-by: Ilya Lesikov --- pkg/tracker/deployment/tracker.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/tracker/deployment/tracker.go b/pkg/tracker/deployment/tracker.go index 715e930..bfa4bb4 100644 --- a/pkg/tracker/deployment/tracker.go +++ b/pkg/tracker/deployment/tracker.go @@ -558,6 +558,8 @@ func (d *Tracker) handleDeploymentState(ctx context.Context, object *appsv1.Depl switch d.State { case tracker.Initial: d.runReplicaSetsInformer(ctx, object) + // TODO: If pod events handled before any replicasets found, then during the handling we can't determine whether the pod is for the new or for the old replicaset. Needs some proper solution instead of time.Sleep. + time.Sleep(1500 * time.Millisecond) d.runPodsInformer(ctx, object) if os.Getenv("KUBEDOG_DISABLE_EVENTS") != "1" {