shift the periodics timer

This commit is contained in:
mochizuki875 2024-08-30 06:50:58 +00:00
parent f337511ba5
commit b3f9f1682f

View File

@ -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
}
}