diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index f7e6f17f054e..a4d9fcbcd279 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -4941,6 +4941,20 @@ } } }, + "v1.MigrationConfig": { + "properties": { + "completionTimeoutPerGiB": { + "description": "The time for GiB of data to wait for the migration to be completed before aborting it", + "type": "integer", + "format": "int64" + }, + "progressTimeout": { + "description": "The time to wait for live migration to make progress in transferring data.", + "type": "integer", + "format": "int64" + } + } + }, "v1.Network": { "description": "Network represents a network type and a resource that should be connected to the vm.", "required": [ @@ -5870,6 +5884,9 @@ }, "v1.VirtualMachineInstanceMigrationSpec": { "properties": { + "configuration": { + "$ref": "#/definitions/v1.MigrationConfig" + }, "vmiName": { "description": "The name of the VMI to perform the migration on. VMI must exist in the migration objects namespace", "type": "string" diff --git a/pkg/api/v1/deepcopy_generated.go b/pkg/api/v1/deepcopy_generated.go index 7ec64873e707..106d9ba62b15 100644 --- a/pkg/api/v1/deepcopy_generated.go +++ b/pkg/api/v1/deepcopy_generated.go @@ -1981,7 +1981,7 @@ func (in *VirtualMachineInstanceMigration) DeepCopyInto(out *VirtualMachineInsta *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec + in.Spec.DeepCopyInto(&out.Spec) out.Status = in.Status return } @@ -2040,6 +2040,15 @@ func (in *VirtualMachineInstanceMigrationList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VirtualMachineInstanceMigrationSpec) DeepCopyInto(out *VirtualMachineInstanceMigrationSpec) { *out = *in + if in.Config != nil { + in, out := &in.Config, &out.Config + if *in == nil { + *out = nil + } else { + *out = new(MigrationConfig) + **out = **in + } + } return } diff --git a/pkg/api/v1/openapi_generated.go b/pkg/api/v1/openapi_generated.go index 4fececaebcc8..eecbe0626ed6 100644 --- a/pkg/api/v1/openapi_generated.go +++ b/pkg/api/v1/openapi_generated.go @@ -2476,10 +2476,16 @@ func schema_kubevirt_pkg_api_v1_VirtualMachineInstanceMigrationSpec(ref common.R Format: "", }, }, + "configuration": { + SchemaProps: spec.SchemaProps{ + Ref: ref("kubevirt.io/kubevirt/pkg/api/v1.MigrationConfig"), + }, + }, }, }, }, - Dependencies: []string{}, + Dependencies: []string{ + "kubevirt.io/kubevirt/pkg/api/v1.MigrationConfig"}, } } diff --git a/pkg/api/v1/types.go b/pkg/api/v1/types.go index f62b8e3b98de..0d124be6f621 100644 --- a/pkg/api/v1/types.go +++ b/pkg/api/v1/types.go @@ -743,7 +743,8 @@ func (vl *VirtualMachineInstanceMigrationList) GetListMeta() meta.List { // +k8s:openapi-gen=true type VirtualMachineInstanceMigrationSpec struct { // The name of the VMI to perform the migration on. VMI must exist in the migration objects namespace - VMIName string `json:"vmiName,omitempty" valid:"required"` + VMIName string `json:"vmiName,omitempty" valid:"required"` + Config *MigrationConfig `json:"configuration,omitempty"` } // VirtualMachineInstanceMigration reprents information pertaining to a VMI's migration.