Skip to content
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

Merged
merged 5 commits into from
Apr 24, 2017
Merged

Conversation

robscott
Copy link
Member

@robscott robscott commented Apr 21, 2017

This addresses #3381, #1909, and #3435. There are two key parts to this PR:

  1. Adding a TCP check example.

  2. 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 Reviewable

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 21, 2017
@chenopis chenopis self-assigned this Apr 24, 2017
@chenopis chenopis requested a review from vishh April 24, 2017 19:23

{% 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
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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:
Copy link
Contributor

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..

@robscott
Copy link
Member Author

@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:
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

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

@vishh
Copy link
Contributor

vishh commented Apr 24, 2017

/lgtm

@chenopis chenopis merged commit 0bed147 into kubernetes:master Apr 24, 2017
gyliu513 pushed a commit to gyliu513/kubernetes.github.io that referenced this pull request Apr 26, 2017
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants