-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ci job for validating stable metrics
Add ci job for validating stable metrics
- Loading branch information
1 parent
10d68e9
commit a9fd176
Showing
4 changed files
with
50 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
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
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,6 @@ | ||
- name: kube_pod_init_container_status_restarts_total | ||
help: The number of restarts for the init container. | ||
type: Counter | ||
stabilityLevel: STABLE | ||
labels: | ||
- container2 |
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,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
|
||
temp_file=$(mktemp) | ||
metric_file='internal/store/pod.go' | ||
|
||
go run \ | ||
"tests/stablemetrics/main.go" \ | ||
"tests/stablemetrics/decode_metric.go" \ | ||
"tests/stablemetrics/find_stable_metric.go" \ | ||
"tests/stablemetrics/error.go" \ | ||
"tests/stablemetrics/metric.go" \ | ||
-- \ | ||
"${metric_file}" >"${temp_file}" | ||
|
||
|
||
if diff -u "tests/stablemetrics/testdata/test-stable-metrics-list.yaml" "$temp_file"; then | ||
echo -e "PASS metrics stability verification" | ||
fi |