From 48509eebee697f688291ad91a632f589ac05e4fc Mon Sep 17 00:00:00 2001 From: windsonsea Date: Mon, 22 Jan 2024 10:02:12 +0800 Subject: [PATCH] Clean up metrics-reference.md --- .../generate-ref-docs/metrics-reference.md | 53 +++++++++---------- 1 file changed, 24 insertions(+), 29 deletions(-) diff --git a/content/en/docs/contribute/generate-ref-docs/metrics-reference.md b/content/en/docs/contribute/generate-ref-docs/metrics-reference.md index 54a482d1a2e5d..4b99c5f63e994 100644 --- a/content/en/docs/contribute/generate-ref-docs/metrics-reference.md +++ b/content/en/docs/contribute/generate-ref-docs/metrics-reference.md @@ -1,12 +1,12 @@ --- -title: Generating reference documentation for metrics +title: Generating Reference Documentation for Metrics content_type: task weight: 100 --- -This page demonstrates the generation of metrics reference documentation +This page demonstrates the generation of metrics reference documentation. ## {{% heading "prerequisites" %}} @@ -14,10 +14,10 @@ This page demonstrates the generation of metrics reference documentation -## Cloning the Kubernetes repository +## Clone the Kubernetes repository -The metric generation happens in the Kubernetes repository. -To clone the repository, Change directories to where you want the clone to exist. +The metric generation happens in the Kubernetes repository. +To clone the repository, change directories to where you want the clone to exist. Then, execute the following command: @@ -29,16 +29,16 @@ This creates a `kubernetes` folder in your current working directory. ## Generate the metrics -Inside the cloned Kubernetes repository, locate the +Inside the cloned Kubernetes repository, locate the `test/instrumentation/documentation` directory. The metrics documentation is generated in this directory. With each release, new metrics are added. -After you run the metrics documentation generator script, copy the +After you run the metrics documentation generator script, copy the metrics documentation to the Kubernetes website and publish the updated metrics documentation. -To generate the latest metrics, Make sure you are in the root of the cloned Kubernetes directory. +To generate the latest metrics, make sure you are in the root of the cloned Kubernetes directory. Then, execute the following command: ```shell @@ -51,7 +51,7 @@ To check for changes, execute: git status ``` -The output is similar to +The output is similar to: ``` ./test/instrumentation/documentation/documentation.md @@ -60,36 +60,31 @@ The output is similar to ## Copy the generated metrics documentation file to the Kubernetes website repository -1. Set the Kubernetes website root environment variable +1. Set the Kubernetes website root environment variable. -Execute the following command to set the website root: + Execute the following command to set the website root: -```shell -export WEBSITE_ROOT= -``` - - -2. Copy operation + ```shell + export WEBSITE_ROOT= + ``` -Copy the generated metrics file to the Kubernetes website repository. +2. Copy the generated metrics file to the Kubernetes website repository. -```shell -cp ./test/instrumentation/documentation/documentation.md "${WEBSITE_ROOT}/content/en/docs/reference/instrumentation/metrics.md" -``` + ```shell + cp ./test/instrumentation/documentation/documentation.md "${WEBSITE_ROOT}/content/en/docs/reference/instrumentation/metrics.md" + ``` -{{< note >}} -If you get an error, check that you have permission to copy the file. -You can use `chown` to change the file ownership back to your own user. -{{< /note >}} + {{< note >}} + If you get an error, check that you have permission to copy the file. + You can use `chown` to change the file ownership back to your own user. + {{< /note >}} -## Creating a pull request +## Create a pull request -To create a pull request, Follow the instructions in [Opening a pull request](/docs/contribute/new-content/open-a-pr/) +To create a pull request, follow the instructions in [Opening a pull request](/docs/contribute/new-content/open-a-pr/). ## {{% heading "whatsnext" %}} * [Contribute-upstream](/docs/contribute/generate-ref-docs/contribute-upstream/) * [Generating Reference Docs for Kubernetes Components and Tools](/docs/contribute/generate-ref-docs/kubernetes-components/) * [Generating Reference Documentation for kubectl Commands](/docs/contribute/generate-ref-docs/kubectl/) - -