Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eviction admitter: Extract isVirtLauncher function
Currently, it is not possible to filter eviction requests by pod label [1][2], thus unfortunately the admitter intercepts all eviction requests in the cluster - including for pods that are not virt-launchers. The admitter checks whether an evicted pod is a virt-launcher by checking the the existence and value of the `kubevirt.io` label. Extract this logic into a function for better readability. The value of the `kubevirt.io/domain` annotation on the virt-launcher pod, represents the name of its controlling VMI. Rename the `domainName` variable to `vmiName` in order to better describe its purpose. [1] kubernetes/kubernetes#110169 (comment) [2] https://kubernetes.slack.com/archives/C0EG7JC6T/p1707054818877809 Signed-off-by: Orel Misan <omisan@redhat.com>
- Loading branch information