Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-66703

[UI] use a new annotation to eventually opt-out selected VMs from the the descheduler scope

XMLWordPrintable

    • None

      Description of problem:

      The current UI code is using descheduler.alpha.kubernetes.io/evict annotation to opt-in selected VMs to the the descheduler.
      
      Having CNV descheduler integration reaching GA, we want to have all the live-migratable  VMs in by default and let the cluster admin eventually opt-out selected VMs.
      
      descheduler.alpha.kubernetes.io/prefer-no-eviction annotation can be used to let the VM owner opt-out selected VMs: a VM annotated with descheduler.alpha.kubernetes.io/prefer-no-eviction (independently from its value) will be ignored by the descheduler.
      
      KubeVirt is now able to dynamically propagate descheduler.alpha.kubernetes.io/prefer-no-eviction and descheduler.alpha.kubernetes.io/evict annotations to virt-launcher pods without the need to restart the VM.
      
      The descheduler will check descheduler.alpha.kubernetes.io/evict and descheduler.alpha.kubernetes.io/prefer-no-eviction annotations: if both are present  descheduler.alpha.kubernetes.io/evict will win for backward compatibility reasons.
      So when setting descheduler.alpha.kubernetes.io/prefer-no-eviction, the UI should also eventually remove descheduler.alpha.kubernetes.io/evict if present.
      
      As a reference: https://github.com/kubevirt-ui/kubevirt-plugin/blob/main/src/views/catalog/wizard/tabs/scheduling/components/Descheduler.tsx#L32-L36
      
      

      Version-Release number of selected component (if applicable): 4.20

      
      

      How reproducible: 100%

      
      

      Steps to Reproduce:

      1. use the descheduler knob in the UI (VirtualMachine details / Configuration / Scheduling and resource requirements / Descheduler)
      2.
      3.
      

      Actual results:

      The UI is setting descheduler.alpha.kubernetes.io/evict to opt-in
      

      Expected results:

      The UI is setting descheduler.alpha.kubernetes.io/prefer-no-eviction to opt-out (eventually removing descheduler.alpha.kubernetes.io/evict if present).
      

      Additional info:

      
      

              phbailey@redhat.com Phillip Rhodes
              stirabos Simone Tiraboschi
              Leon Kladnitsky Leon Kladnitsky
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: