You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-14
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# Insights Operator
2
2
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.
4
6
5
7
# Table of Contents
6
8
@@ -58,7 +60,8 @@ Unit tests can be started by the following command:
58
60
make test
59
61
```
60
62
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:
62
65
63
66
```shell script
64
67
VERBOSE=-count=1 make test
@@ -69,7 +72,9 @@ VERBOSE=-count=1 make test
69
72
# Documentation
70
73
71
74
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.
73
78
74
79
To start generating the document run:
75
80
@@ -81,23 +86,29 @@ make docs
81
86
82
87
## Generate the certificate and key
83
88
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`.
85
93
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.
87
96
88
97
```shell script
89
98
gen_cert_file.py kubeconfig.yaml
90
99
```
91
100
92
101
## Prometheus metrics provided by Insights Operator
93
102
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)
95
105
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:
97
108
98
109
### Running IO locally
99
110
100
-
If the IO runs locally, the following command migth be used:
111
+
If the IO runs locally, the following command might be used:
@@ -174,7 +185,8 @@ go tool pprof http://localhost:6060/debug/pprof/profile?seconds=30
174
185
go tool pprof http://localhost:6060/debug/pprof/heap
175
186
```
176
187
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.
178
190
179
191
### Analyzing profiling data
180
192
@@ -201,15 +213,17 @@ It uses both the local git and GitHub`s API to update the file so:
201
213
202
214
It can be used 2 ways:
203
215
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.
205
218
206
219
> 🚨 IMPORTANT: It will only work with changelogs created with this script
207
220
208
221
```shell script
209
222
go run cmd/changelog/main.go
210
223
```
211
224
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.
213
227
214
228
```shell script
215
229
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
221
235
* ClusterOperator objects
222
236
* All non-secret global config (hostnames and URLs anonymized)
223
237
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)
225
240
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).
227
243
228
244
## Insights Operator Archive
229
245
230
246
### Sample IO archive
231
247
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))
233
250
234
251
To keep it up-to-date it is **required** to update this manually when developing a new data enhancement.
0 commit comments