Skip to content

Commit b4f7903

Browse files
author
Ricardo Lüders
committed
docs: adding some bl to readme
1 parent fadea5c commit b4f7903

File tree

1 file changed

+31
-14
lines changed

1 file changed

+31
-14
lines changed

README.md

+31-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Insights Operator
22

3-
This cluster operator gathers anonymized system configuration and reports it to Red Hat Insights. It is a part of the standard OpenShift distribution. The data collected allows for debugging in the event of cluster failures or unanticipated errors.
3+
This cluster operator gathers anonymized system configuration and reports it to Red Hat Insights. It is a part of the
4+
standard OpenShift distribution. The data collected allows for debugging in the event of cluster failures or
5+
unanticipated errors.
46

57
# Table of Contents
68

@@ -58,7 +60,8 @@ Unit tests can be started by the following command:
5860
make test
5961
```
6062

61-
It is also possible to specify CLI options for Go test. For example, if you need to disable test results caching, use the following command:
63+
It is also possible to specify CLI options for Go test. For example, if you need to disable test results caching,
64+
use the following command:
6265

6366
```shell script
6467
VERBOSE=-count=1 make test
@@ -69,7 +72,9 @@ VERBOSE=-count=1 make test
6972
# Documentation
7073

7174

72-
The document [docs/gathered-data](docs/gathered-data.md) contains the list of collected data and the API that is used to collect it. This documentation is generated by the command bellow, by collecting the comment tags located above each Gather method.
75+
The document [docs/gathered-data](docs/gathered-data.md) contains the list of collected data and the API that is used
76+
to collect it. This documentation is generated by the command bellow, by collecting the comment tags located above
77+
each Gather method.
7378

7479
To start generating the document run:
7580

@@ -81,23 +86,29 @@ make docs
8186

8287
## Generate the certificate and key
8388

84-
Certificate and key are required to access Prometheus metrics (instead 404 Forbidden is returned). It is possible to generate these two files from Kubernetes config file. Certificate is stored in `users/admin/client-cerfificate-data` and key in `users/admin/client-key-data`. Please note that these values are encoded by using Base64 encoding, so it is needed to decode them, for example by `base64 -d`.
89+
Certificate and key are required to access Prometheus metrics (instead 404 Forbidden is returned). It is possible
90+
to generate these two files from Kubernetes config file. Certificate is stored in `users/admin/client-cerfificate-data`
91+
and key in `users/admin/client-key-data`. Please note that these values are encoded by using Base64 encoding,
92+
so it is needed to decode them, for example by `base64 -d`.
8593

86-
There's a tool named `gen_cert_key.py` that can be used to automatically generate both files. It is stored in `tools` subdirectory.
94+
There's a tool named `gen_cert_key.py` that can be used to automatically generate both files. It is stored in `tools`
95+
subdirectory.
8796

8897
```shell script
8998
gen_cert_file.py kubeconfig.yaml
9099
```
91100

92101
## Prometheus metrics provided by Insights Operator
93102

94-
It is possible to read Prometheus metrics provided by Insights Operator. Example of metrics exposed by Insights Operator can be found at [metrics.txt](docs/metrics.txt)
103+
It is possible to read Prometheus metrics provided by Insights Operator. Example of metrics exposed by
104+
Insights Operator can be found at [metrics.txt](docs/metrics.txt)
95105

96-
Depending on how or where the IO is running you may have different ways to retrieve the metrics. Here is a list of some options, so you can find the one that fits you:
106+
Depending on how or where the IO is running you may have different ways to retrieve the metrics.
107+
Here is a list of some options, so you can find the one that fits you:
97108

98109
### Running IO locally
99110

100-
If the IO runs locally, the following command migth be used:
111+
If the IO runs locally, the following command might be used:
101112

102113
```shell script
103114
curl --cert k8s.crt --key k8s.key -k https://localhost:8443/metrics
@@ -174,7 +185,8 @@ go tool pprof http://localhost:6060/debug/pprof/profile?seconds=30
174185
go tool pprof http://localhost:6060/debug/pprof/heap
175186
```
176187

177-
These commands will create a compressed file that can be visualized using a variety of tools, one of them is the `pprof` tool.
188+
These commands will create a compressed file that can be visualized using a variety of tools, one of them is
189+
the `pprof` tool.
178190

179191
### Analyzing profiling data
180192

@@ -201,15 +213,17 @@ It uses both the local git and GitHub`s API to update the file so:
201213

202214
It can be used 2 ways:
203215

204-
1. Providing no command line arguments the script will update the current `CHANGELOG.md` with the latest changes according to the local git state.
216+
1. Providing no command line arguments the script will update the current `CHANGELOG.md` with the latest changes
217+
2. according to the local git state.
205218

206219
> 🚨 IMPORTANT: It will only work with changelogs created with this script
207220
208221
```shell script
209222
go run cmd/changelog/main.go
210223
```
211224

212-
2. Providing 2 command line arguments, `AFTER` and `UNTIL` dates the script will generate a new `CHANGELOG.md` within the provided time frame.
225+
2. Providing 2 command line arguments, `AFTER` and `UNTIL` dates the script will generate a new `CHANGELOG.md` within
226+
the provided time frame.
213227

214228
```shell script
215229
go run cmd/changelog/main.go 2021-01-10 2021-01-20
@@ -221,15 +235,18 @@ go run cmd/changelog/main.go 2021-01-10 2021-01-20
221235
* ClusterOperator objects
222236
* All non-secret global config (hostnames and URLs anonymized)
223237

224-
The list of all collected data with description, location in produced archive and link to Api and some examples is at [docs/gathered-data.md](docs/gathered-data.md)
238+
The list of all collected data with description, location in produced archive and link to Api and some examples is
239+
at [docs/gathered-data.md](docs/gathered-data.md)
225240

226-
The resulting data is packed in `.tar.gz` archive with folder structure indicated in the document. Example of such archive is at [docs/insights-archive-sample](docs/insights-archive-sample).
241+
The resulting data is packed in `.tar.gz` archive with folder structure indicated in the document. Example of such
242+
archive is at [docs/insights-archive-sample](docs/insights-archive-sample).
227243

228244
## Insights Operator Archive
229245

230246
### Sample IO archive
231247

232-
There is a sample IO archive maintained in this repo to use as a quick reference. (can be found at [docs/insights-archive-sample](https://github.com/openshift/insights-operator/tree/master/docs/insights-archive-sample))
248+
There is a sample IO archive maintained in this repo to use as a quick reference. (can be found
249+
at [docs/insights-archive-sample](https://github.com/openshift/insights-operator/tree/master/docs/insights-archive-sample))
233250

234251
To keep it up-to-date it is **required** to update this manually when developing a new data enhancement.
235252

0 commit comments

Comments
 (0)