-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: startupProbe
to avoid a long initial delay seconds for liveness probe
#174
Conversation
# -- Probe frequency in seconds | ||
periodSeconds: 10 | ||
periodSeconds: 20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
readiness probe must fail before liveness probe. otherwise container stops receiving traffic and restarts at the same time.
@@ -133,7 +145,7 @@ opencost: | |||
# -- Probe path | |||
path: /healthz | |||
# -- Number of seconds before probe is initiated | |||
initialDelaySeconds: 120 | |||
initialDelaySeconds: 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally you should run readiness as soon as the container comes up
7ec9de4
to
7e5c172
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we were having issues in our environment, when we reduced the liveness probe timeout.
This change solves the issue in a more efficent way.
In the worst case scenario kubernetes wait up to 160 seconds for container start, but it will proceed as soon as the container pass the probe.
Best case scenario if it starts fast it will wait only 10 seconds.
This allows kubernetes to wait for the container startup in a more efficient way, soon as the container starts, then it benefits of a faster liveness probe and readiness probe.
…ss probe Signed-off-by: Amir Alavi <[email protected]>
7e5c172
to
c2897d5
Compare
https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
Kubernetes Docs: