Skip to content
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

Add a validating webhook #89

Closed
3 tasks
qbarrand opened this issue Sep 27, 2022 · 4 comments
Closed
3 tasks

Add a validating webhook #89

qbarrand opened this issue Sep 27, 2022 · 4 comments
Milestone

Comments

@qbarrand
Copy link
Contributor

Some complex constraints cannot be expressed through kubebuilder / OpenAPI annotations.
To avoid errors at runtime, non-trivial validations are typically implemented in a Validating Admission Webhook. We should implement such a webhook to detect malformed Modules as early as possible.

Checks:

  • all regexes in the Module are valid
  • all kernel mappings should have a non-empty containerImage field, unless .spec.moduleLoader.container.containerImage is defined
  • .spec.moduleLoader.container.modprobe.moduleName is not empty unless both modprobe.rawArgs.load and modprobe.rawArgs.unload are defined
@yevgeny-shnaidman
Copy link
Contributor

yevgeny-shnaidman commented Oct 20, 2022

in case RawArgs are set, webhook must make sure that -a option is not set ( -a option is not support by KMM)

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 18, 2023
@qbarrand
Copy link
Contributor Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 18, 2023
@qbarrand qbarrand added this to the Release 1.1 milestone Mar 8, 2023
@qbarrand
Copy link
Contributor Author

qbarrand commented May 3, 2023

Merged in #348 #368 #383 #388

@qbarrand qbarrand closed this as completed May 3, 2023
qbarrand pushed a commit to qbarrand/kernel-module-management that referenced this issue Jun 2, 2023
We have moved all the packages code to internal/ directory and this is
some leftovers.

Signed-off-by: Yoni Bettan <yonibettan@gmail.com>
qbarrand pushed a commit to qbarrand/kernel-module-management that referenced this issue Jun 2, 2023
yevgeny-shnaidman pushed a commit to yevgeny-shnaidman/kernel-module-management-upstream that referenced this issue Jul 31, 2023
We have moved all the packages code to internal/ directory and this is
some leftovers.

Signed-off-by: Yoni Bettan <yonibettan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants