Skip to content

Commit 1f83328

Browse files
authored
Merge pull request #99193 from michelle-purcell/HCCDOC-4014
HCCDOC4014 Update obsolete Insights Operator 'DataGather' API instructions
2 parents 7080b7e + fde532f commit 1f83328

File tree

6 files changed

+257
-97
lines changed

6 files changed

+257
-97
lines changed

modules/disabling-insights-operator-gather.adoc

Lines changed: 41 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@
55

66
:_mod-docs-content-type: PROCEDURE
77
[id="disabling-insights-operator-gather_{context}"]
8-
= Disabling the Insights Operator gather operations
8+
= Disabling the Insights Operator periodic gather operations
99

10-
You can disable the Insights Operator gather operations. Disabling the gather operations gives you the ability to increase privacy for your organization as Insights Operator will no longer gather and send Insights cluster reports to Red Hat. This will disable Insights analysis and recommendations for your cluster without affecting other core functions that require communication with Red Hat such as cluster transfers. You can view a list of attempted gather operations for your cluster from the `/insights-operator/gathers.json` file in your Insights Operator archive. Be aware that some gather operations only occur when certain conditions are met and might not appear in your most recent archive.
10+
11+
[role="_abstract"]
12+
You can optionally disable the periodic `InsightsDataGather` operations that the Insights Operator runs every 2 hours by default. Disabling the periodic data gather operations increases privacy for your organization as Insights Operator will no longer gather and send Insights cluster reports to Red{nbsp}Hat.
13+
14+
Disabling gather operations will also disable Insights analysis and recommendations for your cluster without affecting other core functions that require communication with Red{nbsp}Hat such as cluster transfers.
15+
16+
You can view a list of attempted gather operations for your cluster from the `/insights-operator/gathers.json` file in your Insights Operator archive. Be aware that some gather operations occur only when certain conditions are met and might not show in your most recent archive.
1117

1218
:FeatureName: The `InsightsDataGather` custom resource
1319
include::snippets/technology-preview.adoc[]
@@ -28,52 +34,54 @@ endif::openshift-rosa,openshift-dedicated[]
2834

2935
.Procedure
3036

31-
. Navigate to *Administration* -> *CustomResourceDefinitions*.
32-
. On the *CustomResourceDefinitions* page, use the *Search by name* field to find the *InsightsDataGather* resource definition and click it.
37+
. Navigate to *Administration* > *CustomResourceDefinitions*.
38+
. On the *CustomResourceDefinitions* page, use the *Search by name* field to find the *InsightsDataGather* custom resource definition (CRD), and click to open.
3339
. On the *CustomResourceDefinition details* page, click the *Instances* tab.
3440
. Click *cluster*, and then click the *YAML* tab.
35-
. Disable the gather operations by performing one of the following edits to the `InsightsDataGather` configuration file:
36-
.. To disable all the gather operations, enter `all` under the `disabledGatherers` key:
41+
. Edit the `InsightsDataGather` CRD, and complete one of the following steps:
42+
** To disable all the gather operations and data collection, define the `gatherers` specification and set the `mode` to *None* as outlined in the following example extract:
3743
+
3844
[source,yaml]
3945
----
40-
apiVersion: config.openshift.io/v1alpha1
46+
47+
apiVersion: insights.openshift.io/v1alpha2
4148
kind: InsightsDataGather
4249
metadata:
43-
....
44-
45-
spec: <1>
46-
gatherConfig:
47-
disabledGatherers:
48-
- all <2>
50+
name: cluster
51+
spec:
52+
# Gatherers configuration
53+
gatherers:
54+
mode: None # Options: All, None, Custom
4955
----
50-
+
51-
--
52-
<1> The `spec` parameter specifies gather configurations.
53-
<2> The `all` value disables all gather operations.
54-
--
55-
56-
.. To disable individual gather operations, enter their values under the `disabledGatherers` key:
56+
** To disable individual gather operations, under `gatherers`, set the `mode` to *Custom* and then specify the individual gatherer that you intend to disable. For example, to disable the workload gatherer, define the following specification:
5757
+
5858
[source,yaml]
5959
----
60+
apiVersion: insights.openshift.io/v1alpha2
61+
kind: InsightsDataGather
62+
metadata:
63+
name: cluster
6064
spec:
61-
gatherConfig:
62-
disabledGatherers:
63-
- clusterconfig/container_images <1>
64-
- clusterconfig/host_subnets
65-
- workloads/workload_info
65+
# Gatherers configuration
66+
gatherers:
67+
mode: Custom # Options: All, None, Custom
68+
custom:
69+
configs:
70+
# Essential cluster configuration gatherers
71+
- name: clusterconfig/authentication
72+
state: Enabled
73+
- name: clusterconfig/clusteroperators
74+
state: Enabled
75+
- name: workloads
76+
state: Disabled
6677
----
67-
+
68-
--
69-
<1> Example individual gather operation
70-
--
71-
+
7278
. Click *Save*.
73-
+
74-
After you save the changes, the Insights Operator gather configurations are updated and the operations will no longer occur.
79+
80+
.Results
81+
82+
After you save the changes, the Insights Operator gather configurations are updated and the operations that you disabled in the configuration will no longer occur.
7583

