Skip to content

Commit 267e997

Browse files
authored
Merge pull request #95124 from StephenJamesSmith/TELCODOCS-2304
TELCODOCS-2304: Make the operator configuration persistent during clu…
2 parents b1716f7 + 6a4fa6b commit 267e997

File tree

1 file changed

+38
-54
lines changed

1 file changed

+38
-54
lines changed

modules/kmm-configuring-kmmo.adoc

Lines changed: 38 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -6,43 +6,39 @@
66
[id="kmm-configuring-kmmo_{context}"]
77
= Configuring the Kernel Module Management Operator
88

9-
In most cases, the default configuration for the Kernel Module Management (KMM) Operator does not need to be modified. However, you can modify the Operator settings to suit your environment using the following procedure.
10-
11-
The Operator configuration is set in the `kmm-operator-manager-config` `ConfigMap` in the Operator namespace.
9+
In most cases, the default configuration for the Kernel Module Management (KMM) Operator does not need to be modified. However, you can modify the Operator settings to suit your environment.
1210

1311
.Procedure
1412

15-
. To modify the settings, edit the `ConfigMap` data by entering the following command:
13+
* To modify any setting, create a `ConfigMap` with the name `kmm-operator-manager-config` in the Operator namespace with the relevant data and restart the controller using the following command:
1614
+
1715
[source,terminal]
1816
----
19-
$ oc edit configmap -n "$namespace" kmm-operator-manager-config
17+
$ oc rollout restart -n "$namespace" deployment/kmm-operator-controller
2018
----
2119
+
20+
The value of `$namespace` depends on your installation method.
21+
+
2222
.Example output
2323
+
2424
[source,yaml]
2525
----
26-
healthProbeBindAddress: :8081
27-
job:
28-
gcDelay: 1h
29-
leaderElection:
30-
enabled: true
31-
resourceID: kmm.sigs.x-k8s.io
32-
webhook:
33-
disableHTTP2: true # CVE-2023-44487
34-
port: 9443
35-
metrics:
36-
enableAuthnAuthz: true
37-
disableHTTP2: true # CVE-2023-44487
38-
bindAddress: 0.0.0.0:8443
39-
secureServing: true
40-
worker:
41-
runAsUser: 0
42-
seLinuxType: spc_t
43-
setFirmwareClassPath: /var/lib/firmware
26+
apiVersion: v1
27+
data:
28+
controller_config.yaml: |
29+
worker:
30+
firmwareHostPath: /example/different/firmware/path
31+
kind: ConfigMap
32+
metadata:
33+
name: kmm-operator-manager-config
34+
namespace: openshift-kmm
4435
----
45-
+
36+
37+
[NOTE]
38+
====
39+
If you want to configure `KMM Hub`, create the `ConfigMap` using the name `kmm-operator-hub-manager-config` in the KMM Hub controller's namespace.
40+
====
41+
4642
.Operator configuration parameters
4743
[cols="2,8",options="header"]
4844
|===
@@ -52,19 +48,19 @@ worker:
5248
| Defines the address on which the Operator monitors for kubelet health probes. The recommended value is `:8081`.
5349

5450
|`job.gcDelay`
55-
|Defines the duration that successful build pods should be preserved for before they are deleted. There is no recommended value for this setting. For information about the valid values for this setting, see link:https://pkg.go.dev/time#ParseDuration[ParseDuration].
51+
|Defines the duration for which successful build pods should be preserved before they are deleted. For information about the valid values for this setting, see link:https://pkg.go.dev/time#ParseDuration[ParseDuration]. The default value is `0s`.
5652

5753
|`leaderElection.enabled`
58-
|Determines whether leader election is used to ensure that only one replica of the KMM Operator is running at any time. For more information, see https://kubernetes.io/docs/concepts/architecture/leases/[Leases]. The recommended value is `true`.
54+
|Determines whether leader election is used to ensure that only one replica of the KMM Operator is running at any time. For more information, see https://kubernetes.io/docs/concepts/architecture/leases/[Leases]. The default value is `true`.
5955

6056
|`leaderElection.resourceID`
61-
|Determines the name of the resource that leader election uses for holding the leader lock. The recommended value is `kmm.sigs.x-k8s.io`.
57+
|Determines the name of the resource that leader election uses for holding the leader lock. The default value for KMM is `kmm.sigs.x-k8s.io`. The default value for KMM-hub is `kmm-hub.sigs.x-k8s.io`.
6258

