-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Updating Liveness and Readiness Docs #3494
Conversation
…ith more detailed "configuration" section, other small tweaks
|
||
{% capture discussion %} | ||
Readiness and liveness probes can be used in parallel for the same container. | ||
Using both can ensure that traffic does not reach a container that isnot ready |
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.
nit: s/isnot/is not/g
* httpHeaders | ||
* `host`: Host name to connect to, defaults to the pod IP. You probably want to | ||
set "Host" in httpHeaders instead. | ||
* `scheme`: Custom headers to set in the request. HTTP allows repeated headers. |
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.
This is incorrect. You describe scheme
below (correctly).
* `host`: Host name to connect to, defaults to the pod IP. You probably want to | ||
set "Host" in httpHeaders instead. | ||
* `scheme`: Custom headers to set in the request. HTTP allows repeated headers. | ||
* `httpHeaders`: Path to access on the HTTP server. |
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.
Again incorrect.
image: gcr.io/google_containers/goproxy:0.1 | ||
ports: | ||
- containerPort: 8080 | ||
readinessProbe: |
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.
The name of this yaml says liveness
, but it has a readinessProbe
. I'd recommend adding multiple examples each showing all the available fields/features..
@vishh Thanks for reviewing this! Sorry for all the field configuration errors, not sure how I screwed up the order on those... I've updated the TCP example to include both a liveness and readiness probe. |
initialDelaySeconds: 5 | ||
periodSeconds: 10 | ||
livenessProbe: | ||
tcpSocket: |
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.
Can you post a http probe here?
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.
I was originally trying to keep this section dedicated to TCP probes to complement the earlier exec
and httpGet
examples. I'd be concerned that adding too many types of probes in a single example could get confusing. Do you think it would work to add a note here that a single container can use all kinds of probes at the same time? If not, I can definitely work on reworking the example to include multiple types of checks.
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.
My bad. I did not realize that the name of the file has tcp
in it. LGTM
/lgtm |
* adding documentation for TCP checks, replacing "discussion" section with more detailed "configuration" section, other small tweaks * some line breaks and a small tweak * tweaking config section * fixing problems with http get field descriptions, more detailed TCP example
This addresses #3381, #1909, and #3435. There are two key parts to this PR:
Adding a TCP check example.
Adding better documentation for the fields available on probes.
I'm not sure if the final "Configuring Probes" section is too detailed for a "task". If so, I'm open to ideas for how I could better integrate that information.
This change is