Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #607 from cdrage/improve-documentation-on-health
Browse files Browse the repository at this point in the history
Improve documentation on health
  • Loading branch information
concaf authored Mar 5, 2018
2 parents dbcc6fe + e815417 commit b3e6cc7
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions docs/file-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,26 @@ containers:
health: <probe>
```

| Type | Required | Description |
|--------|----------|-------------------------------------------------------------------|
| string | yes | The name of the app or microservice this particular file defines. |
> Using health with a Guestbook example

```yaml
deployments:
- containers:
- name: guestbook
image: gcr.io/google_containers/guestbook:v3
health:
httpGet:
path: /
port: 3000
initialDelaySeconds: 20
timeoutSeconds: 5
```

| Type | Required | Description |
|--------|----------|-------------------------------------------------------------------------------------------------------------------------------------|
| string | yes | A probe as defined by [Kubernetes Probe v1 core](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.9/#probe-v1-core) |

This is `probe` spec. Rather than defining `livenessProbe` and `readinessProbe`, define only `health`. And then it gets copied in both in the resultant spec.
But if `health` and `livenessProbe` or `readinessProbe` are defined simultaneously then the tool will error out.
`health` copies a [Kubernetes Probe spec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.9/#probe-v1-core) to both `livenessProbe` and `readinessProbe`. Thus only having to define it once.

### Kubernetes extension

Expand Down

0 comments on commit b3e6cc7

Please sign in to comment.