Skip to content

Commit aaf9a20

Browse files
authored
Merge pull request #71527 from kblake2016/HCCDOC-1739
[HCCDOC#1739]: Document Insight Operator configmap config
2 parents a0a8f94 + a6dd924 commit aaf9a20

10 files changed

+252
-108
lines changed
55.2 KB
Loading

modules/disabling-insights-operator-alerts.adoc

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,22 @@
33
// * support/remote_health_monitoring/using-insights-operator.adoc
44

55

6-
:_mod-docs-content-type: CONCEPT
6+
:_mod-docs-content-type: PROCEDURE
77
[id="disabling-insights-operator-alerts_{context}"]
88
= Disabling Insights Operator alerts
99

1010
ifndef::openshift-rosa,openshift-dedicated[]
11-
To prevent the Insights Operator from sending alerts to the cluster Prometheus instance, you edit the `support` secret. If the `support` secret doesn't exist, you must create it when you first add custom configurations. Note that configurations within the `support` secret take precedence over the default settings defined in the `pod.yaml` file.
12-
endif::openshift-rosa,openshift-dedicated[]
13-
ifndef::openshift-rosa,openshift-dedicated[]
14-
To prevent the Insights Operator from sending alerts to the cluster Prometheus instance, you edit the `support` secret. Note that this `secret` is created by default. The configurations stored in the support secret take precedence over any default settings specified in the `pod.yaml` file.
11+
To prevent the Insights Operator from sending alerts to the cluster Prometheus instance, you create or edit the *insights-config* `ConfigMap` object.
12+
13+
[NOTE]
14+
====
15+
Previously, a cluster administrator would create or edit the Insights Operator configuration using a *support secret* in the `openshift-config` namespace. Red Hat Insights now supports the creation of a `ConfigMap` object to configure the Operator. The Operator gives preference to the config map configuration over the support secret if both exist.
16+
====
17+
18+
If the *insights-config* `ConfigMap` object does not exist, you must create it when you first add custom configurations. Note that configurations within the `ConfigMap` object take precedence over the default settings defined in the `config/pod.yaml` file.
1519
endif::openshift-rosa,openshift-dedicated[]
1620

21+
1722
.Prerequisites
1823

1924
* Remote health reporting is enabled, which is the default.
@@ -23,25 +28,30 @@ endif::openshift-rosa,openshift-dedicated[]
2328
ifdef::openshift-rosa,openshift-dedicated[]
2429
* You are logged in to the {product-title} web console as a user with the `dedicated-admin` role.
2530
endif::openshift-rosa,openshift-dedicated[]
31+
* The *insights-config* `ConfigMap` object exists in the `openshift-insights` namespace.
32+
2633
2734
.Procedure
2835

29-
. Navigate to *Workloads* -> *Secrets*.
30-
. On the *Secrets* page, select *All Projects* from the *Project* list, and then set *Show default projects* to on.
31-
. Select the *openshift-config* project from the *Projects* list.
32-
. Search for the *support* secret by using the *Search by name* field.
33-
+
34-
* If the secret exists:
35-
. Click the *Options* menu {kebab}, and then click *Edit Secret*.
36-
. Click *Add Key/Value*.
37-
.. In the *Key* field, enter `disableInsightsAlerts`.
38-
.. In the *Value* field, enter `True`.
36+
. Go to *Workloads* -> *ConfigMaps* and select *Project: openshift-insights*.
37+
. Click on the *insights-config* `ConfigMap` object to open it.
38+
. Click *Actions* and select *Edit ConfigMap*.
39+
. Click the *YAML view* radio button.
40+
. In the file, set the `alerting` attribute to `disabled: true`.
3941
+
40-
* If the secret does not exist:
41-
.. Click *Create* -> *Key/value secret*.
42-
... In the *Secret name* field, enter `support`.
43-
... In the *Key* field, enter `disableInsightsAlerts`.
44-
... In the *Value* field, enter `True`.
45-
.. Click *Create*.
42+
[source,yaml]
43+
----
44+
apiVersion: v1
45+
kind: ConfigMap
46+
# ...
47+
data:
48+
config.yaml: |
49+
alerting:
50+
disabled: true
51+
# ...
52+
----
53+
54+
. Click *Save*. The *insights-config* config-map details page opens.
55+
. Verify that the value of the `config.yaml` `alerting` attribute is set to `disabled: true`.
4656

4757
After you save the changes, Insights Operator no longer sends alerts to the cluster Prometheus instance.

modules/enabling-insights-operator-alerts.adoc

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
[id="enabling-insights-operator-alerts_{context}"]
88
= Enabling Insights Operator alerts
99

10-
When alerts are disabled, the Insights Operator no longer sends alerts to the cluster Prometheus instance. You can change this behavior.
10+
When alerts are disabled, the Insights Operator no longer sends alerts to the cluster Prometheus instance. You can reenable them.
11+
12+
[NOTE]
13+
====
14+
Previously, a cluster administrator would create or edit the Insights Operator configuration using a *support secret* in the `openshift-config` namespace. Red Hat Insights now supports the creation of a `ConfigMap` object to configure the Operator. The Operator gives preference to the config map configuration over the support secret if both exist.
15+
====
1116

1217
.Prerequisites
1318

@@ -18,14 +23,29 @@ endif::openshift-rosa,openshift-dedicated[]
1823
ifdef::openshift-rosa,openshift-dedicated[]
1924
* You are logged in to the {product-title} web console as a user with the `dedicated-admin` role.
2025
endif::openshift-rosa,openshift-dedicated[]
26+
* The *insights-config* `ConfigMap` object exists in the `openshift-insights` namespace.
2127
2228
.Procedure
2329

24-
. Navigate to *Workloads* -> *Secrets*.
25-
. On the *Secrets* page, select *All Projects* from the *Project* list, and then set *Show default projects* to *ON*.
26-
. Select the *openshift-config* project from the *Projects* list.
27-
. Search for the *support* secret by using the *Search by name* field.
28-
. Click the *Options* menu {kebab}, and then click *Edit Secret*.
29-
. For the `disableInsightsAlerts` key, set the *Value* field to `false`.
30+
. Go to *Workloads* -> *ConfigMaps* and select *Project: openshift-insights*.
31+
. Click on the *insights-config* `ConfigMap` object to open it.
32+
. Click *Actions* and select *Edit ConfigMap*.
33+
. Click the *YAML view* radio button.
34+
. In the file, set the `alerting` attribute to `disabled: false`.
35+
+
36+
[source,yaml]
37+
----
38+
apiVersion: v1
39+
kind: ConfigMap
40+
# ...
41+
data:
42+
config.yaml: |
43+
alerting:
44+
disabled: false
45+
# ...
46+
----
47+
48+
. Click *Save*. The *insights-config* config-map details page opens.
49+
. Verify that the value of the `config.yaml` `alerting` attribute is set to `disabled: false`.
3050

3151
After you save the changes, Insights Operator again sends alerts to the cluster Prometheus instance.

modules/insights-operator-configuring-sca.adoc

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,41 +7,42 @@
77
[id="insights-operator-configuring-sca_{context}"]
88
= Configuring simple content access import interval
99

10-
You can configure how often the Insights Operator imports the simple content access entitlements by using the `support` secret in the `openshift-config` namespace. The entitlement import normally occurs every eight hours, but you can shorten this interval if you update your simple content access configuration in Red Hat Subscription Management.
10+
You can configure how often the Insights Operator imports the simple content access (sca) entitlements by using the *insights-config* `ConfigMap` object in the `openshift-insights` namespace. The entitlement import normally occurs every eight hours, but you can shorten this sca interval if you update your simple content access configuration in the *insights-config* `ConfigMap` object.
11+
12+
This procedure describes how to update the import interval to two hours (2h). You can specify hours (h) or hours and minutes, for example: 2h30m.
1113

12-
This procedure describes how to update the import interval to one hour.
1314

1415
.Prerequisites
1516

17+
* Remote health reporting is enabled, which is the default.
1618
ifndef::openshift-rosa,openshift-dedicated[]
1719
* You are logged in to the {product-title} web console as a user with the `cluster-admin` role.
1820
endif::openshift-rosa,openshift-dedicated[]
1921
ifdef::openshift-rosa,openshift-dedicated[]
2022
* You are logged in to the {product-title} web console as a user with the `dedicated-admin` role.
2123
endif::openshift-rosa,openshift-dedicated[]
24+
* The *insights-config* `ConfigMap` object exists in the `openshift-insights` namespace.
25+
2226
2327
.Procedure
2428

25-
. Navigate to *Workloads* -> *Secrets*.
26-
. Select the *openshift-config* project.
27-
. Search for the *support* secret by using the *Search by name* field. If it does not exist, click *Create* -> *Key/value secret* to create it.
28-
+
29-
--
30-
* If the secret exists:
31-
. Click the *Options* menu {kebab}, and then click *Edit Secret*.
32-
. Click *Add Key/Value*.
33-
.. In the *Key* field, enter `scaInterval`.
34-
.. In the *Value* field, enter `1h`.
35-
+
36-
* If the secret does not exist:
37-
.. Click *Create* -> *Key/value secret*.
38-
... In the *Secret name* field, enter `support`.
39-
... In the *Key* field, enter `scaInterval`.
40-
... In the *Value* field, enter `1h`.
41-
.. Click *Create*.
42-
--
29+
. Go to *Workloads* -> *ConfigMaps* and select *Project: openshift-insights*.
30+
. Click on the *insights-config* `ConfigMap` object to open it.
31+
. Click *Actions* and select *Edit ConfigMap*.
32+
. Click the *YAML view* radio button.
33+
. Set the `sca` attribute in the file to `interval: 2h` to import content every two hours.
4334
+
44-
[NOTE]
45-
====
46-
The interval `1h` can also be entered as `60m` for 60 minutes.
47-
====
35+
[source,yaml]
36+
----
37+
apiVersion: v1
38+
kind: ConfigMap
39+
# ...
40+
data:
41+
config.yaml: |
42+
sca:
43+
interval: 2h
44+
# ...
45+
----
46+
47+
. Click *Save*. The *insights-config* config-map details page opens.
48+
. Verify that the value of the `config.yaml` `sca` attribute is set to `interval: 2h`.

modules/insights-operator-configuring.adoc

Lines changed: 65 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,51 @@
33
// * support/remote_health_monitoring/using-insights-operator.adoc
44

55

6-
:_mod-docs-content-type: PROCEDURE
6+
:_mod-docs-content-type: CONCEPT
77
[id="insights-operator-configuring_{context}"]
88
= Configuring Insights Operator
99

10-
You can configure Insights Operator to meet the needs of your organization. The Insights Operator is configured using a combination of the default configurations in the `pod.yaml` file in the Insights Operator `Config` directory and the configurations stored in the `support` secret in the `openshift-config` namespace. The `support` secret does not exist by default and must be created when adding custom configurations for the first time. Configurations in the `support` secret override the defaults set in the `pod.yaml` file.
10+
Insights Operator configuration is a combination of the default Operator configuration and the configuration that is stored in either the *insights-config* `ConfigMap` object in the `openshift-insights` namespace, OR in the support secret in the `openshift-config` namespace.
11+
12+
When a `ConfigMap` object or support secret exists, the contained attribute values override the default Operator configuration values. If both a `ConfigMap` object _and_ a support secret exist, the Operator reads the `ConfigMap` object.
13+
14+
The `ConfigMap` object does not exist by default, so an {product-title} cluster administrator must create it.
15+
16+
//[NOTE]
17+
//====
18+
//Red Hat Insights encourages cluster administrators to use the config-map configuration method. Support secrets will continue to be supported in the near future but will eventually be deprecated.
19+
//====
1120

21+
.ConfigMap object configuration structure
22+
This example of an *insights-config* `ConfigMap` object (`config.yaml` configuration) shows configuration options using standard YAML formatting.
23+
24+
image::insights-operator-configmap-example.png[Example of Insights Operator ConfigMap object]
25+
26+
.Configurable attributes and default values
1227
The table below describes the available configuration attributes:
1328

29+
[NOTE]
30+
====
31+
The *insights-config* `ConfigMap` object follows standard YAML formatting, wherein child values are below the parent attribute and indented two spaces. For the *Obfuscation* attribute, enter values as bulleted children of the parent attribute.
32+
====
33+
1434
.Insights Operator configurable attributes
1535
[options="header"]
1636
|====
1737
|Attribute name|Description|Value type|Default value
18-
|`enableGlobalObfuscation`|Enables the global obfuscation of IP addresses and the cluster domain name|Boolean|`false`
19-
|`scaInterval`|Specifies the frequency of the simple content access entitlements download|Time interval|`8h`
20-
|`scaPullDisabled`|Disables the simple content access entitlements download|Boolean|`false`
21-
|`clusterTransferInterval`|Specifies how often Insights Operator checks OpenShift Cluster Manager for available cluster transfers|Time interval|`24h`
22-
|`disableInsightsAlerts`|Disables Insights Operator alerts to the cluster Prometheus instance|Boolean|`False`
38+
|`Obfuscation: - networking`|Enables the global obfuscation of IP addresses and the cluster domain name.|Boolean|`false`
39+
|`Obfuscation: - workload_names`|Obfuscate data coming from the Deployment Validation Operator if it is installed.|Boolean|`false`
40+
|`sca: interval`|Specifies the frequency of the simple content access entitlements download.|Time interval|`8h`
41+
|`sca: disabled`|Disables the simple content access entitlements download.|Boolean|`false`
42+
|`alerting: disabled`|Disables Insights Operator alerts to the cluster Prometheus instance.|Boolean|`false`
2343
|====
2444

25-
This procedure describes how to set custom Insights Operator configurations.
45+
46+
:_mod-docs-content-type: PROCEDURE
47+
[id="creating-insights-config-configmap_{context}"]
48+
== Creating the insights-config ConfigMap object
49+
50+
This procedure describes how to create the *insights-config* `ConfigMap` object for the Insights Operator to set custom configurations.
2651

2752
[IMPORTANT]
2853
====
@@ -31,15 +56,39 @@ Red Hat recommends you consult Red Hat Support before making changes to the defa
3156

3257
.Prerequisites
3358

59+
* Remote health reporting is enabled, which is the default.
3460
* You are logged in to the {product-title} web console as a user with `cluster-admin` role.
3561
3662
.Procedure
3763

38-
. Navigate to *Workloads* -> *Secrets*.
39-
. On the *Secrets* page, select *All Projects* from the *Project* list, and then set *Show default projects* to on.
40-
. Select the *openshift-config* project from the *Project* list.
41-
. Search for the *support* secret using the *Search by name* field. If it does not exist, click *Create* -> *Key/value secret* to create it.
42-
. Click the *Options* menu {kebab} for the secret, and then click *Edit Secret*.
43-
. Click *Add Key/Value*.
44-
. Enter an attribute name with an appropriate value (see table above), and click *Save*.
45-
. Repeat the above steps for any additional configurations.
64+
. Go to *Workloads* -> *ConfigMaps* and select *Project: openshift-insights*.
65+
. Click *Create ConfigMap*.
66+
. Select *Configure via: YAML view* and enter your configuration preferences, for example
67+
+
68+
[source,yaml]
69+
----
70+
apiVersion: v1
71+
kind: ConfigMap
72+
metadata:
73+
name: insights-config
74+
namespace: openshift-insights
75+
data:
76+
config.yaml: |
77+
dataReporting:
78+
obfuscation:
79+
- networking
80+
- workload_names
81+
sca:
82+
disable: false
83+
interval: 2h
84+
alerting:
85+
disabled: false
86+
binaryData: {}
87+
immutable: false
88+
----
89+
90+
. Optional: Select *Form view* and enter the necessary information that way.
91+
. In the *ConfigMap Name* field, enter *insights-config*.
92+
. In the *Key* field, enter *config.yaml*.
93+
. For the *Value* field, either browse for a file to drag and drop into the field or enter your configuration parameters manually.
94+
. Click *Create* and you can see the `ConfigMap` object and configuration information.

modules/insights-operator-disabling-sca.adoc

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,33 @@
77
[id="insights-operator-disabling-sca_{context}"]
88
= Disabling simple content access import
99

10-
You can disable the importing of simple content access entitlements by using the `support` secret in the `openshift-config` namespace.
10+
You can disable the importing of simple content access entitlements by using the *insights-config* `ConfigMap` object in the `openshift-insights` namespace.
1111

1212
.Prerequisites
1313

14+
* Remote health reporting is enabled, which is the default.
1415
* You are logged in to the {product-title} web console as `cluster-admin`.
16+
* The *insights-config* `ConfigMap` object exists in the `openshift-insights` namespace.
1517
1618
.Procedure
1719

18-
. Navigate to *Workloads* -> *Secrets*.
19-
. Select the *openshift-config* project.
20-
. Search for the *support* secret using the *Search by name* field.
20+
. Go to *Workloads* -> *ConfigMaps* and select *Project: openshift-insights*.
21+
. Click on the *insights-config* `ConfigMap` object to open it.
22+
. Click *Actions* and select *Edit ConfigMap*.
23+
. Click the *YAML view* radio button.
24+
. In the file, set the `sca` attribute to `disabled: true`.
2125
+
22-
--
23-
* If the secret exists:
24-
. Click the *Options* menu {kebab}, and then click *Edit Secret*.
25-
. Click *Add Key/Value*.
26-
.. In the *Key* field, enter `scaPullDisabled`.
27-
.. In the *Value* field, enter `true`.
28-
+
29-
* If the secret does not exist:
30-
.. Click *Create* -> *Key/value secret*.
31-
... In the *Secret name* field, enter `support`.
32-
... In the *Key* field, enter `scaPullDisabled`.
33-
... In the *Value* field, enter `true`.
34-
.. Click *Create*.
35-
--
36-
+
37-
The simple content access entitlement import is now disabled.
38-
+
39-
[NOTE]
40-
====
41-
To enable the simple content access import again, edit the `support` secret and delete the `scaPullDisabled` key.
42-
====
26+
[source,yaml]
27+
----
28+
apiVersion: v1
29+
kind: ConfigMap
30+
# ...
31+
data:
32+
config.yaml: |
33+
sca:
34+
disabled: true
35+
# ...
36+
----
37+
38+
. Click *Save*. The *insights-config* config-map details page opens.
39+
. Verify that the value of the `config.yaml` `sca` attribute is set to `disabled: true`.

0 commit comments

Comments
 (0)