Skip to content

Commit

Permalink
Merge pull request #133 from hongchaodeng/scope_health
Browse files Browse the repository at this point in the history
ApplicationScope: add `health` core scope
  • Loading branch information
Mikkel Mork Hegnhoj authored Sep 13, 2019
2 parents 04fda67 + 2da16c3 commit 5060434
Showing 1 changed file with 34 additions and 14 deletions.
48 changes: 34 additions & 14 deletions 4.application_scopes.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,32 +133,52 @@ The health scope on its own does not take any action based on health status. It
- Application upgrade traits can monitor the aggregate health of a health scope and decide when to initiate an automatic rollback.
- Monitoring applications can monitor the aggregate health of a health scope to issue alerts.
#### Example
This is an example of a health scope definition.
The health scope is defined by the following spec:
```yaml
apiVersion: core.hydra.io/v1alpha1
kind: ApplicationScope
metadata:
name: myHealthScope
name: health
annotations:
version: v1.0.0
description: "The production configuration for Corp CMS"
description: "aggregated health state for a group of components."
spec:
type: core.hydra.io/v1.HealthScope
type: core.hydra.io/v1alpha1.HealthScope
allowComponentOverlap: true
parameters:
- name: healthThresholdPercentage
description: The % of healthy components required to upgrade scope
type: double
required: Y
- name: logAnalyticsQueryId
description: an Id for querying log data from your log system
- name: probe-method
description: The method to probe the components, e.g. 'httpGet'.
type: string
required: false
- name: logAnalyticsQueryKey
description: a key for querying log data from your log system
required: true
- name: probe-endpoint
description: The endpoint to probe from the components, e.g. '/v1/health'.
type: string
required: true
- name: probe-timeout
description: The amount of time in seconds to wait when receiving a response before marked failure.
type: integer
required: false
- name: probe-interval
description: The amount of time in seconds between probing tries.
type: integer
required: false
- name: failure-rate-threshold
description: If the rate of failure of total probe results is above this threshold, declared 'failed'.
type: double
required: false
- name: healthy-rate-threshold
description: If the rate of healthy of total probe results is above this threshold, declared 'healthy'.
type: double
required: false
- name: healthThresholdPercentage
description: The % of healthy components required to upgrade scope
type: double
required: N
- name: requiredHealthyComponents
description: Comma-separated list of names of the components required to be healthy for the scope to be health.
type: string
required: N
```
## Extended application scope type definitions
Expand Down

0 comments on commit 5060434

Please sign in to comment.