What is the default value of initialDelaySeconds

醉酒当歌 提交于 2019-11-30 16:45:41

问题


Kubernetes' liveness and readiness prob for pods (deployment) can be configured with this initial delay ---- meaning the prob will start after this many sends after the container is up. If it is not specified, what is the default value? I can't seem to find it. The default value for periodSeconds is documented as 10 second.

Thanks


回答1:


It seems that the default value of 0 is missing from the documentation.

The health or readiness check algorithm works like this:

  1. Wait for initialDelaySeconds
  2. Perform readiness check and wait timeoutSeconds for a timeout
  3. If the number of continued successes is greater than successThreshold return success
    If the number of continued failures is greater than failureThreshold return failure
    otherwise wait periodSeconds and start a new readiness check



回答2:


Given the pace at which the project changes, I wanted to make sure the code actually confirms this.

Found a test in the public Kubernetes repo that verifies the default settings for probes:

    expectedProbe := v1.Probe{
        InitialDelaySeconds: 0,
        TimeoutSeconds:      1,
        PeriodSeconds:       10,
        SuccessThreshold:    1,
        FailureThreshold:    3,
    }

See method TestSetDefaultProbe in

https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/core/v1/defaults_test.go



来源:https://stackoverflow.com/questions/48572691/what-is-the-default-value-of-initialdelayseconds

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!