63-
|`webhook.disableHTTP2`
64-
|If `true`, disables HTTP/2 for the webhook server, as a mitigation for link:https://access.redhat.com/security/cve/cve-2023-44487[cve-2023-44487]. The recommended value is `true`.
59+
|`metrics.bindAddress`
60+
|Determines the bind address for the metrics server. Set this to "0" to disable the metrics server. The default value is `0.0.0.0:8443`.
6561

66-
|`webhook.port`
67-
|Defines the port on which the Operator monitors webhook requests. The recommended value is `9443`.
62+
|`metrics.disableHTTP2`
63+
|If `true`, disables HTTP/2 for the metrics server as a mitigation for https://access.redhat.com/security/cve/cve-2023-44487[CVE-2023-44487]. The default value is `true`.
6864

6965
|`metrics.enableAuthnAuthz`
7066
a|Determines if metrics are authenticated using `TokenReviews` and authorized using `SubjectAccessReviews` with the kube-apiserver.
@@ -79,35 +75,23 @@ To scrape metrics, for example, using Prometheus, the client needs a `ClusterRol
7975

8076
* `nonResourceURLs: "/metrics", verbs: get`
8177
82-
The recommended value is `true`.
78+
The default value is `true`.
8379

84-
|`metrics.disableHTTP2`
85-
|If `true`, disables HTTP/2 for the metrics server as a mitigation for https://access.redhat.com/security/cve/cve-2023-44487[CVE-2023-44487]. The recommended value is `true`.
80+
|`metrics.secureServing`
81+
|Determines whether the metrics are served over HTTPS instead of HTTP. The default value is `true`.
8682

87-
|`metrics.bindAddress`
88-
|Determines the bind address for the metrics server. If unspecified, the default is `:8080`. To disable the metrics server, set to `0`. The recommended value is `0.0.0.0:8443`.
83+
|`webhook.disableHTTP2`
84+
|If `true`, disables HTTP/2 for the webhook server, as a mitigation for link:https://access.redhat.com/security/cve/cve-2023-44487[CVE-2023-44487]. The default value is `true`.
8985

90-
|`metrics.secureServing`
91-
|Determines whether the metrics are served over HTTPS instead of HTTP. The recommended value is `true`.
86+
|`webhook.port`
87+
|Defines the port on which the Operator monitors webhook requests. The default value is `9443`.
9288

9389
|`worker.runAsUser`
94-
|Determines the value of the `runAsUser` field of the worker container's security context. For more information, see link:https://kubernetes.io/docs/tasks/configure-pod-container/security-context/[SecurityContext]. The recommended value is `9443`.
90+
|Determines the value of the `runAsUser` field of the worker container's security context. For more information, see link:https://kubernetes.io/docs/tasks/configure-pod-container/security-context/[SecurityContext]. The default value is `9443`.
9591

9692
|`worker.seLinuxType`
97-
|Determines the value of the `seLinuxOptions.type` field of the worker container's security context. For more information, see link:https://kubernetes.io/docs/tasks/configure-pod-container/security-context/[SecurityContext]. The recommended value is `spc_t`.
93+
|Determines the value of the `seLinuxOptions.type` field of the worker container's security context. For more information, see link:https://kubernetes.io/docs/tasks/configure-pod-container/security-context/[SecurityContext]. The default value is `spc_t`.
9894

99-
|`worker.setFirmwareClassPath`
100-
|Sets the kernel's firmware search path into the `/sys/module/firmware_class/parameters/path` file on the node. The recommended value is `/var/lib/firmware` if you need to set that value through the worker app. Otherwise, unset.
95+
|`worker.firmwareHostPath`
96+
|If set, the value of this field is written by the worker container into the /sys/module/firmware_class/parameters/path file on the node. For more information see link:https://openshift-kmm.netlify.app/documentation/firmwares/#setting-the-kernels-firmware-search-path[Setting the kernel's firmware search path]. The default value is `/var/lib/firmware`.
10197
|===
102-
103-
. After modifying the settings, restart the controller with the following command:
104-
+
105-
[source,terminal]
106-
----
107-
$ oc delete pod -n "<namespace>" -l app.kubernetes.io/component=kmm
108-
----
109-
+
110-
[NOTE]
111-
====
112-
The value of <namespace> depends on your original installation method.
113-
====

0 commit comments

Comments
 (0)