Adds healthcheck

This PR adds support for HealthCheck, being able to supply, for example:

```yaml
version: "3"

services:
  redis:
    image: redis
    healthcheck:
      test: echo "hello world"
      interval: 10s
      timeout: 1s
      retries: 5
```

Which is then converted to:

```yaml
spec:
  containers:
  - image: redis
    livenessProbe:
      exec:
        command:
        - echo "hello world"
      failureThreshold: 5
      periodSeconds: 10
      timeoutSeconds: 1
    name: redis
    resources: {}
  restartPolicy: Always
```

At the moment, this only supports livenessProbe, with support for readinessProbe in the future.
This commit is contained in:
Charlie Drage
2017-08-25 10:02:51 -04:00
parent 2ff2d38ed1
commit 2e99b8fd3a
11 changed files with 391 additions and 3 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ __Glossary:__
| external_links | X | X | X | | Kubernetes uses a flat-structure for all containers and thus external_links does not have a 1-1 conversion |
| extra_hosts | N | N | N | | |
| group_add | ✓ | ✓ | ✓ | | |
| healthcheck | - | N | N | | |
| healthcheck | - | N | | | |
| image | ✓ | ✓ | ✓ | Deployment.Spec.Containers.Image | |
| isolation | X | X | X | | Not applicable as this applies to Windows with HyperV support |
| labels | ✓ | ✓ | ✓ | Metadata.Annotations | |