From b3f9f1682f597816523ed7a29dc1fc4191e54a3e Mon Sep 17 00:00:00 2001 From: mochizuki875 Date: Fri, 30 Aug 2024 06:50:58 +0000 Subject: [PATCH] shift the periodics timer --- pkg/kubelet/prober/worker.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/kubelet/prober/worker.go b/pkg/kubelet/prober/worker.go index 54aa1cad8fe..be886525eb8 100644 --- a/pkg/kubelet/prober/worker.go +++ b/pkg/kubelet/prober/worker.go @@ -178,10 +178,13 @@ probeLoop: case <-w.stopCh: break probeLoop case <-probeTicker.C: - klog.V(3).InfoS("Triggerd Probe by periodSeconds", "probeType", w.probeType, "pod", klog.KObj(w.pod), "podUID", w.pod.UID, "containerName", w.container.Name) + klog.V(4).InfoS("Triggerd Probe by periodSeconds", "probeType", w.probeType, "pod", klog.KObj(w.pod), "podUID", w.pod.UID, "containerName", w.container.Name) // continue case <-w.manualTriggerCh: - klog.V(3).InfoS("Triggerd Probe by manual run", "probeType", w.probeType, "pod", klog.KObj(w.pod), "podUID", w.pod.UID, "containerName", w.container.Name) + // Updating the periodic timer to run the probe again at intervals of probeTickerPeriod + // starting from the moment a manual run occurs. + probeTicker.Reset(probeTickerPeriod) + klog.V(4).InfoS("Triggerd Probe by manual run", "probeType", w.probeType, "pod", klog.KObj(w.pod), "podUID", w.pod.UID, "containerName", w.container.Name) // continue } }