7684
[NOTE]
7785
====
78-
Disabling gather operations degrades the Insights advisor service's ability to offer effective recommendations for your cluster.
86+
Disabling gather operations restricts the ability of the Insights Advisor service to offer effective recommendations for your cluster.
7987
====

modules/enabling-insights-operator-gather.adoc

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
:_mod-docs-content-type: PROCEDURE
77
[id="enabling-insights-operator-gather_{context}"]
8-
= Enabling the Insights Operator gather operations
8+
= Re-enabling the Insights Operator periodic gather operations
99

10-
You can enable the Insights Operator gather operations, if the gather operations have been disabled.
10+
If you disabled the default `InsightsDataGather` data gather operations, you can enable them again so that the Insights Operator resumes the periodic data collection, and sends the resulting Insights cluster reports to Red Hat.
1111

1212
:FeatureName: The `InsightsDataGather` custom resource
1313
include::snippets/technology-preview.adoc[]
@@ -23,51 +23,55 @@ endif::openshift-rosa,openshift-dedicated[]
2323

2424
.Procedure
2525

26-
. Navigate to *Administration* -> *CustomResourceDefinitions*.
27-
. On the *CustomResourceDefinitions* page, use the *Search by name* field to find the *InsightsDataGather* resource definition and click it.
26+
. Navigate to *Administration* > *CustomResourceDefinitions*.
27+
. On the *CustomResourceDefinitions* page, use the *Search by name* field to find the *InsightsDataGather* custom resource definition (CRD), and click to open.
2828
. On the *CustomResourceDefinition details* page, click the *Instances* tab.
2929
. Click *cluster*, and then click the *YAML* tab.
30-
. Enable the gather operations by performing one of the following edits:
30+
. Edit the `InsightsDataGather` CRD, and complete one of the following steps:
3131

32-
** To enable all disabled gather operations, remove the `gatherConfig` stanza:
32+
** To enable all disabled gather operations, under the `gatherers` specification, set the `mode` back to *All* as outlined in the following example extract:
3333
+
3434
[source,yaml]
3535
----
36-
apiVersion: config.openshift.io/v1alpha1
36+
37+
apiVersion: insights.openshift.io/v1alpha2
3738
kind: InsightsDataGather
3839
metadata:
39-
....
40-
40+
name: cluster
4141
spec:
42-
gatherConfig: <1>
43-
disabledGatherers: all
42+
# Gatherers configuration
43+
gatherers:
44+
mode: All # Options: All, None, Custom
4445
----
45-
+
46-
--
47-
<1> Remove the `gatherConfig` stanza to enable all gather operations.
48-
--
4946

50-
** To enable individual gather operations, remove their values under the `disabledGatherers` key:
47+
** To enable individual gather operations that were previously disabled, find the name of the gatherer operation under the `gatherers:custom:configs` key section and change the `state` to *Enabled*. Alternatively, under the `config` specification, remove the `name` and `state` configuration lines for the operation you want to enable.
5148
+
5249
[source,yaml]
5350
----
51+
apiVersion: insights.openshift.io/v1alpha2
52+
kind: InsightsDataGather
53+
metadata:
54+
name: cluster
5455
spec:
55-
gatherConfig:
56-
disabledGatherers:
57-
- clusterconfig/container_images <1>
58-
- clusterconfig/host_subnets
59-
- workloads/workload_info
56+
# Gatherers configuration
57+
gatherers:
58+
mode: Custom # Options: All, None, Custom
59+
custom:
60+
configs:
61+
# Essential cluster configuration gatherers
62+
- name: clusterconfig/authentication
63+
state: Enabled
64+
- name: clusterconfig/clusteroperators
65+
state: Enabled
66+
- name: workloads
67+
state: Enabled
6068
----
6169
+
62-
--
63-
<1> Remove one or more gather operations.
64-
--
65-
+
6670
. Click *Save*.
6771
+
6872
After you save the changes, the Insights Operator gather configurations are updated and the affected gather operations start.
6973

7074
[NOTE]
7175
====
72-
Disabling gather operations degrades Insights Advisor's ability to offer effective recommendations for your cluster.
76+
Disabling gather operations restricts the ability of the Insights Advisor service to offer effective recommendations for your cluster.
7377
====

modules/insights-operator-configuring.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ The *insights-config* `ConfigMap` object follows standard YAML formatting, where
9595
|dataReporting:
9696
obfuscation:
9797
- workload_names
98-
|Enables the obfuscation of Data Validation Operator data. The cluster resource the resource ID is only visible in the archive file and not the resource name.
98+
|Enables the obfuscation of Data Validation Operator data. The cluster resource ID is only visible in the archive file and not the resource name.
9999
|String
100100
|Not applicable
101101

modules/running-insights-operator-gather-cli.adoc

Lines changed: 79 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,106 @@
55

