mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
update documentation for stability framework
Change-Id: Id3fea91aac9c6faf2c920b1a0bec721e930a99ae
This commit is contained in:
parent
f9bfa378ef
commit
13e7fd8ed1
@ -26,8 +26,7 @@ To update the golden test list, you can run:
|
|||||||
./test/instrumentation/test-update.sh
|
./test/instrumentation/test-update.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
To update the list of documented metrics (which you need to run first before
|
To update the list of documented metrics, please run:
|
||||||
upgrading the documentation markdown file).
|
|
||||||
|
|
||||||
```console
|
```console
|
||||||
./test/instrumentation/update-documentation-metrics.sh
|
./test/instrumentation/update-documentation-metrics.sh
|
||||||
|
29
test/instrumentation/doc.go
Normal file
29
test/instrumentation/doc.go
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2022 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
This stand-alone package is utilized for dynamically generating/maintaining a list of
|
||||||
|
metrics; this list is determined by the stability class of the metric. We statically analyze
|
||||||
|
all files in the Kubernetes code base to:
|
||||||
|
- Determine whether the metric falls into a stability class with stability guarantees.
|
||||||
|
- Determine the metric's metadata, i.e. the name, labels, type of metric.
|
||||||
|
- Output (based on the above) the metrics which meet our criteria into a yaml file.
|
||||||
|
|
||||||
|
Due to the dynamic nature of how metrics can be written, we only support the subset of metrics
|
||||||
|
which can actually be parsed. If a metric cannot be parsed, it must be delegated to the stability
|
||||||
|
class `Internal`, which will exempt the metric from static analysis.
|
||||||
|
*/
|
||||||
|
package main
|
21
test/instrumentation/documentation/doc.go
Normal file
21
test/instrumentation/documentation/doc.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2022 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
This stand-alone package is utilized for dynamically generating/maintaining
|
||||||
|
documentation on all parseable metrics in the Kubernetes code base.
|
||||||
|
*/
|
||||||
|
package main
|
@ -13,7 +13,7 @@ components using an HTTP scrape, and fetch the current metrics data in Prometheu
|
|||||||
|
|
||||||
### List of Stable Kubernetes Metrics
|
### List of Stable Kubernetes Metrics
|
||||||
|
|
||||||
<table class="table" caption="This is the list of STABLE metrics emitted from core Kubernetes components">
|
<table class="table metrics" caption="This is the list of STABLE metrics emitted from core Kubernetes components">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="metric_name">Name</th>
|
<th class="metric_name">Name</th>
|
||||||
@ -151,7 +151,7 @@ components using an HTTP scrape, and fetch the current metrics data in Prometheu
|
|||||||
|
|
||||||
### List of Alpha Kubernetes Metrics
|
### List of Alpha Kubernetes Metrics
|
||||||
|
|
||||||
<table class="table" caption="This is the list of ALPHA metrics emitted from core Kubernetes components">
|
<table class="table metrics" caption="This is the list of ALPHA metrics emitted from core Kubernetes components">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="metric_name">Name</th>
|
<th class="metric_name">Name</th>
|
||||||
|
@ -55,7 +55,7 @@ components using an HTTP scrape, and fetch the current metrics data in Prometheu
|
|||||||
|
|
||||||
### List of Stable Kubernetes Metrics
|
### List of Stable Kubernetes Metrics
|
||||||
|
|
||||||
<table class="table" caption="This is the list of STABLE metrics emitted from core Kubernetes components">
|
<table class="table metrics" caption="This is the list of STABLE metrics emitted from core Kubernetes components">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="metric_name">Name</th>
|
<th class="metric_name">Name</th>
|
||||||
@ -79,7 +79,7 @@ components using an HTTP scrape, and fetch the current metrics data in Prometheu
|
|||||||
|
|
||||||
### List of Alpha Kubernetes Metrics
|
### List of Alpha Kubernetes Metrics
|
||||||
|
|
||||||
<table class="table" caption="This is the list of ALPHA metrics emitted from core Kubernetes components">
|
<table class="table metrics" caption="This is the list of ALPHA metrics emitted from core Kubernetes components">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="metric_name">Name</th>
|
<th class="metric_name">Name</th>
|
||||||
|
@ -25,4 +25,5 @@ set -o pipefail
|
|||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../..
|
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../..
|
||||||
source "${KUBE_ROOT}/test/instrumentation/stability-utils.sh"
|
source "${KUBE_ROOT}/test/instrumentation/stability-utils.sh"
|
||||||
|
|
||||||
|
kube::update::documentation::list
|
||||||
kube::update::documentation
|
kube::update::documentation
|
||||||
|
Loading…
Reference in New Issue
Block a user