XMLWordPrintable

    • Product / Portfolio Work
    • 2
    • False
    • Hide

      None

      Show
      None
    • False
    • Moderate
    • None

      The way the VM state is controlled in KubeVirt won't work well with Gitops because it's in the spec.running which is the desired state. As you are already aware any time the desired state is changed, ArgoCD will go out of sync and will try to re-sync to the previous state. So when a user tries to start a stopped VM, it will get reverted to stopped state and vice versa.

      We tried the subresource API but it still changes the spec.running field so it doesn't work.

      It was suggest to ask customers to use the ArgoCD ignoreDifferences feature:

      You could just ignoreDifferences on that field:

      https://argo-cd.readthedocs.io/en/stable/user-guide/diffing/#application-level-configuration

      You also want to set the sync option RespectIgnoreDifferences as well for this case:

      https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/#respect-ignore-difference-configs

      And finally to optimize reconciliation you could enable the optimization and have it ignore updates to this field.

      However I'm not sure if this is a good idea if health checks are computed off this field instead of status so some investigation may be required.

      https://argo-cd.readthedocs.io/en/stable/operator-manual/reconcile/

       

              fxiang@redhat.com Feng Xiang
              fxiang@redhat.com Feng Xiang
              David Huynh David Huynh
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: