Skip to content

Updated KMM Operator modules to pass DITA validation #96020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions modules/kmm-applying-tolerations-to-kernel-module-pods.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,24 @@ Taints and tolerations consist of `effect`, `key`, and `value` parameters. Toler

`tolerationSeconds`:: Represents the period of time the toleration (which must be of effect `NoExecute`, otherwise this field is ignored) tolerates the taint. By default, it is not set and the taint is tolerated forever without eviction. Zero and negative values are treated as `0` and immediately evicted by the system.

Toleration values must match the taint that is added to the nodes. A toleration matches a taint:

* If the `operator` parameter is set to `Equal`:

** the `key` parameters are the same;

** the `value` parameters are the same;

** the `effect` parameters are the same.

* If the `operator` parameter is set to `Exists`:

** the `key` parameters are the same;

** the `effect` parameters are the same.

.Example taint in a node specification
====
[source,yaml]
----
apiVersion: v1
Expand All @@ -33,8 +50,10 @@ spec:
value: value1
#...
----
====

.Example toleration in a module specification
====
[source,yaml]
----
apiVersion: kmm.sigs.x-k8s.io/v1beta1
Expand All @@ -50,19 +69,4 @@ spec:
tolerationSeconds: 36000
value: value1
----

Toleration values must match the taint that is added to the nodes. A toleration matches a taint:

* If the `operator` parameter is set to `Equal`:

** the `key` parameters are the same;

** the `value` parameters are the same;

** the `effect` parameters are the same.

* If the `operator` parameter is set to `Exists`:

** the `key` parameters are the same;

** the `effect` parameters are the same.
====
3 changes: 0 additions & 3 deletions modules/kmm-building-and-signing-a-kmod-image.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ spec:
selector: # top-level selector
kubernetes.io/arch: amd64
----

<1> Replace `default` with a valid namespace.

<2> The default `serviceAccountName` does not have the required permissions to run a module that is privileged. For information on creating a service account, see "Creating service accounts" in the "Additional resources" of this section.

<3> Used as `imagePullSecrets` in the `DaemonSet` object and to pull and push for the build and sign features.
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ spec:
selector: # top-level selector
kubernetes.io/arch: amd64
----

<1> `namespace` - Replace `default` with a valid namespace.

<2> `serviceAccountName` - The default `serviceAccountName` does not have the required permissions to run a module that is privileged. For information on creating a service account, see "Creating service accounts" in the "Additional resources" of this section.

<3> `imageRepoSecret` - Used as `imagePullSecrets` in the `DaemonSet` object and to pull and push for the build and sign features.
8 changes: 3 additions & 5 deletions modules/kmm-configuring-kmmo.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ In most cases, the default configuration for the Kernel Module Management (KMM)
$ oc rollout restart -n "$namespace" deployment/kmm-operator-controller
----
+
The value of `$namespace` depends on your installation method.
+
.Example output
The value of `$namespace` depends on your installation method. For example:
+
[source,yaml]
----
Expand All @@ -33,12 +31,12 @@ metadata:
name: kmm-operator-manager-config
namespace: openshift-kmm
----

+
[NOTE]
====
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.
====

+
.Operator configuration parameters
[cols="2,8",options="header"]
|===
Expand Down
5 changes: 2 additions & 3 deletions modules/kmm-gathering-data-for-kmm-hub.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ $ oc adm must-gather --image="${MUST_GATHER_IMAGE}" -- /usr/bin/gather -u
$ oc logs -fn openshift-kmm-hub deployments/kmm-operator-hub-controller
----
+
.Example output
Example output:
+
[%collapsible]
====
[source,terminal]
----
I0417 11:34:08.807472 1 request.go:682] Waited for 1.023403273s due to client-side throttling, not priority and fairness, request: GET:https://172.30.0.1:443/apis/tuned.openshift.io/v1?timeout=32s
Expand Down Expand Up @@ -68,4 +68,3 @@ I0417 11:34:12.501947 1 controller.go:227] kmm-hub "msg"="Starting workers
I0417 11:34:12.501948 1 controller.go:227] kmm-hub "msg"="Starting workers" "controller"="ManagedClusterModule" "controllerGroup"="hub.kmm.sigs.x-k8s.io" "controllerKind"="ManagedClusterModule" "worker count"=1
I0417 11:34:12.502285 1 imagestream_reconciler.go:50] kmm-hub "msg"="registered imagestream info mapping" "ImageStream"={"name":"driver-toolkit","namespace":"openshift"} "controller"="imagestream" "controllerGroup"="image.openshift.io" "controllerKind"="ImageStream" "dtkImage"="quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:df42b4785a7a662b30da53bdb0d206120cf4d24b45674227b16051ba4b7c3934" "name"="driver-toolkit" "namespace"="openshift" "osImageVersion"="412.86.202302211547-0" "reconcileID"="e709ff0a-5664-4007-8270-49b5dff8bae9"
----
====
5 changes: 2 additions & 3 deletions modules/kmm-gathering-data-for-kmm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ $ oc adm must-gather --image="${MUST_GATHER_IMAGE}" -- /usr/bin/gather
$ oc logs -fn openshift-kmm deployments/kmm-operator-controller
----
+
.Example output
Example output:
+
[%collapsible]
====
[source,terminal]
----
I0228 09:36:37.352405 1 request.go:682] Waited for 1.001998746s due to client-side throttling, not priority and fairness, request: GET:https://172.30.0.1:443/apis/machine.openshift.io/v1beta1?timeout=32s
Expand Down Expand Up @@ -70,4 +70,3 @@ I0228 09:36:40.787879 1 controller.go:185] kmm "msg"="Starting EventSource
I0228 09:36:40.787905 1 controller.go:193] kmm "msg"="Starting Controller" "controller"="preflightvalidationocp" "controllerGroup"="kmm.sigs.x-k8s.io" "controllerKind"="PreflightValidationOCP"
I0228 09:36:40.786489 1 controller.go:193] kmm "msg"="Starting Controller" "controller"="PodNodeModule" "controllerGroup"="" "controllerKind"="Pod"
----
====
2 changes: 1 addition & 1 deletion modules/kmm-hub-installing-kmm-hub-creating-resources.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

