...
1This directory contains the regression test for controlling the list of stable metrics
2
3If you add or remove a stable metric, this test will fail and you will need
4to update the golden list of tests stored in `testdata/`. Changes to that file
5require review by sig-instrumentation.
6
7To update the list, run
8
9```console
10./hack/update-generated-stable-metrics.sh
11```
12
13Add the changed file to your PR, then send for review.
14
15If you want to test the stability framework, you can add metrics to the file in
16`test/instrumentation/testdata/pkg/kubelet/metrics/metrics.go` and run test
17verification via:
18
19```console
20./test/instrumentation/test-verify.sh
21```
22
23To update the golden test list, you can run:
24
25```console
26./test/instrumentation/test-update.sh
27```
28
29To update the list of documented metrics, please run:
30
31```console
32./test/instrumentation/update-documentation-metrics.sh
33```
34
35To update the documented list of metrics for k8s/website, please run:
36
37```console
38./test/instrumentation/update-documentation.sh
39```
40
41Then you need to copy the output to the appropriate website directory. Please
42define the directory in which the website repo lives in an env variable like so:
43
44```shell
45export WEBSITE_ROOT=<path to website root>
46```
47
48And then from the root of the k8s/k8s repository, please run this command:
49
50```shell
51cp ./test/instrumentation/documentation/documentation.md $WEBSITE_ROOT/content/en/docs/reference/instrumentation/metrics.md
52```
View as plain text