mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-20 00:08:02 +01:00
docs: Health check endpoint (#3959)
### What Adds documentation for the health check endpoint. --------- Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
This commit is contained in:
parent
d410f4774c
commit
7003351b35
@ -112,7 +112,6 @@ const metaRules: Rule[] = [
|
||||
'groupSchema',
|
||||
'groupsSchema',
|
||||
'groupUserModelSchema',
|
||||
'healthCheckSchema',
|
||||
'idSchema',
|
||||
'instanceAdminStatsSchema',
|
||||
'legalValueSchema',
|
||||
@ -217,7 +216,6 @@ const metaRules: Rule[] = [
|
||||
'groupSchema',
|
||||
'groupsSchema',
|
||||
'groupUserModelSchema',
|
||||
'healthCheckSchema',
|
||||
'idSchema',
|
||||
'instanceAdminStatsSchema',
|
||||
'legalValueSchema',
|
||||
|
@ -3,12 +3,17 @@ import { FromSchema } from 'json-schema-to-ts';
|
||||
export const healthCheckSchema = {
|
||||
$id: '#/components/schemas/healthCheckSchema',
|
||||
type: 'object',
|
||||
description:
|
||||
'Used by service orchestrators to decide whether this Unleash instance should be marked as healthy or unhealthy',
|
||||
additionalProperties: false,
|
||||
required: ['health'],
|
||||
properties: {
|
||||
health: {
|
||||
description:
|
||||
'The state this Unleash instance is in. GOOD if everything is ok, BAD if the instance should be restarted',
|
||||
type: 'string',
|
||||
enum: ['GOOD', 'BAD'],
|
||||
example: 'GOOD',
|
||||
},
|
||||
},
|
||||
components: {},
|
||||
|
@ -31,6 +31,9 @@ export class HealthCheckController extends Controller {
|
||||
openApiService.validPath({
|
||||
tags: ['Operational'],
|
||||
operationId: 'getHealth',
|
||||
summary: 'Get instance operational status',
|
||||
description:
|
||||
'This operation returns information about whether this Unleash instance is healthy and ready to serve requests or not. Typically used by your deployment orchestrator (e.g. Kubernetes, Docker Swarm, Mesos, et al.).',
|
||||
responses: {
|
||||
200: createResponseSchema('healthCheckSchema'),
|
||||
500: createResponseSchema('healthCheckSchema'),
|
||||
|
@ -2737,12 +2737,15 @@ The provider you choose for your addon dictates what properties the \`parameters
|
||||
},
|
||||
"healthCheckSchema": {
|
||||
"additionalProperties": false,
|
||||
"description": "Used by service orchestrators to decide whether this Unleash instance should be marked as healthy or unhealthy",
|
||||
"properties": {
|
||||
"health": {
|
||||
"description": "The state this Unleash instance is in. GOOD if everything is ok, BAD if the instance should be restarted",
|
||||
"enum": [
|
||||
"GOOD",
|
||||
"BAD",
|
||||
],
|
||||
"example": "GOOD",
|
||||
"type": "string",
|
||||
},
|
||||
},
|
||||
@ -13726,6 +13729,7 @@ If the provided project does not exist, the list of events will be empty.",
|
||||
},
|
||||
"/health": {
|
||||
"get": {
|
||||
"description": "This operation returns information about whether this Unleash instance is healthy and ready to serve requests or not. Typically used by your deployment orchestrator (e.g. Kubernetes, Docker Swarm, Mesos, et al.).",
|
||||
"operationId": "getHealth",
|
||||
"responses": {
|
||||
"200": {
|
||||
@ -13749,6 +13753,7 @@ If the provided project does not exist, the list of events will be empty.",
|
||||
"description": "healthCheckSchema",
|
||||
},
|
||||
},
|
||||
"summary": "Get instance operational status",
|
||||
"tags": [
|
||||
"Operational",
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user