sap_vm_provision/kubevirt_vm: Make evictionStrategy configurable - #166
Merged
Conversation
Move evictionStrategy from spec.template.spec.domain (wrong API level, silently ignored by KubeVirt) to spec.template.spec (correct level). Expose as variable sap_vm_provision_kubevirt_vm_eviction_strategy, defaulting to None for compatibility with ReadWriteOnce storage. Users can override to LiveMigrate when using shared storage (RWX).
marcelmamula
self-requested a review
August 3, 2026 07:00
marcelmamula
requested changes
Aug 3, 2026
marcelmamula
reviewed
Aug 3, 2026
- Add (String) type hint to the comment to clarify quoting is required - Create validations/kubevirt_vm.yml to assert the variable is a valid string and one of 'None' or 'LiveMigrate' before module execution
aisa-b
force-pushed
the
fix-eviction-strategy
branch
from
August 4, 2026 12:43
2773710 to
cb4e090
Compare
marcelmamula
approved these changes
Aug 6, 2026
marcelmamula
left a comment
Contributor
There was a problem hiding this comment.
LGTM from code perspetive.
@newkit will have to approve from actual testing perspective.
Member
|
LGTM2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
evictionStrategy was hardcoded to LiveMigrate under spec.template.spec.domain.
Two problems with this:
not under domain. It was silently ignored (unknown field warning).
VMs enter CrashLoopBackOff due to repeated eviction attempts.
Moved evictionStrategy to the correct level and exposed it as a variable
(sap_vm_provision_kubevirt_vm_eviction_strategy). Defaults to None which
works with any storage type. Users can override to LiveMigrate when using
shared storage (RWX).