mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-15 23:03:40 +00:00
add status check of startupProbe
This commit is contained in:
parent
aa9a9e86e1
commit
11ddb97c5f
@ -316,12 +316,12 @@ func (w *worker) doProbe(ctx context.Context) (keepGoing bool) {
|
|||||||
|
|
||||||
w.resultsManager.Set(w.containerID, result, w.pod)
|
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.
|
// 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
|
// Stop probing until we see a new container ID. This is to reduce the
|
||||||
// chance of hitting #21751, where running `docker exec` when a
|
// chance of hitting #21751, where running `docker exec` when a
|
||||||
// container is being stopped may lead to corrupted container state.
|
// 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.
|
// until the container is restarted.
|
||||||
// This is to prevent extra Probe executions #117153.
|
// This is to prevent extra Probe executions #117153.
|
||||||
w.onHold = true
|
w.onHold = true
|
||||||
|
Loading…
Reference in New Issue
Block a user