Skip to content

Add further checks on Module version #457

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

Merged
merged 1 commit into from
Jun 22, 2023

Conversation

qbarrand
Copy link
Contributor

Prevent updating to or from an empty ModuleLoader version, as this requires recreating new DaemonSets because of labelSelector updates.

/cc @yevgeny-shnaidman

Prevent updating to or from an empty ModuleLoader version, as this
requires recreating new DaemonSets because of labelSelector updates
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qbarrand

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 the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 21, 2023
@netlify
Copy link

netlify bot commented Jun 21, 2023

Deploy Preview for kubernetes-sigs-kmm ready!

Name Link
🔨 Latest commit b4dff09
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kmm/deploys/649320f03e97b500087dfcd9
😎 Deploy Preview https://deploy-preview-457--kubernetes-sigs-kmm.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 21, 2023
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 94.11% and project coverage change: +0.16 🎉

Comparison is base (05e91ec) 82.89% compared to head (b4dff09) 83.05%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #457      +/-   ##
==========================================
+ Coverage   82.89%   83.05%   +0.16%     
==========================================
  Files          33       33              
  Lines        3315     3329      +14     
==========================================
+ Hits         2748     2765      +17     
+ Misses        464      462       -2     
+ Partials      103      102       -1     
Impacted Files Coverage Δ
api/v1beta1/module_webhook.go 82.95% <70.00%> (-1.86%) ⬇️
controllers/module_reconciler.go 86.22% <100.00%> (+2.08%) ⬆️
internal/daemonset/daemonset.go 98.41% <100.00%> (-0.01%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

modulelog.Info("Validating Module update", "name", m.Name, "namespace", m.Namespace)

if old != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

can old be nil in the ValidateUpdate? It will mean that the old object does not exists, and in that case ValidateCreate should have been called, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree that it should never be nil. However I have not dug into the implementation and I would not fail if old is nil but there is a legitimate reason that we have not thought about.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, fair enough.

@qbarrand
Copy link
Contributor Author

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 22, 2023
@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 Jun 22, 2023
@qbarrand
Copy link
Contributor Author

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 22, 2023
@k8s-ci-robot k8s-ci-robot merged commit 4b3bc41 into kubernetes-sigs:main Jun 22, 2023
@qbarrand qbarrand deleted the module-empty-version branch June 22, 2023 08:37
qbarrand pushed a commit to qbarrand/kernel-module-management that referenced this pull request Nov 8, 2023
This PR allows customer to run Preflight validation flow on an OCP cluster
with RT kernel deployed. The flow as following
1) add a boolean flag to PreflightOCP CR that allows user to specify if he wants to validate for Full kernel
   version or for RT kernel version
2) when extracting the OS configuration from the OCP DTK image, in case boolean flag in CR was set, the
   validation kernel is set to RT kernel
qbarrand added a commit to qbarrand/kernel-module-management that referenced this pull request Nov 8, 2023
…s-sigs#642)

Prevent updating to or from an empty ModuleLoader version, as this
requires recreating new DaemonSets because of labelSelector updates

Upstream-Commit: 4b3bc41

Co-authored-by: Quentin Barrand <[email protected]>
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants