-
Notifications
You must be signed in to change notification settings - Fork 0
/
spec.yaml
124 lines (121 loc) · 3.74 KB
/
spec.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
openapi: 3.0.3
info:
title: Management control interface
description: Service management interface
version: 0.0.1
paths:
/started:
get:
summary: Application startup state.
description: |-
Returns information if the application is already started or not.
responses:
'200':
description: Application is in an operating state
content:
text/plain:
schema:
oneOf:
- $ref: "#/components/schemas/Ok"
- $ref: "#/components/schemas/TearingDown"
'400':
description: Application is in a starting state
content:
text/plain:
schema:
oneOf:
- $ref: "#/components/schemas/Starting"
/ready:
get:
summary: Application readiness state.
description: |-
Tells if the k8s can route the traffic to this application. K8s periodically checks this
endpoint in order to understand if it can route traffic there.
responses:
'200':
description: Application is in an operating state
content:
text/plain:
schema:
oneOf:
- $ref: "#/components/schemas/Running"
'400':
description: Application is in a starting state
content:
text/plain:
schema:
oneOf:
- $ref: "#/components/schemas/Starting"
- $ref: "#/components/schemas/NotRunning"
- $ref: "#/components/schemas/TearingDown"
/health:
get:
summary: Application liveness state.
description: |-
Tells if the application is alive, if not k8s can restart this instance.
responses:
'200':
description: Application is in an operating state
content:
text/plain:
schema:
oneOf:
- $ref: "#/components/schemas/Running"
'400':
description: Application is in a starting state
content:
text/plain:
schema:
oneOf:
- $ref: "#/components/schemas/Starting"
- $ref: "#/components/schemas/Unhealthy"
/stop:
get:
summary: Request application teardown.
description: |-
Tells if to gracefully teardown, after being called the ready endpoint starts returning 400,
and no new traffic is accepted. All current requestes are processed.
If users' appliction does not exit withing allowed timeout it's killed forcefully.
responses:
'200':
description: Application has accepted the teardown request
content:
text/plain:
schema:
oneOf:
- $ref: "#/components/schemas/TearingDown"
/_metrics:
get:
summary: Output metrics in prometheus format
description: |-
Output all the metrics provided by the application
responses:
'200':
description: Metrics for the application
content:
text/plain:
schema:
type: string
components:
schemas:
Ok:
type: string
enum: ["ok"]
description: Application is working
Running:
type: string
enum: ["running"]
description: Application is running
NotRunning:
type: string
enum: ["not running"]
description: Application is not running
TearingDown:
enum: ["tearing down"]
description: Application is tearing down
Starting:
enum: ["starting"]
description: Application is starting
Unhealthy:
enum: ["unhealthy"]
description: Application is unhealthy