-
Notifications
You must be signed in to change notification settings - Fork 37
Backporting commits to the release-2.5 branch #1204
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
Conversation
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]>
Signed-off-by: Yoni Bettan <[email protected]>
|
[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 |
|
/override pull-kernel-module-management-check-commits-count |
|
@ybettan: Overrode contexts on behalf of ybettan: pull-kernel-module-management-check-commits-count In response to this:
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. |
|
/lgtm |
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
|
/override pull-kernel-module-management-check-commits-count |
|
@ybettan: Overrode contexts on behalf of ybettan: pull-kernel-module-management-check-commits-count In response to this:
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. |
|
/lgtm |
b765898
into
kubernetes-sigs:release-2.5
/assign @yevgeny-shnaidman @TomerNewman