66
:_mod-docs-content-type: PROCEDURE
77
[id="running-insights-operator-gather-openshift-cli_{context}"]
8-
= Running an Insights Operator gather operation from the OpenShift CLI
9-
You can run an Insights Operator gather operation by using the {product-title} command-line interface.
8+
= Gathering data on demand with the Insights Operator from the OpenShift CLI
9+
10+
You can run a custom Insights Operator gather operation on-demand from the {product-title} command-line interface (CLI).
11+
An on-demand `DataGather` operation is useful for one-off data collections that require different configurations to the periodic data gathering (`InsightsDataGather`) specification.
12+
13+
Use the following procedure to create a `DataGather` custom resource definition (CRD), and then run the data gather operation on demand from the CLI.
1014

1115
.Prerequisites
1216

1317
* You are logged in to {product-title} as a user with the `cluster-admin` role.
1418
1519
.Procedure
16-
* Enter the following command to run the gather operation:
20+
21+
. Create a YAML file with the following `DataGather` specification:
1722
+
18-
[source,terminal]
23+
[source,yaml]
1924
----
20-
$ oc apply -f <your_datagather_definition>.yaml
25+
26+
apiVersion: insights.openshift.io/v1alpha2
27+
kind: DataGather
28+
metadata:
29+
name: <your_data_gather>
30+
spec:
31+
# Gatherers configuration
32+
gatherers:
33+
mode: All # Options: All, Custom
34+
# ...
2135
----
2236
+
23-
Replace `<your_datagather_definition>.yaml` with a configuration file that contains the following parameters:
37+
[IMPORTANT]
38+
====
39+
* The name you specify for your gather operation, `<your_data_gather>`, must be unique and must not include a prefix of `periodic-gathering-` because this string is reserved for other administrative operations and might impact the intended gather operation.
40+
* If the `spec` of `DataGather` CRD is undefined, the default Insights Operator data collection job will run. This means that all gather operations will run, the collected data will be unobfuscated and the archive file will not be retained.
41+
====
42+
+
43+
. Optional: To customize the data gather operation, you can configure any of the following options in your `DataGather` YAML file:
44+
* To disable specific gatherers, change the value of `mode` to *Custom*, and then specify the individual gatherer that you intend to disable. For example, to disable the workload gatherer, add the following example:
2445
+
2546
[source,yaml]
2647
----
27-
apiVersion: insights.openshift.io/v1alpha1
48+
apiVersion: insights.openshift.io/v1alpha2
2849
kind: DataGather
2950
metadata:
30-
name: <your_data_gather> <1>
51+
name: <your_data_gather>
3152
spec:
32-
gatherers: <2>
33-
- name: workloads
34-
state: Disabled
53+
# Gatherers configuration
54+
gatherers:
55+
mode: Custom # Options: All, Custom
56+
custom:
57+
configs:
58+
# Essential cluster configuration gatherers
59+
- name: clusterconfig/authentication
60+
state: Enabled
61+
- name: clusterconfig/clusteroperators
62+
state: Enabled
63+
- name: workloads
64+
state: Disabled
65+
----
66+
* To enable persistent storage to retain the data archive file and history for up to the last 10 data gathering jobs, define the `storage` specification. Set *type* to `PersistentVolume`, and define the `mountPath` and `name` of the volume, as outlined in the following example:
67+
+
68+
[source,yaml]
69+
----
70+
apiVersion: insights.openshift.io/v1alpha2
71+
kind: DataGather
72+
metadata:
73+
name: <your_data_gather>
74+
spec:
75+
storage:
76+
type: PersistentVolume
77+
mountPath: /data
78+
persistentVolume:
79+
claim:
80+
name: on-demand-gather-pvc
3581
----
3682
+
37-
--
38-
<1> Under *metadata*, replace `<your_data_gather>` with a unique name for the gather operation.
39-
<2> Under *gatherers*, specify any individual gather operations that you intend to disable. In the example provided, `workloads` is the only data gather operation that is disabled and all of the other default operations are set to run.
40-
When the `spec` parameter is empty, all of the default gather operations run.
41-
--
42-
4383
[IMPORTANT]
4484
====
45-
Do not add a prefix of `periodic-gathering-` to the name of your gather operation because this string is reserved for other administrative operations and might impact the intended gather operation.
85+
Ensure that the volume name specified matches the existing `PersistentVolumeClaim` value in the `openshift-insights` namespace. For more information, see link:https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/storage/understanding-persistent-storage#persistent-volume-claims_understanding-persistent-storage[Persistent volume claims].
4686
====
87+
+
88+
* To enable data obfuscation, define the `dataPolicy` key and required values. For example, to obfuscate IP addresses and workload names, add the following configuration:
89+
+
90+
[source,yaml]
91+
----
92+
apiVersion: insights.openshift.io/v1alpha2
93+
kind: DataGather
94+
metadata:
95+
name: <your_data_gather>
96+
spec:
97+
dataPolicy:
98+
- ObfuscateNetworking
99+
- WorkloadNames
100+
----
101+
+
102+
. On the {product-title} CLI, enter the following command to run the gather operation:
103+
+
104+
[source,terminal]
105+
----
106+
$ oc apply -f <your_data_gather_definition>.yaml
107+
----
47108
48109
.Verification
49110

0 commit comments

Comments
 (0)