Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Use Kubernetes GC to clean kubevirt VMs (packet-* jobs) #11530

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Commits on Oct 3, 2024

  1. CI: use Kubernetes GC to delete kubevirt vms

    This leverage the Kubernetes GC to delete kubevirt VMs, by using
    ownerReferences, with the CI pod running the playbook as the owner.
    This concretely means that the control plane in our CI cluster will
    delete the kubevirt VMs associated with a particular ci job as soon as
    that pod job is deleted, which usually happens when the job terminates,
    (barring errors, which will be addressed in the cluster directly)
    
    Upgrade to kubevirt.io/v1 for the VirtualMachine manifests, since the
    alpha version is deprecated.
    VannTen committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    8edf78f View commit details
    Browse the repository at this point in the history
  2. CI: remove deletion tasks of 'packet' VMs

    Kubevirt VMs deletion will be handled by the Kubernetes GC (see previous
    commit), remove all the codes handling that.
    VannTen committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    3d78e96 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2024

  1. CI: use kubernetes.core.k8s_info instead of kubectl

    Also, use the Ready condition of VirtualMachine instead of
    custom checks
    VannTen committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    a349121 View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2024

  1. CI: make the ansible inventory a directory

    Not constraining the inventory to .ini allows us to use dynamic
    inventory, which is needed for simplifying kubevirt jobs inventory.
    
    Also reduces the scope of the ANSIBLE_INVENTORY variable.
    VannTen committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    49e0388 View commit details
    Browse the repository at this point in the history
  2. CI: use kubevirt.core dynamic inventory

    This allows a single source of truth for the virtual machines in a
    kubevirt ci-run.
    
    `etcd_member_name` should be correctly handled in kubespray-defaults for
    testing the recover cases.
    VannTen committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    b9e2ba5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    678b791 View commit details
    Browse the repository at this point in the history
  4. CI: use VirtualMachineInstance for VMs

    VMI in Kubevirt are the abstraction below VirtualMachine.
    
    - We don't really need the extra abstraction of VirtualMachine objects
    - Fix the provisioning playbook not waiting correctly on the VMs until
      they have an IP address to use for the dynamic inventory
    VannTen committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    19a4aab View commit details
    Browse the repository at this point in the history