mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 12:13:55 +09:00
Hidora's customers are leaving VMware now, and a tenant has to be able to import their own machines without a platform administrator. The chart approach could not express that: a tenant can neither create the Secret holding vCenter credentials nor name the VDDK image, so both had to come from somewhere they cannot reach. Two CRDs in a new `forklift.cozystack.io` group, split by lifecycle. A VMImportSource is a long-lived connection -- type, endpoint, credentials, readiness -- and a VMImportTask is the one-shot operation that names machines and produces VMDisks and VMInstances. The outputs carry no owner reference back to the task, so deleting a finished import leaves the machines alone. Konveyor Forklift does the transfer underneath; the controller renders its objects, mirrors its verdicts, and hands each finished volume into a VMDisk without copying it. What a live vCenter migration forced out, and no amount of source reading would have: - A guest copied verbatim keeps the drivers it had under VMware and no virtio, so on a virtio disk it does not fail the import -- it succeeds and then does not boot. Imported disks go on SATA. - VDDK connects straight to the ESXi host at the address vCenter advertises, which is routinely unreachable, and on the first cluster collided with the Service CIDR. `spec.hosts` redirects per host. - Firmware must be carried across or a UEFI guest imports as BIOS and never boots (stacked on #3002). - Deleting a task mid-transfer orphaned its DataVolume; a finalizer now removes the engine's volumes and leaves the outputs. The console gains a Migration section: connections are editable, and the VM field is a picker built from a machine list the controller publishes, since the aggregated API cannot reach the inventory and should not hold a source's credentials to try. Two general mechanisms fall out of that -- an option source may take an argument, and one named in a CRD annotation may reference a sibling field. Design: cozystack/community#62. Docs: cozystack/website#673. Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
327 lines
9.3 KiB
Go
Generated
327 lines
9.3 KiB
Go
Generated
//go:build !ignore_autogenerated
|
|
|
|
/*
|
|
Copyright 2025 The Cozystack Authors.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
// Code generated by controller-gen. DO NOT EDIT.
|
|
|
|
package v1alpha1
|
|
|
|
import (
|
|
"k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
"k8s.io/apimachinery/pkg/runtime"
|
|
)
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *HostOverride) DeepCopyInto(out *HostOverride) {
|
|
*out = *in
|
|
out.Credentials = in.Credentials
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostOverride.
|
|
func (in *HostOverride) DeepCopy() *HostOverride {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(HostOverride)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *ProviderCredentials) DeepCopyInto(out *ProviderCredentials) {
|
|
*out = *in
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderCredentials.
|
|
func (in *ProviderCredentials) DeepCopy() *ProviderCredentials {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(ProviderCredentials)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *PublishedVM) DeepCopyInto(out *PublishedVM) {
|
|
*out = *in
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PublishedVM.
|
|
func (in *PublishedVM) DeepCopy() *PublishedVM {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(PublishedVM)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *VMImportRequest) DeepCopyInto(out *VMImportRequest) {
|
|
*out = *in
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMImportRequest.
|
|
func (in *VMImportRequest) DeepCopy() *VMImportRequest {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(VMImportRequest)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *VMImportSource) DeepCopyInto(out *VMImportSource) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
in.Spec.DeepCopyInto(&out.Spec)
|
|
in.Status.DeepCopyInto(&out.Status)
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMImportSource.
|
|
func (in *VMImportSource) DeepCopy() *VMImportSource {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(VMImportSource)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *VMImportSource) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *VMImportSourceList) DeepCopyInto(out *VMImportSourceList) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
if in.Items != nil {
|
|
in, out := &in.Items, &out.Items
|
|
*out = make([]VMImportSource, len(*in))
|
|
for i := range *in {
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMImportSourceList.
|
|
func (in *VMImportSourceList) DeepCopy() *VMImportSourceList {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(VMImportSourceList)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *VMImportSourceList) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *VMImportSourceSpec) DeepCopyInto(out *VMImportSourceSpec) {
|
|
*out = *in
|
|
out.Credentials = in.Credentials
|
|
if in.Hosts != nil {
|
|
in, out := &in.Hosts, &out.Hosts
|
|
*out = make([]HostOverride, len(*in))
|
|
copy(*out, *in)
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMImportSourceSpec.
|
|
func (in *VMImportSourceSpec) DeepCopy() *VMImportSourceSpec {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(VMImportSourceSpec)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *VMImportSourceStatus) DeepCopyInto(out *VMImportSourceStatus) {
|
|
*out = *in
|
|
if in.Conditions != nil {
|
|
in, out := &in.Conditions, &out.Conditions
|
|
*out = make([]v1.Condition, len(*in))
|
|
for i := range *in {
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMImportSourceStatus.
|
|
func (in *VMImportSourceStatus) DeepCopy() *VMImportSourceStatus {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(VMImportSourceStatus)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *VMImportStatus) DeepCopyInto(out *VMImportStatus) {
|
|
*out = *in
|
|
if in.Disks != nil {
|
|
in, out := &in.Disks, &out.Disks
|
|
*out = make([]string, len(*in))
|
|
copy(*out, *in)
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMImportStatus.
|
|
func (in *VMImportStatus) DeepCopy() *VMImportStatus {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(VMImportStatus)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *VMImportTask) DeepCopyInto(out *VMImportTask) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
|
in.Spec.DeepCopyInto(&out.Spec)
|
|
in.Status.DeepCopyInto(&out.Status)
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMImportTask.
|
|
func (in *VMImportTask) DeepCopy() *VMImportTask {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(VMImportTask)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *VMImportTask) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *VMImportTaskList) DeepCopyInto(out *VMImportTaskList) {
|
|
*out = *in
|
|
out.TypeMeta = in.TypeMeta
|
|
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
|
if in.Items != nil {
|
|
in, out := &in.Items, &out.Items
|
|
*out = make([]VMImportTask, len(*in))
|
|
for i := range *in {
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMImportTaskList.
|
|
func (in *VMImportTaskList) DeepCopy() *VMImportTaskList {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(VMImportTaskList)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
|
func (in *VMImportTaskList) DeepCopyObject() runtime.Object {
|
|
if c := in.DeepCopy(); c != nil {
|
|
return c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *VMImportTaskSpec) DeepCopyInto(out *VMImportTaskSpec) {
|
|
*out = *in
|
|
out.SourceRef = in.SourceRef
|
|
if in.VMs != nil {
|
|
in, out := &in.VMs, &out.VMs
|
|
*out = make([]VMImportRequest, len(*in))
|
|
copy(*out, *in)
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMImportTaskSpec.
|
|
func (in *VMImportTaskSpec) DeepCopy() *VMImportTaskSpec {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(VMImportTaskSpec)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|
|
|
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
|
func (in *VMImportTaskStatus) DeepCopyInto(out *VMImportTaskStatus) {
|
|
*out = *in
|
|
if in.VMs != nil {
|
|
in, out := &in.VMs, &out.VMs
|
|
*out = make([]VMImportStatus, len(*in))
|
|
for i := range *in {
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
}
|
|
}
|
|
if in.StartedAt != nil {
|
|
in, out := &in.StartedAt, &out.StartedAt
|
|
*out = (*in).DeepCopy()
|
|
}
|
|
if in.CompletedAt != nil {
|
|
in, out := &in.CompletedAt, &out.CompletedAt
|
|
*out = (*in).DeepCopy()
|
|
}
|
|
if in.Conditions != nil {
|
|
in, out := &in.Conditions, &out.Conditions
|
|
*out = make([]v1.Condition, len(*in))
|
|
for i := range *in {
|
|
(*in)[i].DeepCopyInto(&(*out)[i])
|
|
}
|
|
}
|
|
}
|
|
|
|
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMImportTaskStatus.
|
|
func (in *VMImportTaskStatus) DeepCopy() *VMImportTaskStatus {
|
|
if in == nil {
|
|
return nil
|
|
}
|
|
out := new(VMImportTaskStatus)
|
|
in.DeepCopyInto(out)
|
|
return out
|
|
}
|