From 11ddb97c5ffd60425ccdc07d971e1d33bcb8b387 Mon Sep 17 00:00:00 2001 From: mochizuki875 Date: Mon, 23 Oct 2023 06:26:01 +0000 Subject: [PATCH] add status check of startupProbe --- pkg/kubelet/prober/worker.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/kubelet/prober/worker.go b/pkg/kubelet/prober/worker.go index 5dd1ef271c7..86200fe1538 100644 --- a/pkg/kubelet/prober/worker.go +++ b/pkg/kubelet/prober/worker.go @@ -316,12 +316,12 @@ func (w *worker) doProbe(ctx context.Context) (keepGoing bool) { w.resultsManager.Set(w.containerID, result, w.pod) - if (w.probeType == liveness && result == results.Failure) || w.probeType == startup { + if (w.probeType == liveness && result == results.Failure) || (w.probeType == startup && (result == results.Success || result == results.Failure)) { // The container fails a liveness/startup check, it will need to be restarted. // Stop probing until we see a new container ID. This is to reduce the // chance of hitting #21751, where running `docker exec` when a // container is being stopped may lead to corrupted container state. - // In addition, if the container succeeds a startup probe, we should stop probing + // In addition, if the threshold for each result of a startup probe is exceeded, we should stop probing // until the container is restarted. // This is to prevent extra Probe executions #117153. w.onHold = true