Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 02ea27b

Browse files
committed
swagger: add missing container Health docs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 9ae7196775dddeb49be5195e00572a55b3c4658a) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 67ac9ab190998499e9c8ae7ffb312ca221a1a58c Component: engine
1 parent 517eb6a commit 02ea27b

1 file changed

Lines changed: 78 additions & 0 deletions

File tree

components/engine/api/swagger.yaml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,71 @@ definitions:
618618
description: "Start period for the container to initialize before starting health-retries countdown in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit."
619619
type: "integer"
620620

621+
Health:
622+
description: |
623+
Health stores information about the container's healthcheck results.
624+
type: "object"
625+
properties:
626+
Status:
627+
description: |
628+
Status is one of `none`, `starting`, `healthy` or `unhealthy`
629+
630+
- "none" Indicates there is no healthcheck
631+
- "starting" Starting indicates that the container is not yet ready
632+
- "healthy" Healthy indicates that the container is running correctly
633+
- "unhealthy" Unhealthy indicates that the container has a problem
634+
type: "string"
635+
enum:
636+
- "none"
637+
- "starting"
638+
- "healthy"
639+
- "unhealthy"
640+
example: "healthy"
641+
FailingStreak:
642+
description: "FailingStreak is the number of consecutive failures"
643+
type: "integer"
644+
example: 0
645+
Log:
646+
type: "array"
647+
description: |
648+
Log contains the last few results (oldest first)
649+
items:
650+
x-nullable: true
651+
$ref: "#/definitions/HealthcheckResult"
652+
653+
HealthcheckResult:
654+
description: |
655+
HealthcheckResult stores information about a single run of a healthcheck probe
656+
type: "object"
657+
properties:
658+
Start:
659+
description: |
660+
Date and time at which this check started in
661+
[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
662+
type: "string"
663+
format: "date-time"
664+
example: "2020-01-04T10:44:24.496525531Z"
665+
End:
666+
description: |
667+
Date and time at which this check ended in
668+
[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
669+
type: "string"
670+
format: "dateTime"
671+
example: "2020-01-04T10:45:21.364524523Z"
672+
ExitCode:
673+
description: |
674+
ExitCode meanings:
675+
676+
- `0` healthy
677+
- `1` unhealthy
678+
- `2` reserved (considered unhealthy)
679+
- other values: error running probe
680+
type: "integer"
681+
example: 0
682+
Output:
683+
description: "Output from last check"
684+
type: "string"
685+
621686
HostConfig:
622687
description: "Container configuration that depends on the host we are running on"
623688
allOf:
@@ -3689,6 +3754,9 @@ definitions:
36893754
description: "The time when this container last exited."
36903755
type: "string"
36913756
example: "2020-01-06T09:07:59.461876391Z"
3757+
Health:
3758+
x-nullable: true
3759+
$ref: "#/definitions/Health"
36923760

36933761
SystemInfo:
36943762
type: "object"
@@ -4994,6 +5062,8 @@ paths:
49945062
Domainname: ""
49955063
Env:
49965064
- "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
5065+
Healthcheck:
5066+
Test: ["CMD-SHELL", "exit 0"]
49975067
Hostname: "ba033ac44011"
49985068
Image: "ubuntu"
49995069
Labels:
@@ -5105,6 +5175,14 @@ paths:
51055175
Error: ""
51065176
ExitCode: 9
51075177
FinishedAt: "2015-01-06T15:47:32.080254511Z"
5178+
Health:
5179+
Status: "healthy"
5180+
FailingStreak: 0
5181+
Log:
5182+
- Start: "2019-12-22T10:59:05.6385933Z"
5183+
End: "2019-12-22T10:59:05.8078452Z"
5184+
ExitCode: 0
5185+
Output: ""
51085186
OOMKilled: false
51095187
Dead: false
51105188
Paused: false

0 commit comments

Comments
 (0)