Skip to content

Commit

Permalink
fix: tracking old deployment pods as new
Browse files Browse the repository at this point in the history
Should work MOST of the time.

Signed-off-by: Ilya Lesikov <ilya@lesikov.com>
  • Loading branch information
ilya-lesikov committed Feb 29, 2024
1 parent 1f9e048 commit 8aca45a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/tracker/deployment/tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down

0 comments on commit 8aca45a

Please sign in to comment.