* If you want to install KMM-Hub programmatically, you can use the following resources to create
the `Namespace`, `OperatorGroup` and `Subscription` resources:

+
[source,yaml]
----
---
Expand Down
4 changes: 2 additions & 2 deletions modules/kmm-hub-running-kmm-on-the-spoke.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

After installing Kernel Module Management (KMM) on the spoke, no further action is required. Create a `ManagedClusterModule` object from the hub to deploy kernel modules on spoke clusters.

.Procedure

You can install KMM on the spokes cluster through a RHACM `Policy` object. In addition to installing KMM from the OperatorHub and running it in a lightweight spoke mode, the `Policy` configures additional RBAC required for the RHACM agent to be able to manage `Module` resources.

.Procedure

* Use the following RHACM policy to install KMM on spoke clusters:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 [error] OpenShiftAsciiDoc.SuggestAttribute: Use the AsciiDoc attribute '{rh-rhacm}' rather than the plain text product term 'RHACM', unless your use case is an exception.

+
[source.yaml]
Expand Down
3 changes: 2 additions & 1 deletion modules/kmm-installing-older-versions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ $ oc create -f kmm-sub.yaml
$ oc get -n openshift-kmm deployments.apps kmm-operator-controller
----
+
.Example output
Example output:
+
[source,terminal]
----
NAME READY UP-TO-DATE AVAILABLE AGE
Expand Down
3 changes: 2 additions & 1 deletion modules/kmm-installing-using-cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ $ oc create -f kmm-sub.yaml
$ oc get -n openshift-kmm deployments.apps kmm-operator-controller
----
+
.Example output
Example output:
+
[source,terminal]
----
NAME READY UP-TO-DATE AVAILABLE AGE
Expand Down
2 changes: 0 additions & 2 deletions modules/kmm-observing-events.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

Use the following methods to view KMM events.

[discrete]
[id="kmm-observing-events-build-and-sign_{context}"]
== Build & sign

Expand All @@ -27,7 +26,6 @@ Events:
Normal SignSucceeded 57s kmm Sign job succeeded for kernel 6.6.2-201.fc39.x86_64
----

[discrete]
[id="kmm-observing-events-module-load-unload_{context}"]
== Module load or unload

Expand Down
16 changes: 8 additions & 8 deletions modules/kmm-reading-operator-logs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,29 @@

You can use the `oc logs` command to read Operator logs, as in the following examples.

.Example command for KMM controller

Example command for KMM controller::
+
[source,terminal]
----
$ oc logs -fn openshift-kmm deployments/kmm-operator-controller
----

.Example command for KMM webhook server

Example command for KMM webhook server::
+
[source,terminal]
----
$ oc logs -fn openshift-kmm deployments/kmm-operator-webhook-server
----

.Example command for KMM-Hub controller

Example command for KMM-Hub controller::
+
[source,terminal]
----
$ oc logs -fn openshift-kmm-hub deployments/kmm-operator-hub-controller
----

.Example command for KMM-Hub webhook server

