Skip to content

Commit 5060434

Browse files
author
Mikkel Mork Hegnhoj
authored
Merge pull request #133 from hongchaodeng/scope_health
ApplicationScope: add `health` core scope
2 parents 04fda67 + 2da16c3 commit 5060434

File tree

1 file changed

+34
-14
lines changed

1 file changed

+34
-14
lines changed

4.application_scopes.md

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -133,32 +133,52 @@ The health scope on its own does not take any action based on health status. It
133133
- Application upgrade traits can monitor the aggregate health of a health scope and decide when to initiate an automatic rollback.
134134
- Monitoring applications can monitor the aggregate health of a health scope to issue alerts.
135135
136-
#### Example
137-
This is an example of a health scope definition.
136+
The health scope is defined by the following spec:
137+
138138
```yaml
139139
apiVersion: core.hydra.io/v1alpha1
140140
kind: ApplicationScope
141141
metadata:
142-
name: myHealthScope
142+
name: health
143143
annotations:
144144
version: v1.0.0
145-
description: "The production configuration for Corp CMS"
145+
description: "aggregated health state for a group of components."
146146
spec:
147-
type: core.hydra.io/v1.HealthScope
147+
type: core.hydra.io/v1alpha1.HealthScope
148148
allowComponentOverlap: true
149149
parameters:
150-
- name: healthThresholdPercentage
151-
description: The % of healthy components required to upgrade scope
152-
type: double
153-
required: Y
154-
- name: logAnalyticsQueryId
155-
description: an Id for querying log data from your log system
150+
- name: probe-method
151+
description: The method to probe the components, e.g. 'httpGet'.
156152
type: string
157-
required: false
158-
- name: logAnalyticsQueryKey
159-
description: a key for querying log data from your log system
153+
required: true
154+
- name: probe-endpoint
155+
description: The endpoint to probe from the components, e.g. '/v1/health'.
160156
type: string
157+
required: true
158+
- name: probe-timeout
159+
description: The amount of time in seconds to wait when receiving a response before marked failure.
160+
type: integer
161161
required: false
162+
- name: probe-interval
163+
description: The amount of time in seconds between probing tries.
164+
type: integer
165+
required: false
166+
- name: failure-rate-threshold
167+
description: If the rate of failure of total probe results is above this threshold, declared 'failed'.
168+
type: double
169+
required: false
170+
- name: healthy-rate-threshold
171+
description: If the rate of healthy of total probe results is above this threshold, declared 'healthy'.
172+
type: double
173+
required: false
174+
- name: healthThresholdPercentage
175+
description: The % of healthy components required to upgrade scope
176+
type: double
177+
required: N
178+
- name: requiredHealthyComponents
179+
description: Comma-separated list of names of the components required to be healthy for the scope to be health.
180+
type: string
181+
required: N
162182
```
163183
164184
## Extended application scope type definitions

0 commit comments

Comments
 (0)