Skip to content

Commit 11ddb97

Browse files
committed
add status check of startupProbe
1 parent aa9a9e8 commit 11ddb97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/kubelet/prober/worker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,12 +316,12 @@ func (w *worker) doProbe(ctx context.Context) (keepGoing bool) {
316316

317317
w.resultsManager.Set(w.containerID, result, w.pod)
318318

319-
if (w.probeType == liveness && result == results.Failure) || w.probeType == startup {
319+
if (w.probeType == liveness && result == results.Failure) || (w.probeType == startup && (result == results.Success || result == results.Failure)) {
320320
// The container fails a liveness/startup check, it will need to be restarted.
321321
// Stop probing until we see a new container ID. This is to reduce the
322322
// chance of hitting #21751, where running `docker exec` when a
323323
// container is being stopped may lead to corrupted container state.
324-
// In addition, if the container succeeds a startup probe, we should stop probing
324+
// In addition, if the threshold for each result of a startup probe is exceeded, we should stop probing
325325
// until the container is restarted.
326326
// This is to prevent extra Probe executions #117153.
327327
w.onHold = true

0 commit comments

Comments
 (0)