Example command for KMM-Hub webhook server::
+
[source,terminal]
----
$ oc logs -fn openshift-kmm deployments/kmm-operator-hub-webhook-server
Expand Down
7 changes: 4 additions & 3 deletions modules/kmm-running-depmod.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ $ depmod -b /opt ${KERNEL_FULL_VERSION}+`.
----
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code on the previous line looks off to me, I checked the revision history and the characters at the end look like a fragment from when it was formatted as inline code. I believe it should be as follows:

$ depmod -b /opt ${KERNEL_FULL_VERSION}

Can somebody confirm this? If so, I can fix it as part of this PR.

Copy link
Contributor

@StephenJamesSmith StephenJamesSmith Jul 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be $ depmod -b /opt ${KERNEL_FULL_VERSION}+.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @StephenJamesSmith, that doesn't sound right, if you are passing depmod a specific version, according to the manual page the + symbol has no special meaning and will just register as an invalid kernel version. I checked the older documentation prior to moving this command from inline code to a dedicated code block and it confirms my understanding. Could you please look one more time?


[id="example-dockerfile_{context}"]
== Example Dockerfile

If you are building your image on {product-title}, consider using the Driver Tool Kit (DTK).
.Example Dockerfile
====
If you are building your image on {product-title}, consider using the Driver Toolkit (DTK).

For further information, see link:https://cloud.redhat.com/blog/how-to-use-entitled-image-builds-to-build-drivercontainers-with-ubi-on-openshift[using an entitled build].

Expand All @@ -52,3 +52,4 @@ data:
COPY --from=builder /usr/src/kernel-module-management/ci/kmm-kmod/kmm_ci_b.ko /opt/lib/modules/${KERNEL_FULL_VERSION}/
RUN depmod -b /opt ${KERNEL_FULL_VERSION}
----
====
1 change: 0 additions & 1 deletion modules/kmm-signing-a-prebuilt-driver-container.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,4 @@ spec:
selector:
kubernetes.io/arch: amd64
----

<1> `modprobe` - The name of the kmod to load.
1 change: 0 additions & 1 deletion modules/kmm-signing-kmods-in-a-prebuilt-image.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ spec:
selector:
kubernetes.io/arch: amd64
----

<1> The name of the kmod to load.
<2> The name of the container image. For example, `quay.io/myuser/my-driver:<kernelversion`.
<3> The name of the unsigned image. For example, `quay.io/myuser/my-driver:<kernelversion`.
4 changes: 1 addition & 3 deletions modules/kmm-uninstalling-kmmo-red-hat-catalog.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ Use this procedure if KMM was installed from the Red Hat catalog.

.Procedure

Use the following method to uninstall the KMM Operator:

* Use the OpenShift console under *Operators* --> *Installed Operators* to locate and uninstall the Operator.

+
[NOTE]
====
Alternatively, you can delete the `Subscription` resource in the KMM namespace.
Expand Down
4 changes: 2 additions & 2 deletions modules/kmm-using-driver-toolkit.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
The Driver Toolkit (DTK) is a convenient base image for building build kmod loader images.
It contains tools and libraries for the OpenShift version currently running in the cluster.

.Procedure

Use DTK as the first stage of a multi-stage Dockerfile.

.Procedure

. Build the kernel modules.

. Copy the `.ko` files into a smaller end-user image such as https://catalog.redhat.com/software/containers/ubi9/ubi-minimal[`ubi-minimal`].
Expand Down
4 changes: 3 additions & 1 deletion modules/kmm-using-intree-modules.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
In some cases, you might need to configure the KMM Module to avoid loading an out-of-tree kernel module and instead use the in-tree module, running only the device plugin. In such cases, you can omit the `moduleLoader` parameter from the `Module` custom resource (CR), and leave only the `devicePlugin` section, as shown in the following example.

.Example `Module` CR
====
[source,yaml]
----
apiVersion: kmm.sigs.x-k8s.io/v1beta1
Expand All @@ -22,4 +23,5 @@ spec:
devicePlugin:
container:
image: some.registry/org/my-device-plugin:latest
----
----
====
3 changes: 2 additions & 1 deletion modules/kmm-using-signing-with-kmm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ On a Secure Boot enabled system, all kernel modules (kmods) must be signed with

For more details on using Secure Boot, see link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/managing_monitoring_and_updating_the_kernel/signing-a-kernel-and-modules-for-secure-boot_managing-monitoring-and-updating-the-kernel#generating-a-public-and-private-key-pair_signing-a-kernel-and-modules-for-secure-boot[Generating a public and private key pair]

.Prerequisites
[id="kmm-using-signing-with-kmm-prerequisites_{context}"]
== Prerequisites

* A public private key pair in the correct (DER) format.
* At least one secure-boot enabled node with the public key enrolled in its MOK database.
Expand Down
6 changes: 4 additions & 2 deletions modules/kmm-validation-status.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ A `PreflightValidationOCP` resource reports the status and progress of each modu

`statusReason`:: Verbal explanation regarding the status.

`verificationStage`:: Describes the validation stage being executed: +
`verificationStage`:: Describes the validation stage being executed:

* `Image`: Image existence verification
* `Done`: Verification is done

`verificationStatus`:: The status of the Module verification: +
`verificationStatus`:: The status of the Module verification:

* `Success`: Verified
* `Failure`: Verification failed
* `InProgress`: Verification is in progress