kubevirt
kubevirt copied to clipboard
sidecar to inject qemu args
What this PR does
Before this PR: PR introduces an additional sample sidecar to inject additional qemu args to the domain definition, based on annotations present on the VMI.
After this PR: Users can fine tune qemu args in the domain definition to control specific behavior.
Fixes # https://github.com/kubevirt/kubevirt/issues/11093
Why we need it and why it was done in this way
The following tradeoffs were made: The sidecar approach seems the least disruptive means to perform this operation without changing core kubevirt api to allow inject of random qemu arguments.
The following alternatives were considered:
Links to places where the discussion took place: Please refer to conversation from here: https://github.com/kubevirt/kubevirt/issues/11093#issuecomment-2078541705
Special notes for your reviewer
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR. Approvers are expected to review this list.
- [ ] Design: A design document was considered and is present (link) or not required
- [ ] PR: The PR description is expressive enough and will help future contributors
- [ ] Code: Write code that humans can understand and Keep it simple
- [ ] Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
- [ ] Upgrade: Impact of this change on upgrade flows was considered and addressed if required
- [ ] Testing: New code requires new unit tests. New features and bug fixes require at least on e2e test
- [ ] Documentation: A user-guide update was considered and is present (link) or not required. You want a user-guide update if it's a user facing feature / API change.
- [ ] Community: Announcement to kubevirt-dev was considered
Release note
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.
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/test-infra repository.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign iholder101 for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
Hi @ibrokethecloud. Thanks for your PR.
PRs from untrusted users cannot be marked as trusted with /ok-to-test
in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all
.
I understand the commands that are listed here.
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/test-infra repository.
I wrote one in the past too, see https://github.com/kubevirt/kubevirt/pull/9166#issuecomment-1768039885
@ibrokethecloud this should be doable with the configmap that @victortoso mentioned. I would avoid to add an new image. On the other hand, I think we are missing the documentation how to achieve it, @victortoso am I correct? If so, would you mind to add the example in the user guide?
Hi @alicefr and @ibrokethecloud
I created a simple python script to add qemu env/args using sidecars + configmap and published it as a gist: https://gist.github.com/victortoso/4a54ef0e75a2b917bb21cb33ec4da141
would you mind to add the example in the user guide?
I'll propose adding it in the user-guide later Today.
Just for clarification, the steps using this example are:
- The annotation for env/args is:
libvirt.vm.kubevirt.io/qemuArgs
, see how the data was set here - Create the configmap e.g:
k create -f examples/my-config-map.yaml
- Create the VMI (should have sidecar metadata properly set, see it here)
Cheers,
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
/close
@kubevirt-bot: Closed this PR.
In response to this:
Rotten issues close after 30d of inactivity. Reopen the issue with
/reopen
. Mark the issue as fresh with/remove-lifecycle rotten
./close
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.