Skip to content

Modify KubeVirtMachine API to include entire VM Template section#61

Merged
k8s-ci-robot merged 7 commits intokubernetes-sigs:mainfrom
davidvossel:vm-template-api
Dec 22, 2021
Merged

Modify KubeVirtMachine API to include entire VM Template section#61
k8s-ci-robot merged 7 commits intokubernetes-sigs:mainfrom
davidvossel:vm-template-api

Conversation

@davidvossel
Copy link
Contributor

fixes #11
fixes #41
fixes #51

This modifies the KubeVirtMachine api to include the entire VM template section rather than just a VMI spec. This allows the following scenarios to be expressed which were not possible before.

  • KubeVirtMachines can now use DataVolumeTemplates for disk import and persistent storage
  • KubeVirtMachines now has the potential to specify the KubeVirt VM's namespace independently of the KubeVirtMachine's namespace, this is useful for external clusters
  • Custom annotations and labels can now get set on the KubeVirt VM/VMI independently of the KubeVirtMachine.
KubevirtMachineTemplate
├── ...
└── spec
    └── template
        ├── metadata (metadata used for KubevirtMachine)
            ├── providerID
            └── virtualMachineTemplate
                ├── metadata (metadata used when creating the KubeVirt VM)
                └── spec  (= VirtualMachine.spec)
                    ├── dataVolumeTemplates
                    └── template
                        ├── metadata (metadata assigned to the running VMI instance)
                        └── spec  (= VirtualMachineInstance.spec)
Modifies KubeVirtMachine api to include entire VM Template section

Signed-off-by: David Vossel <davidvossel@gmail.com>
Signed-off-by: David Vossel <davidvossel@gmail.com>
Signed-off-by: David Vossel <davidvossel@gmail.com>
Signed-off-by: David Vossel <davidvossel@gmail.com>
…achine

Signed-off-by: David Vossel <davidvossel@gmail.com>
Signed-off-by: David Vossel <davidvossel@gmail.com>
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 22, 2021
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Dec 22, 2021
Signed-off-by: David Vossel <davidvossel@gmail.com>
@davidvossel
Copy link
Contributor Author

/cc @agradouski fyi, this handles the external namespace. The previous behavior you implemented still remains. The custom namespace is only used when the kubevirtMachine.Spec.VirtualMachineTemplate.Namespace is set to something other than "".

@agradouski
Copy link
Contributor

thanks for your PR @davidvossel! changes look great, tested locally.
/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 22, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: agradouski, davidvossel

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 22, 2021
@k8s-ci-robot k8s-ci-robot merged commit 6aff381 into kubernetes-sigs:main Dec 22, 2021
nunnatsa pushed a commit to nunnatsa/cluster-api-provider-kubevirt that referenced this pull request Jan 12, 2025
…r-api-provider-kubevirt-mce-26

Red Hat Konflux update cluster-api-provider-kubevirt-mce-26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

3 participants