@@ -4,24 +4,32 @@ This cluster operator gathers anonymized system configuration and reports it to
4
4
5
5
# Table of Contents
6
6
7
+ - [ Insights Operator] ( #insights-operator )
8
+ - [ Table of Contents] ( #table-of-contents )
7
9
- [ Building] ( #building )
8
10
- [ Testing] ( #testing )
9
11
- [ Documentation] ( #documentation )
10
12
- [ Getting metrics from Prometheus] ( #getting-metrics-from-prometheus )
11
- - [ Generate the certificate and key] ( #generate-the-certificate-and-key )
12
- - [ Prometheus metrics provided by Insights Operator] ( #prometheus-metrics-provided-by-insights-operator )
13
- - [ Getting the data directly from Prometheus] ( #getting-the-data-directly-from-prometheus )
14
- - [ Debugging Prometheus metrics without valid CA] ( #debugging-prometheus-metrics-without-valid-ca )
13
+ - [ Generate the certificate and key] ( #generate-the-certificate-and-key )
14
+ - [ Prometheus metrics provided by Insights Operator] ( #prometheus-metrics-provided-by-insights-operator )
15
+ - [ Running IO locally] ( #running-io-locally )
16
+ - [ Running IO on K8s] ( #running-io-on-k8s )
17
+ - [ Getting the data directly from Prometheus] ( #getting-the-data-directly-from-prometheus )
18
+ - [ Debugging Prometheus metrics without valid CA] ( #debugging-prometheus-metrics-without-valid-ca )
15
19
- [ Debugging] ( #debugging )
16
- - [ Using the profiler] ( #using-the-profiler )
20
+ - [ Using the profiler] ( #using-the-profiler )
21
+ - [ Starting IO with the profiler] ( #starting-io-with-the-profiler )
22
+ - [ Collect profiling data] ( #collect-profiling-data )
23
+ - [ Analyzing profiling data] ( #analyzing-profiling-data )
17
24
- [ Changelog] ( #changelog )
18
- - [ Updating the changelog] ( #updating-the-changelog )
25
+ - [ Updating the changelog] ( #updating-the-changelog )
19
26
- [ Reported data] ( #reported-data )
20
- - [ Insights Operator Archive] ( #insights-operator-archive )
27
+ - [ Insights Operator Archive] ( #insights-operator-archive )
21
28
- [ Sample IO archive] ( #sample-io-archive )
22
29
- [ Generating a sample archive] ( #generating-a-sample-archive )
23
30
- [ Formatting archive json files] ( #formatting-archive-json-files )
24
31
- [ Obfuscating an archive] ( #obfuscating-an-archive )
32
+ - [ Updating the sample archive] ( #updating-the-sample-archive )
25
33
- [ Contributing] ( #contributing )
26
34
- [ Support] ( #support )
27
35
- [ License] ( #license )
@@ -251,6 +259,44 @@ go run ./cmd/obfuscate-archive/main.go YOUR_ARCHIVE.tar.gz
251
259
where ` YOUR_ARCHIVE.tar.gz ` is the path to the archive.
252
260
The obfuscated version will be created in the same directory and called ` YOUR_ARCHIVE-obfuscated.tar.gz `
253
261
262
+ ### Updating the sample archive
263
+
264
+ The ` docs/insights-archive-sample/ ` directory contains an example of an Insights
265
+ Operator archive, extracted and with pretty-formatted JSON files.
266
+ In case of any changes that affect multiple files in the archive, it is a good
267
+ idea to regenerate the sample archive to make sure it remains up-to-date.
268
+
269
+ There are two ways of updating the sample archive directory automatically.
270
+ Both of them require running the Insights Operator, letting it generate an archive
271
+ and extracting the archive into an otherwise empty directory.
272
+
273
+ The script will automatically replace existing files in the sample archive with
274
+ their respective counterparts from the supplied extracted IO archive.
275
+ In case of files with (partially) randomized names, such as pods or nodes,
276
+ the entire directory is deleted and replaced with a matching directory from
277
+ the new archive if possible.
278
+ Changes made by the script can be checked and reverted using Git.
279
+ The updated JSON files will be automatically pretty-formatted using ` jq ` ,
280
+ which is the only dependency required for running the script.
281
+
282
+ All existing files in the sample archive can be updated using the following command:
283
+
284
+ ``` sh
285
+ ./scripts/update_sample_archive.sh < Path of directory with the NEW extracted IO archive>
286
+ ```
287
+
288
+ If you only want to update files containing a certain string pattern,
289
+ you can supply a regular expression as a second optional argument.
290
+ For example, the following command was used to replace JSON files containing
291
+ the ` managedFields ` field when it was removed from the IO archive to save space:
292
+
293
+ ``` sh
294
+ ./scripts/update_sample_archive.sh < Path of directory with the NEW extracted IO archive> ' "managedFields":'
295
+ ```
296
+
297
+ The path of the sample archive directory should be constant relative to
298
+ the path of the script and therefore does not have to be specified explicitly.
299
+
254
300
# Contributing
255
301
256
302
See [ CONTRIBUTING] ( CONTRIBUTING.md ) for workflow & convention details.
0 commit comments