Skip to content

Conversation

@ybettan
Copy link
Contributor

@ybettan ybettan commented Dec 3, 2025

yevgeny-shnaidman and others added 5 commits December 3, 2025 11:13
Currently we have only one "ready" label to signify that the kernel
module is loaded successfuly. In order upgrade scenario, the user needs
to know that the loaded module is actually the one with the targeted
module version, in order to coordinated further actions. This PR
introduces a new label: kmm.node.kubernetes.io/%s.%s.version.ready,
whose value will signify the version of the currently loaded kernel
module.
The changes in the code are:
1. Adding Version field both to status and spec of NMC (will be used to
   construct the new label)
2. Polulating the Version field of the NCM's spec during NMC
   update/create
3. Adding the "version" annotation to the worker pod, so that the
   version may be extracted for NMC's status
4. Changing the Node package API to receive maps instead of slice for
   labels to be added/remove. This is done since now we must also update
   the value of the label, and not just the key
5. Rewrite the UpdateNodeLabel function in the NMC controller to support
   new flow and new Node API
6. In case "ready" label is removed, we also automaticaly remove
   "version.ready" label. If it does not exists - nothing happens
7. In case "ready" label needs to be added, we check if the version
   field exists in the NMC status, and if it does, then we add the
   "version.ready" label with appropriate value
Users need an official API to determine if their kmod was upgraded to
the newer version successfully when using the ordered-upgrade flow.

Before this commit, we only had a label describing if a specific kmod is
ready to be used or not but the same label was used for all versions.

To prevent users from watching the ready label being removed and then
re-appearing for the new kmod, we decided to add a new label with the
kmod version in it.

Signed-off-by: Yoni Bettan <[email protected]>
In case node becomes unschedulable (cordon, taint wihtout toleration
etc'), the kmod ready version is removed. In addition, the kmod version
ready label should also be removed. We do it unconditionally, since the
action does not produce error even if the label does not exists on the
node
When building the bundle locally we usually use `make bundle` but when
building it in cloudbuild for publishing in operatorhub.io, we use
`make bundle ... USE_IMAGEDIGESTS=true` which will eventually generate
the manifests and run `operator-sdk generate bundle ...
--use-image-digests`.

While the main purpose of this flag is to refer all images by digest, it
also, as a side effect, pull those images to discover their digest.

Since we are using dummy images in the CSV samples, with a "real" image
URL, operator-sdk treats those as actual pullable images, and tries to
pull them to discover their digest.

This commit is changing the dummy images with a "place holder
description" instead of a valuable URL to prevent `operator-sdk`
treating those as real images.

Signed-off-by: Yoni Bettan <[email protected]>
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ybettan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 3, 2025
@ybettan
Copy link
Contributor Author

ybettan commented Dec 3, 2025

/override pull-kernel-module-management-check-commits-count

@k8s-ci-robot
Copy link
Contributor

@ybettan: Overrode contexts on behalf of ybettan: pull-kernel-module-management-check-commits-count

In response to this:

/override pull-kernel-module-management-check-commits-count

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@yevgeny-shnaidman
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 3, 2025
adding public API that can be used by KMM's user:
1. API to get the module version label format
2. API to get the module version ready label format
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 3, 2025
@ybettan
Copy link
Contributor Author

ybettan commented Dec 3, 2025

/override pull-kernel-module-management-check-commits-count

@k8s-ci-robot
Copy link
Contributor

@ybettan: Overrode contexts on behalf of ybettan: pull-kernel-module-management-check-commits-count

In response to this:

/override pull-kernel-module-management-check-commits-count

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@yevgeny-shnaidman
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 3, 2025
@k8s-ci-robot k8s-ci-robot merged commit b765898 into kubernetes-sigs:release-2.5 Dec 3, 2025
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants