-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 'EvictionStrategy' as a cluster-wide setting in the KubeVirt CR #7086
Add 'EvictionStrategy' as a cluster-wide setting in the KubeVirt CR #7086
Conversation
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!! comments below!
I would also add documentation to here.
pkg/virt-api/webhooks/validating-webhook/admitters/pod-eviction-admitter.go
Show resolved
Hide resolved
pkg/virt-api/webhooks/validating-webhook/admitters/vmi-create-admitter.go
Outdated
Show resolved
Hide resolved
pkg/virt-api/webhooks/validating-webhook/admitters/pod-eviction-admitter_test.go
Show resolved
Hide resolved
cb927a3
to
fcd1797
Compare
I added some docs here 03cdd41#diff-34a591e3aa47260cfad791064c20f34f98fdca4a63532fbf7184e68682f4fcb8R2049. Thanks for the review! |
168a00d
to
760ef2f
Compare
/retest |
760ef2f
to
6fcca39
Compare
/retest |
Thank you @acardace! |
/retest |
2 similar comments
/retest |
/retest |
/test pull-kubevirt-unit-test |
6fcca39
to
b38e67a
Compare
…t CR If set this will apply to all VMIs which don't have an EvictionStrategy setting set in their VMI's spec. Signed-off-by: Antonio Cardace <acardace@redhat.com>
This patch takes into account the cluster-wide setting if the VMI specific EvictionStrategy has not been set. Signed-off-by: Antonio Cardace <acardace@redhat.com>
Removing vmi.VirtualMachineInstance.IsEvictable() as it's now unused in our codebase. Signed-off-by: Antonio Cardace <acardace@redhat.com>
This option can be used by the single VMI to opt-out from being live-migrated on eviction if the cluster is set to do so. Signed-off-by: Antonio Cardace <acardace@redhat.com>
Signed-off-by: Antonio Cardace <acardace@redhat.com>
Signed-off-by: Antonio Cardace <acardace@redhat.com>
b38e67a
to
0f2cc54
Compare
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
Thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: davidvossel 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. Just a nits that can be addressed later. Thanks
…g unit tests Signed-off-by: Antonio Cardace <acardace@redhat.com>
0f2cc54
to
3730f7a
Compare
/lgtm Thanks |
@acardace: The following tests failed, say
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 understand the commands that are listed here. |
/retest |
Sorry for not checking the code in detail which probably answers this, but how will this behave if the VMI is non-migratable? Will there be warnings triggered, or do you take care of differentiating between explicitly set eviction strategies and defaulting and inhibit the warning events? Or do you expect users to always set None as strategy explicitly to avoid warnings of any sort? |
@rmohr no worries, basically something like the "current" behavior is kept, if you specify you want to live migrate on eviction for all VMIs in the cluster you will get warnings if some VMIs are not. |
What I want to get at: I did not have to worry about opting out of live-migrations before if I e.g. chose a local volume, a local resouce, ... Now I will get warnings although I never opted in? |
I see, in practice yes if the cluster admin set the global conf to live migrate everything on eviction, unless you explicitly set I don't know if it's better to still see the alert or just hide it, @rmohr would you like to silence it? |
Sorry for not following up. I think that in the case where we only set a default recommendation we could come up with an alternative cluster-strategy: Something like Especially with local storage in play that is anyway the right action. The VMI is bound to that node still and will come up when the node comes up again. |
Yes, that's a neat idea, I like it! I'll create an issue to track it and get to it to as soon as possible. |
What this PR does / why we need it:
If set this will apply to all VMIs which don't have an EvictionStrategy setting set in their VMI's spec.
Also add 'EvictionStrategyNone' as a VMI Eviction Strategy, This option can be used by the single VMI to opt-out from being live-migrated on eviction if the cluster is set to do so.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Release note: