-
Notifications
You must be signed in to change notification settings - Fork 118
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 (#2152) Signed-off-by: Geoffrey Israel <israelgeoffrey13@gmail.com> Co-authored-by: Giovanni Liva <giovanni.liva@dynatrace.com>
- Loading branch information
1 parent
25976ea
commit c0e3f48
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" |