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

Validate foreground deletion behavior

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • None
    • CNV Virtualization
    • 0.42
    • False
    • Hide

      None

      Show
      None
    • False
    • Hide

      1. Validate kubectl foreground deletion
      2. Validate finalizers on VM foreground deletion
      3. Update kubevirt user-gude accordingly

      Show
      1. Validate kubectl foreground deletion 2. Validate finalizers on VM foreground deletion 3. Update kubevirt user-gude accordingly
    • None

      This is for a customer.
      Goal of this spike is to undesrstand how foreground deletion can be triggered - a client and server side appraoch must be validated:

      Something that I have certainty on that it will work:

      $ kubectl delete  --cascade='foreground' … 
      # Returns once VM and VMI and launcher pod are gone, and not before
      

      But this foreground deletion depends on the client/caller.

      The other approach:

      A possible alternative is to create a VM object as usual, but with the following finalizer set:

      kind: VM (not VMI)
      …
      metadata:  # VM level
        finalizers:
          - foregroundDeletion
      spec:
        template:  # VMI level
          metadata:
            finalizers:
              - foregroundDeletion
      …
      

      This VM object can then be deleted with

      $ kubectl delete (no --cascade flag!)
      # Returns once VM and VMI and launcher pod are gone, and not before
      

      and should still behave like "kubectl delete --cascade=foreground"
      This method is server / callee sided, and thus client independent, and what the custoemr is asking for.

      Scope of this sprint is to validate both approachs for foreground deletion and open a PR against the kubevirt user-guide to clarify the situation.

              sgott@redhat.com Stuart Gott
              fdeutsch@redhat.com Fabian Deutsch
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: