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

Only health at container level #23

Closed
surajssd opened this issue Jun 14, 2017 · 1 comment
Closed

Only health at container level #23

surajssd opened this issue Jun 14, 2017 · 1 comment

Comments

@surajssd
Copy link
Member

Right now pod spec allows you to do both livenessProbe and readinessProbe and since both the fields represent the same data strcuture behind the scene which is called probes.

So a container will look like the following:

containers:
- image: wordpress:4
  health:
    httpGet:
      path: /
      port: 80
    initialDelaySeconds: 120
    timeoutSeconds: 5

the pod that is generated out of this will look like this:

containers:
- image: wordpress:4
  livenessProbe:
    httpGet:
      path: /
      port: 80
    initialDelaySeconds: 120
    timeoutSeconds: 5
  readinessProbe:
    httpGet:
      path: /
      port: 80
    initialDelaySeconds: 120
    timeoutSeconds: 5

So essentially you just specify health field which is probe type and then it is populated into readinessProbe and livenessProbe in the output. But if user provides the fields readinessProbe or livenessProbe explicitly then health field is ignored! Those fields are used directly.

@kadel
Copy link
Member

kadel commented Jun 14, 2017

agreed, with one exception. Let's fail if there is health field with readinessProbe or livenessProbe defined

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants