forked from keptn/lifecycle-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(lifecycle-operator): introduce metric showing readiness of opera…
…tor (keptn#2152) Signed-off-by: Geoffrey Israel <[email protected]> Co-authored-by: Giovanni Liva <[email protected]>
- Loading branch information
1 parent
e775657
commit ec1fabb
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
test/testmetrics/metrics/04-teststep-check-active-metrics.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: kuttl.dev/v1 | ||
kind: TestStep | ||
commands: | ||
- script: ./check-active-metrics.sh "keptn_lifecycle_active" | ||
validate: | ||
assert: | ||
- contains: | ||
- "keptn_lifecycle_active" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
# Usage: ./retrieve-metrics.sh <component_name> | ||
|
||
component_name=$1 | ||
|
||
metrics_url="http://lifecycle-operator-metrics-service.keptn-lifecycle-toolkit-system.svc.cluster.local:2222/metrics" | ||
|
||
# Fetch keptn_lifecycle_active metrics | ||
metrics=$(curl -s $metrics_url | grep "${component_name}") | ||
|
||
echo "$metrics" |