From 4c97316c02b8bf213ae6182197e82ce4b2acbf7f Mon Sep 17 00:00:00 2001 From: Nimrod Gilboa Markevich <59927337+nimrod-up9@users.noreply.github.com> Date: Tue, 23 Nov 2021 10:03:36 +0200 Subject: [PATCH] Remove prevPodPhase (#497) prevPodPhase does not take into account the fact that there may be more than one tapper pod. Therefore it is not clear what its value represents. It is only used in a debug print. It is not worth the effort to fix for that one debug print. Co-authored-by: gadotroee <55343099+gadotroee@users.noreply.github.com> --- cli/cmd/tapRunner.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cli/cmd/tapRunner.go b/cli/cmd/tapRunner.go index 17b5d76d3..b1ffc5ff2 100644 --- a/cli/cmd/tapRunner.go +++ b/cli/cmd/tapRunner.go @@ -655,7 +655,6 @@ func watchTapperPod(ctx context.Context, kubernetesProvider *kubernetes.Provider podExactRegex := regexp.MustCompile(fmt.Sprintf("^%s.*", kubernetes.TapperDaemonSetName)) podWatchHelper := kubernetes.NewPodWatchHelper(kubernetesProvider, podExactRegex) added, modified, removed, errorChan := kubernetes.FilteredWatch(ctx, podWatchHelper, []string{config.Config.MizuResourcesNamespace}, podWatchHelper) - var prevPodPhase core.PodPhase for { select { case wEvent, ok := <-added: @@ -707,11 +706,6 @@ func watchTapperPod(ctx context.Context, kubernetesProvider *kubernetes.Provider } podStatus := modifiedPod.Status - if podStatus.Phase == core.PodPending && prevPodPhase == podStatus.Phase { - logger.Log.Debugf("Tapper %s is %s", modifiedPod.Name, strings.ToLower(string(podStatus.Phase))) - continue - } - prevPodPhase = podStatus.Phase if podStatus.Phase == core.PodRunning { state := podStatus.ContainerStatuses[0].State