From cc0171b0cbdd34dbc00c8146dcc99b9e0fe59028 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 04:52:19 +0000 Subject: [PATCH] Bump kubevirt.io/api from 1.0.0 to 1.1.0 Bumps [kubevirt.io/api](https://github.com/kubevirt/api) from 1.0.0 to 1.1.0. - [Commits](https://github.com/kubevirt/api/compare/v1.0.0...v1.1.0) --- updated-dependencies: - dependency-name: kubevirt.io/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 +- .../kubevirt.io/api/clone/v1alpha1/types.go | 16 +- .../clone/v1alpha1/types_swagger_generated.go | 7 +- .../api/core/v1/deepcopy_generated.go | 441 +++++++++++++++--- vendor/kubevirt.io/api/core/v1/schema.go | 70 ++- .../api/core/v1/schema_swagger_generated.go | 41 +- vendor/kubevirt.io/api/core/v1/types.go | 232 ++++++--- .../api/core/v1/types_swagger_generated.go | 128 +++-- .../kubevirt.io/api/instancetype/register.go | 8 + .../api/instancetype/v1alpha1/conversion.go | 4 + .../v1alpha1/conversion_generated.go | 20 +- .../api/instancetype/v1alpha2/conversion.go | 4 + .../v1alpha2/conversion_generated.go | 20 +- .../api/instancetype/v1alpha2/types.go | 2 +- .../v1alpha2/types_swagger_generated.go | 2 +- .../v1beta1/deepcopy_generated.go | 21 + .../api/instancetype/v1beta1/types.go | 39 +- .../v1beta1/types_swagger_generated.go | 7 +- vendor/modules.txt | 2 +- 20 files changed, 877 insertions(+), 193 deletions(-) diff --git a/go.mod b/go.mod index 4d225f74..6b38bb3e 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( k8s.io/client-go v12.0.0+incompatible k8s.io/klog/v2 v2.90.1 k8s.io/utils v0.0.0-20230505201702-9f6742963106 - kubevirt.io/api v1.0.0 + kubevirt.io/api v1.1.0 kubevirt.io/client-go v1.0.0 kubevirt.io/containerized-data-importer-api v1.57.0 ) diff --git a/go.sum b/go.sum index abe2ad26..c51c0f3b 100644 --- a/go.sum +++ b/go.sum @@ -1602,8 +1602,8 @@ k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20221107191617-1a15be271d1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU= k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -kubevirt.io/api v1.0.0 h1:RBdXP5CDhE0v5qL2OUQdrYyRrHe/F68Z91GWqBDF6nw= -kubevirt.io/api v1.0.0/go.mod h1:CJ4vZsaWhVN3jNbyc9y3lIZhw8nUHbWjap0xHABQiqc= +kubevirt.io/api v1.1.0 h1:G6/32Emr8cout4MUc2Gi3tfp92rq/rMh5LyhKhMxntw= +kubevirt.io/api v1.1.0/go.mod h1:CJ4vZsaWhVN3jNbyc9y3lIZhw8nUHbWjap0xHABQiqc= kubevirt.io/client-go v1.0.0 h1:MMn41j/lFd+lJ7gWn7yuIZYW/aT9fI3bUimAuxAQ+Xk= kubevirt.io/client-go v1.0.0/go.mod h1:zvYQ/L5OmTP2Pn7XcawtoR07p8VhgviADWtgdGCniWA= kubevirt.io/containerized-data-importer-api v1.57.0 h1:IpRCUyDS0x7BaVa5q5MCzuWRAfvXT54GpEnNJke5hSE= diff --git a/vendor/kubevirt.io/api/clone/v1alpha1/types.go b/vendor/kubevirt.io/api/clone/v1alpha1/types.go index 75d94def..f610811e 100644 --- a/vendor/kubevirt.io/api/clone/v1alpha1/types.go +++ b/vendor/kubevirt.io/api/clone/v1alpha1/types.go @@ -38,16 +38,28 @@ type VirtualMachineClone struct { } type VirtualMachineCloneSpec struct { + // Source is the object that would be cloned. Currently supported source types are: + // VirtualMachine of kubevirt.io API group, + // VirtualMachineSnapshot of snapshot.kubevirt.io API group Source *corev1.TypedLocalObjectReference `json:"source"` - // If the target is not provided, a random name would be generated for the target. - // The target's name can be viewed by inspecting status "TargetName" field below. + // Target is the outcome of the cloning process. + // Currently supported source types are: + // - VirtualMachine of kubevirt.io API group + // - Empty (nil). + // If the target is not provided, the target type would default to VirtualMachine and a random + // name would be generated for the target. The target's name can be viewed by + // inspecting status "TargetName" field below. // +optional Target *corev1.TypedLocalObjectReference `json:"target,omitempty"` + // Example use: "!some/key*". + // For a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters. // +optional // +listType=atomic AnnotationFilters []string `json:"annotationFilters,omitempty"` + // Example use: "!some/key*". + // For a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters. // +optional // +listType=atomic LabelFilters []string `json:"labelFilters,omitempty"` diff --git a/vendor/kubevirt.io/api/clone/v1alpha1/types_swagger_generated.go b/vendor/kubevirt.io/api/clone/v1alpha1/types_swagger_generated.go index 6c7c7360..eafdf936 100644 --- a/vendor/kubevirt.io/api/clone/v1alpha1/types_swagger_generated.go +++ b/vendor/kubevirt.io/api/clone/v1alpha1/types_swagger_generated.go @@ -10,9 +10,10 @@ func (VirtualMachineClone) SwaggerDoc() map[string]string { func (VirtualMachineCloneSpec) SwaggerDoc() map[string]string { return map[string]string{ - "target": "If the target is not provided, a random name would be generated for the target.\nThe target's name can be viewed by inspecting status \"TargetName\" field below.\n+optional", - "annotationFilters": "+optional\n+listType=atomic", - "labelFilters": "+optional\n+listType=atomic", + "source": "Source is the object that would be cloned. Currently supported source types are:\nVirtualMachine of kubevirt.io API group,\nVirtualMachineSnapshot of snapshot.kubevirt.io API group", + "target": "Target is the outcome of the cloning process.\nCurrently supported source types are:\n- VirtualMachine of kubevirt.io API group\n- Empty (nil).\nIf the target is not provided, the target type would default to VirtualMachine and a random\nname would be generated for the target. The target's name can be viewed by\ninspecting status \"TargetName\" field below.\n+optional", + "annotationFilters": "Example use: \"!some/key*\".\nFor a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters.\n+optional\n+listType=atomic", + "labelFilters": "Example use: \"!some/key*\".\nFor a detailed description, please refer to https://kubevirt.io/user-guide/operations/clone_api/#label-annotation-filters.\n+optional\n+listType=atomic", "newMacAddresses": "NewMacAddresses manually sets that target interfaces' mac addresses. The key is the interface name and the\nvalue is the new mac address. If this field is not specified, a new MAC address will\nbe generated automatically, as for any interface that is not included in this map.\n+optional", "newSMBiosSerial": "NewSMBiosSerial manually sets that target's SMbios serial. If this field is not specified, a new serial will\nbe generated automatically.\n+optional", } diff --git a/vendor/kubevirt.io/api/core/v1/deepcopy_generated.go b/vendor/kubevirt.io/api/core/v1/deepcopy_generated.go index acaa7cb7..16f00469 100644 --- a/vendor/kubevirt.io/api/core/v1/deepcopy_generated.go +++ b/vendor/kubevirt.io/api/core/v1/deepcopy_generated.go @@ -71,22 +71,6 @@ func (in *AccessCredentialSecretSource) DeepCopy() *AccessCredentialSecretSource return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AddInterfaceOptions) DeepCopyInto(out *AddInterfaceOptions) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddInterfaceOptions. -func (in *AddInterfaceOptions) DeepCopy() *AddInterfaceOptions { - if in == nil { - return nil - } - out := new(AddInterfaceOptions) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AddVolumeOptions) DeepCopyInto(out *AddVolumeOptions) { *out = *in @@ -908,6 +892,11 @@ func (in *Devices) DeepCopyInto(out *Devices) { *out = new(bool) **out = **in } + if in.LogSerialConsole != nil { + in, out := &in.LogSerialConsole, &out.LogSerialConsole + *out = new(bool) + **out = **in + } if in.AutoattachMemBalloon != nil { in, out := &in.AutoattachMemBalloon, &out.AutoattachMemBalloon *out = new(bool) @@ -945,6 +934,11 @@ func (in *Devices) DeepCopyInto(out *Devices) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.DownwardMetrics != nil { + in, out := &in.DownwardMetrics, &out.DownwardMetrics + *out = new(DownwardMetrics) + **out = **in + } if in.Filesystems != nil { in, out := &in.Filesystems, &out.Filesystems *out = make([]Filesystem, len(*in)) @@ -1001,6 +995,22 @@ func (in *DisableFreePageReporting) DeepCopy() *DisableFreePageReporting { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DisableSerialConsoleLog) DeepCopyInto(out *DisableSerialConsoleLog) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DisableSerialConsoleLog. +func (in *DisableSerialConsoleLog) DeepCopy() *DisableSerialConsoleLog { + if in == nil { + return nil + } + out := new(DisableSerialConsoleLog) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Disk) DeepCopyInto(out *Disk) { *out = *in @@ -1025,6 +1035,11 @@ func (in *Disk) DeepCopyInto(out *Disk) { *out = new(bool) **out = **in } + if in.ErrorPolicy != nil { + in, out := &in.ErrorPolicy, &out.ErrorPolicy + *out = new(DiskErrorPolicy) + **out = **in + } return } @@ -1216,6 +1231,22 @@ func (in *DownwardAPIVolumeSource) DeepCopy() *DownwardAPIVolumeSource { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DownwardMetrics) DeepCopyInto(out *DownwardMetrics) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DownwardMetrics. +func (in *DownwardMetrics) DeepCopy() *DownwardMetrics { + if in == nil { + return nil + } + out := new(DownwardMetrics) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DownwardMetricsVolumeSource) DeepCopyInto(out *DownwardMetricsVolumeSource) { *out = *in @@ -1240,6 +1271,11 @@ func (in *EFI) DeepCopyInto(out *EFI) { *out = new(bool) **out = **in } + if in.Persistent != nil { + in, out := &in.Persistent, &out.Persistent + *out = new(bool) + **out = **in + } return } @@ -1923,6 +1959,11 @@ func (in *Input) DeepCopy() *Input { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *InstancetypeMatcher) DeepCopyInto(out *InstancetypeMatcher) { *out = *in + if in.InferFromVolumeFailurePolicy != nil { + in, out := &in.InferFromVolumeFailurePolicy, &out.InferFromVolumeFailurePolicy + *out = new(InferFromVolumeFailurePolicy) + **out = **in + } return } @@ -1940,6 +1981,11 @@ func (in *InstancetypeMatcher) DeepCopy() *InstancetypeMatcher { func (in *Interface) DeepCopyInto(out *Interface) { *out = *in in.InterfaceBindingMethod.DeepCopyInto(&out.InterfaceBindingMethod) + if in.Binding != nil { + in, out := &in.Binding, &out.Binding + *out = new(PluginBinding) + **out = **in + } if in.Ports != nil { in, out := &in.Ports, &out.Ports *out = make([]Port, len(*in)) @@ -2014,6 +2060,22 @@ func (in *InterfaceBindingMethod) DeepCopy() *InterfaceBindingMethod { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InterfaceBindingPlugin) DeepCopyInto(out *InterfaceBindingPlugin) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InterfaceBindingPlugin. +func (in *InterfaceBindingPlugin) DeepCopy() *InterfaceBindingPlugin { + if in == nil { + return nil + } + out := new(InterfaceBindingPlugin) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *InterfaceBridge) DeepCopyInto(out *InterfaceBridge) { *out = *in @@ -2605,6 +2667,22 @@ func (in *LaunchSecurity) DeepCopy() *LaunchSecurity { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LiveUpdateAffinity) DeepCopyInto(out *LiveUpdateAffinity) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LiveUpdateAffinity. +func (in *LiveUpdateAffinity) DeepCopy() *LiveUpdateAffinity { + if in == nil { + return nil + } + out := new(LiveUpdateAffinity) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LiveUpdateCPU) DeepCopyInto(out *LiveUpdateCPU) { *out = *in @@ -2634,6 +2712,11 @@ func (in *LiveUpdateConfiguration) DeepCopyInto(out *LiveUpdateConfiguration) { *out = new(uint32) **out = **in } + if in.MaxGuest != nil { + in, out := &in.MaxGuest, &out.MaxGuest + x := (*in).DeepCopy() + *out = &x + } return } @@ -2655,6 +2738,16 @@ func (in *LiveUpdateFeatures) DeepCopyInto(out *LiveUpdateFeatures) { *out = new(LiveUpdateCPU) (*in).DeepCopyInto(*out) } + if in.Affinity != nil { + in, out := &in.Affinity, &out.Affinity + *out = new(LiveUpdateAffinity) + **out = **in + } + if in.Memory != nil { + in, out := &in.Memory, &out.Memory + *out = new(LiveUpdateMemory) + (*in).DeepCopyInto(*out) + } return } @@ -2668,6 +2761,27 @@ func (in *LiveUpdateFeatures) DeepCopy() *LiveUpdateFeatures { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LiveUpdateMemory) DeepCopyInto(out *LiveUpdateMemory) { + *out = *in + if in.MaxGuest != nil { + in, out := &in.MaxGuest, &out.MaxGuest + x := (*in).DeepCopy() + *out = &x + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LiveUpdateMemory. +func (in *LiveUpdateMemory) DeepCopy() *LiveUpdateMemory { + if in == nil { + return nil + } + out := new(LiveUpdateMemory) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LogVerbosity) DeepCopyInto(out *LogVerbosity) { *out = *in @@ -2785,6 +2899,11 @@ func (in *Memory) DeepCopyInto(out *Memory) { x := (*in).DeepCopy() *out = &x } + if in.MaxGuest != nil { + in, out := &in.MaxGuest, &out.MaxGuest + x := (*in).DeepCopy() + *out = &x + } return } @@ -2815,6 +2934,37 @@ func (in *MemoryDumpVolumeSource) DeepCopy() *MemoryDumpVolumeSource { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MemoryStatus) DeepCopyInto(out *MemoryStatus) { + *out = *in + if in.GuestAtBoot != nil { + in, out := &in.GuestAtBoot, &out.GuestAtBoot + x := (*in).DeepCopy() + *out = &x + } + if in.GuestCurrent != nil { + in, out := &in.GuestCurrent, &out.GuestCurrent + x := (*in).DeepCopy() + *out = &x + } + if in.GuestRequested != nil { + in, out := &in.GuestRequested, &out.GuestRequested + x := (*in).DeepCopy() + *out = &x + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemoryStatus. +func (in *MemoryStatus) DeepCopy() *MemoryStatus { + if in == nil { + return nil + } + out := new(MemoryStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MigrateOptions) DeepCopyInto(out *MigrateOptions) { *out = *in @@ -2996,6 +3146,13 @@ func (in *NetworkConfiguration) DeepCopyInto(out *NetworkConfiguration) { *out = new(bool) **out = **in } + if in.Binding != nil { + in, out := &in.Binding, &out.Binding + *out = make(map[string]InterfaceBindingPlugin, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } return } @@ -3035,6 +3192,22 @@ func (in *NetworkSource) DeepCopy() *NetworkSource { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NoCloudSSHPublicKeyAccessCredentialPropagation) DeepCopyInto(out *NoCloudSSHPublicKeyAccessCredentialPropagation) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NoCloudSSHPublicKeyAccessCredentialPropagation. +func (in *NoCloudSSHPublicKeyAccessCredentialPropagation) DeepCopy() *NoCloudSSHPublicKeyAccessCredentialPropagation { + if in == nil { + return nil + } + out := new(NoCloudSSHPublicKeyAccessCredentialPropagation) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeMediatedDeviceTypesConfig) DeepCopyInto(out *NodeMediatedDeviceTypesConfig) { *out = *in @@ -3175,6 +3348,13 @@ func (in *PermittedHostDevices) DeepCopyInto(out *PermittedHostDevices) { *out = make([]MediatedHostDevice, len(*in)) copy(*out, *in) } + if in.USB != nil { + in, out := &in.USB, &out.USB + *out = make([]USBHostDevice, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } @@ -3250,6 +3430,22 @@ func (in *PersistentVolumeClaimVolumeSource) DeepCopy() *PersistentVolumeClaimVo return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PluginBinding) DeepCopyInto(out *PluginBinding) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginBinding. +func (in *PluginBinding) DeepCopy() *PluginBinding { + if in == nil { + return nil + } + out := new(PluginBinding) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PodNetwork) DeepCopyInto(out *PodNetwork) { *out = *in @@ -3285,6 +3481,11 @@ func (in *Port) DeepCopy() *Port { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PreferenceMatcher) DeepCopyInto(out *PreferenceMatcher) { *out = *in + if in.InferFromVolumeFailurePolicy != nil { + in, out := &in.InferFromVolumeFailurePolicy, &out.InferFromVolumeFailurePolicy + *out = new(InferFromVolumeFailurePolicy) + **out = **in + } return } @@ -3483,22 +3684,6 @@ func (in *ReloadableComponentConfiguration) DeepCopy() *ReloadableComponentConfi return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RemoveInterfaceOptions) DeepCopyInto(out *RemoveInterfaceOptions) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoveInterfaceOptions. -func (in *RemoveInterfaceOptions) DeepCopy() *RemoveInterfaceOptions { - if in == nil { - return nil - } - out := new(RemoveInterfaceOptions) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RemoveVolumeOptions) DeepCopyInto(out *RemoveVolumeOptions) { *out = *in @@ -3601,6 +3786,11 @@ func (in *SEV) DeepCopyInto(out *SEV) { *out = new(SEVPolicy) (*in).DeepCopyInto(*out) } + if in.Attestation != nil { + in, out := &in.Attestation, &out.Attestation + *out = new(SEVAttestation) + **out = **in + } return } @@ -3614,6 +3804,72 @@ func (in *SEV) DeepCopy() *SEV { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SEVAttestation) DeepCopyInto(out *SEVAttestation) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SEVAttestation. +func (in *SEVAttestation) DeepCopy() *SEVAttestation { + if in == nil { + return nil + } + out := new(SEVAttestation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SEVMeasurementInfo) DeepCopyInto(out *SEVMeasurementInfo) { + *out = *in + out.TypeMeta = in.TypeMeta + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SEVMeasurementInfo. +func (in *SEVMeasurementInfo) DeepCopy() *SEVMeasurementInfo { + if in == nil { + return nil + } + out := new(SEVMeasurementInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SEVMeasurementInfo) 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 *SEVPlatformInfo) DeepCopyInto(out *SEVPlatformInfo) { + *out = *in + out.TypeMeta = in.TypeMeta + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SEVPlatformInfo. +func (in *SEVPlatformInfo) DeepCopy() *SEVPlatformInfo { + if in == nil { + return nil + } + out := new(SEVPlatformInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SEVPlatformInfo) 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 *SEVPolicy) DeepCopyInto(out *SEVPolicy) { *out = *in @@ -3635,6 +3891,38 @@ func (in *SEVPolicy) DeepCopy() *SEVPolicy { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SEVSecretOptions) DeepCopyInto(out *SEVSecretOptions) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SEVSecretOptions. +func (in *SEVSecretOptions) DeepCopy() *SEVSecretOptions { + if in == nil { + return nil + } + out := new(SEVSecretOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SEVSessionOptions) DeepCopyInto(out *SEVSessionOptions) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SEVSessionOptions. +func (in *SEVSessionOptions) DeepCopy() *SEVSessionOptions { + if in == nil { + return nil + } + out := new(SEVSessionOptions) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SMBiosConfiguration) DeepCopyInto(out *SMBiosConfiguration) { *out = *in @@ -3677,6 +3965,11 @@ func (in *SSHPublicKeyAccessCredentialPropagationMethod) DeepCopyInto(out *SSHPu *out = new(ConfigDriveSSHPublicKeyAccessCredentialPropagation) **out = **in } + if in.NoCloud != nil { + in, out := &in.NoCloud, &out.NoCloud + *out = new(NoCloudSSHPublicKeyAccessCredentialPropagation) + **out = **in + } if in.QemuGuestAgent != nil { in, out := &in.QemuGuestAgent, &out.QemuGuestAgent *out = new(QemuGuestAgentSSHPublicKeyAccessCredentialPropagation) @@ -4044,6 +4337,43 @@ func (in *TopologyHints) DeepCopy() *TopologyHints { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *USBHostDevice) DeepCopyInto(out *USBHostDevice) { + *out = *in + if in.Selectors != nil { + in, out := &in.Selectors, &out.Selectors + *out = make([]USBSelector, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new USBHostDevice. +func (in *USBHostDevice) DeepCopy() *USBHostDevice { + if in == nil { + return nil + } + out := new(USBHostDevice) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *USBSelector) DeepCopyInto(out *USBSelector) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new USBSelector. +func (in *USBSelector) DeepCopy() *USBSelector { + if in == nil { + return nil + } + out := new(USBSelector) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *UnpauseOptions) DeepCopyInto(out *UnpauseOptions) { *out = *in @@ -5137,6 +5467,11 @@ func (in *VirtualMachineInstanceStatus) DeepCopyInto(out *VirtualMachineInstance *out = new(CPUTopology) **out = **in } + if in.Memory != nil { + in, out := &in.Memory, &out.Memory + *out = new(MemoryStatus) + (*in).DeepCopyInto(*out) + } return } @@ -5168,32 +5503,6 @@ func (in *VirtualMachineInstanceTemplateSpec) DeepCopy() *VirtualMachineInstance return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VirtualMachineInterfaceRequest) DeepCopyInto(out *VirtualMachineInterfaceRequest) { - *out = *in - if in.AddInterfaceOptions != nil { - in, out := &in.AddInterfaceOptions, &out.AddInterfaceOptions - *out = new(AddInterfaceOptions) - **out = **in - } - if in.RemoveInterfaceOptions != nil { - in, out := &in.RemoveInterfaceOptions, &out.RemoveInterfaceOptions - *out = new(RemoveInterfaceOptions) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualMachineInterfaceRequest. -func (in *VirtualMachineInterfaceRequest) DeepCopy() *VirtualMachineInterfaceRequest { - if in == nil { - return nil - } - out := new(VirtualMachineInterfaceRequest) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VirtualMachineList) DeepCopyInto(out *VirtualMachineList) { *out = *in @@ -5264,6 +5573,11 @@ func (in *VirtualMachineOptions) DeepCopyInto(out *VirtualMachineOptions) { *out = new(DisableFreePageReporting) **out = **in } + if in.DisableSerialConsoleLog != nil { + in, out := &in.DisableSerialConsoleLog, &out.DisableSerialConsoleLog + *out = new(DisableSerialConsoleLog) + **out = **in + } return } @@ -5293,12 +5607,12 @@ func (in *VirtualMachineSpec) DeepCopyInto(out *VirtualMachineSpec) { if in.Instancetype != nil { in, out := &in.Instancetype, &out.Instancetype *out = new(InstancetypeMatcher) - **out = **in + (*in).DeepCopyInto(*out) } if in.Preference != nil { in, out := &in.Preference, &out.Preference *out = new(PreferenceMatcher) - **out = **in + (*in).DeepCopyInto(*out) } if in.Template != nil { in, out := &in.Template, &out.Template @@ -5427,13 +5741,6 @@ func (in *VirtualMachineStatus) DeepCopyInto(out *VirtualMachineStatus) { *out = new(VirtualMachineMemoryDumpRequest) (*in).DeepCopyInto(*out) } - if in.InterfaceRequests != nil { - in, out := &in.InterfaceRequests, &out.InterfaceRequests - *out = make([]VirtualMachineInterfaceRequest, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } return } diff --git a/vendor/kubevirt.io/api/core/v1/schema.go b/vendor/kubevirt.io/api/core/v1/schema.go index 8c0fde6f..e95038db 100644 --- a/vendor/kubevirt.io/api/core/v1/schema.go +++ b/vendor/kubevirt.io/api/core/v1/schema.go @@ -39,6 +39,15 @@ const ( const HotplugDiskDir = "/var/run/kubevirt/hotplug-disks/" +type DiskErrorPolicy string + +const ( + DiskErrorPolicyStop DiskErrorPolicy = "stop" + DiskErrorPolicyIgnore DiskErrorPolicy = "ignore" + DiskErrorPolicyReport DiskErrorPolicy = "report" + DiskErrorPolicyEnospace DiskErrorPolicy = "enospace" +) + /* ATTENTION: Rerun code generators when comments on structs or fields are modified. */ @@ -237,6 +246,10 @@ type EFI struct { // Defaults to true // +optional SecureBoot *bool `json:"secureBoot,omitempty"` + // If set to true, Persistent will persist the EFI NVRAM across reboots. + // Defaults to false + // +optional + Persistent *bool `json:"persistent,omitempty"` } // If set, the VM will be booted from the defined kernel / initrd. @@ -373,6 +386,21 @@ type Memory struct { // Defaults to the requested memory in the resources section if not specified. // + optional Guest *resource.Quantity `json:"guest,omitempty"` + // MaxGuest allows to specify the maximum amount of memory which is visible inside the Guest OS. + // The delta between MaxGuest and Guest is the amount of memory that can be hot(un)plugged. + MaxGuest *resource.Quantity `json:"maxGuest,omitempty"` +} + +type MemoryStatus struct { + // GuestAtBoot specifies with how much memory the VirtualMachine intiallly booted with. + // +optional + GuestAtBoot *resource.Quantity `json:"guestAtBoot,omitempty"` + // GuestCurrent specifies how much memory is currently available for the VirtualMachine. + // +optional + GuestCurrent *resource.Quantity `json:"guestCurrent,omitempty"` + // GuestRequested specifies how much memory was requested (hotplug) for the VirtualMachine. + // +optional + GuestRequested *resource.Quantity `json:"guestRequested,omitempty"` } // Hugepages allow to use hugepages for the VirtualMachineInstance instead of regular memory. @@ -421,9 +449,14 @@ type Devices struct { // Whether to attach the default graphics device or not. // VNC will not be available if set to false. Defaults to true. AutoattachGraphicsDevice *bool `json:"autoattachGraphicsDevice,omitempty"` - // Whether to attach the default serial console or not. + // Whether to attach the default virtio-serial console or not. // Serial console access will not be available if set to false. Defaults to true. AutoattachSerialConsole *bool `json:"autoattachSerialConsole,omitempty"` + // Whether to log the auto-attached default serial console or not. + // Serial console logs will be collect to a file and then streamed from a named `guest-console-log`. + // Not relevant if autoattachSerialConsole is disabled. + // Defaults to cluster wide setting on VirtualMachineOptions. + LogSerialConsole *bool `json:"logSerialConsole,omitempty"` // Whether to attach the Memory balloon device with default period. // Period can be adjusted in virt-config. // Defaults to true. @@ -450,6 +483,9 @@ type Devices struct { // +optional // +listType=atomic GPUs []GPU `json:"gpus,omitempty"` + // DownwardMetrics creates a virtio serials for exposing the downward metrics to the vmi. + // +optional + DownwardMetrics *DownwardMetrics `json:"downwardMetrics,omitempty"` // Filesystems describes filesystem which is connected to the vmi. // +optional // +listType=atomic @@ -535,6 +571,8 @@ type Filesystem struct { type FilesystemVirtiofs struct{} +type DownwardMetrics struct{} + type GPU struct { // Name of the GPU device as exposed by a device plugin Name string `json:"name"` @@ -606,6 +644,9 @@ type Disk struct { // If specified the disk is made sharable and multiple write from different VMs are permitted // +optional Shareable *bool `json:"shareable,omitempty"` + // If specified, it can change the default error policy (stop) for the disk + // +optional + ErrorPolicy *DiskErrorPolicy `json:"errorPolicy,omitempty"` } // CustomBlockSize represents the desired logical and physical block size for a VM disk. @@ -662,6 +703,13 @@ type SEV struct { // Guest policy flags as defined in AMD SEV API specification. // Note: due to security reasons it is not allowed to enable guest debugging. Therefore NoDebug flag is not exposed to users and is always true. Policy *SEVPolicy `json:"policy,omitempty"` + // If specified, run the attestation process for a vmi. + // +opitonal + Attestation *SEVAttestation `json:"attestation,omitempty"` + // Base64 encoded session blob. + Session string `json:"session,omitempty"` + // Base64 encoded guest owner's Diffie-Hellman key. + DHCert string `json:"dhCert,omitempty"` } type SEVPolicy struct { @@ -671,6 +719,9 @@ type SEVPolicy struct { EncryptedState *bool `json:"encryptedState,omitempty"` } +type SEVAttestation struct { +} + type LunTarget struct { // Bus indicates the type of disk device to emulate. // supported values: virtio, sata, scsi. @@ -1175,6 +1226,10 @@ type Interface struct { // BindingMethod specifies the method which will be used to connect the interface to the guest. // Defaults to Bridge. InterfaceBindingMethod `json:",inline"` + // Binding specifies the binding plugin that will be used to connect the interface to the guest. + // It provides an alternative to InterfaceBindingMethod. + // version: 1alphav1 + Binding *PluginBinding `json:"binding,omitempty"` // List of ports to be forwarded to the virtual machine. Ports []Port `json:"ports,omitempty"` // Interface MAC address. For example: de:ad:00:00:be:af or DE-AD-00-00-BE-AF. @@ -1284,6 +1339,13 @@ type InterfaceMacvtap struct{} // InterfacePasst connects to a given network. type InterfacePasst struct{} +// PluginBinding represents a binding implemented in a plugin. +type PluginBinding struct { + // Name references to the binding name as denined in the kubevirt CR. + // version: 1alphav1 + Name string `json:"name"` +} + // Port represents a port to expose from the virtual machine. // Default protocol TCP. // The port field is mandatory @@ -1308,6 +1370,7 @@ type AccessCredentialSecretSource struct { } type ConfigDriveSSHPublicKeyAccessCredentialPropagation struct{} +type NoCloudSSHPublicKeyAccessCredentialPropagation struct{} // AuthorizedKeysFile represents a path within the guest // that ssh public keys should be propagated to @@ -1345,6 +1408,11 @@ type SSHPublicKeyAccessCredentialPropagationMethod struct { // +optional ConfigDrive *ConfigDriveSSHPublicKeyAccessCredentialPropagation `json:"configDrive,omitempty"` + // NoCloudPropagation means that the ssh public keys are injected + // into the VM using metadata using the noCloud cloud-init provider + // +optional + NoCloud *NoCloudSSHPublicKeyAccessCredentialPropagation `json:"noCloud,omitempty"` + // QemuGuestAgentAccessCredentailPropagation means ssh public keys are // dynamically injected into the vm at runtime via the qemu guest agent. // This feature requires the qemu guest agent to be running within the guest. diff --git a/vendor/kubevirt.io/api/core/v1/schema_swagger_generated.go b/vendor/kubevirt.io/api/core/v1/schema_swagger_generated.go index 3de068bc..b2347398 100644 --- a/vendor/kubevirt.io/api/core/v1/schema_swagger_generated.go +++ b/vendor/kubevirt.io/api/core/v1/schema_swagger_generated.go @@ -123,6 +123,7 @@ func (EFI) SwaggerDoc() map[string]string { return map[string]string{ "": "If set, EFI will be used instead of BIOS.", "secureBoot": "If set, SecureBoot will be enabled and the OVMF roms will be swapped for\nSecureBoot-enabled ones.\nRequires SMM to be enabled.\nDefaults to true\n+optional", + "persistent": "If set to true, Persistent will persist the EFI NVRAM across reboots.\nDefaults to false\n+optional", } } @@ -201,6 +202,15 @@ func (Memory) SwaggerDoc() map[string]string { "": "Memory allows specifying the VirtualMachineInstance memory features.", "hugepages": "Hugepages allow to use hugepages for the VirtualMachineInstance instead of regular memory.\n+optional", "guest": "Guest allows to specifying the amount of memory which is visible inside the Guest OS.\nThe Guest must lie between Requests and Limits from the resources section.\nDefaults to the requested memory in the resources section if not specified.\n+ optional", + "maxGuest": "MaxGuest allows to specify the maximum amount of memory which is visible inside the Guest OS.\nThe delta between MaxGuest and Guest is the amount of memory that can be hot(un)plugged.", + } +} + +func (MemoryStatus) SwaggerDoc() map[string]string { + return map[string]string{ + "guestAtBoot": "GuestAtBoot specifies with how much memory the VirtualMachine intiallly booted with.\n+optional", + "guestCurrent": "GuestCurrent specifies how much memory is currently available for the VirtualMachine.\n+optional", + "guestRequested": "GuestRequested specifies how much memory was requested (hotplug) for the VirtualMachine.\n+optional", } } @@ -236,7 +246,8 @@ func (Devices) SwaggerDoc() map[string]string { "inputs": "Inputs describe input devices", "autoattachPodInterface": "Whether to attach a pod network interface. Defaults to true.", "autoattachGraphicsDevice": "Whether to attach the default graphics device or not.\nVNC will not be available if set to false. Defaults to true.", - "autoattachSerialConsole": "Whether to attach the default serial console or not.\nSerial console access will not be available if set to false. Defaults to true.", + "autoattachSerialConsole": "Whether to attach the default virtio-serial console or not.\nSerial console access will not be available if set to false. Defaults to true.", + "logSerialConsole": "Whether to log the auto-attached default serial console or not.\nSerial console logs will be collect to a file and then streamed from a named `guest-console-log`.\nNot relevant if autoattachSerialConsole is disabled.\nDefaults to cluster wide setting on VirtualMachineOptions.", "autoattachMemBalloon": "Whether to attach the Memory balloon device with default period.\nPeriod can be adjusted in virt-config.\nDefaults to true.\n+optional", "autoattachInputDevice": "Whether to attach an Input Device.\nDefaults to false.\n+optional", "autoattachVSOCK": "Whether to attach the VSOCK CID to the VM or not.\nVSOCK access will be available if set to true. Defaults to false.", @@ -244,6 +255,7 @@ func (Devices) SwaggerDoc() map[string]string { "blockMultiQueue": "Whether or not to enable virtio multi-queue for block devices.\nDefaults to false.\n+optional", "networkInterfaceMultiqueue": "If specified, virtual network interfaces configured with a virtio bus will also enable the vhost multiqueue feature for network devices. The number of queues created depends on additional factors of the VirtualMachineInstance, like the number of guest CPUs.\n+optional", "gpus": "Whether to attach a GPU device to the vmi.\n+optional\n+listType=atomic", + "downwardMetrics": "DownwardMetrics creates a virtio serials for exposing the downward metrics to the vmi.\n+optional", "filesystems": "Filesystems describes filesystem which is connected to the vmi.\n+optional\n+listType=atomic", "hostDevices": "Whether to attach a host device to the vmi.\n+optional\n+listType=atomic", "clientPassthrough": "To configure and access client devices such as redirecting USB\n+optional", @@ -291,6 +303,10 @@ func (FilesystemVirtiofs) SwaggerDoc() map[string]string { return map[string]string{} } +func (DownwardMetrics) SwaggerDoc() map[string]string { + return map[string]string{} +} + func (GPU) SwaggerDoc() map[string]string { return map[string]string{ "name": "Name of the GPU device as exposed by a device plugin", @@ -327,6 +343,7 @@ func (Disk) SwaggerDoc() map[string]string { "tag": "If specified, disk address and its tag will be provided to the guest via config drive metadata\n+optional", "blockSize": "If specified, the virtual disk will be presented with the given block sizes.\n+optional", "shareable": "If specified the disk is made sharable and multiple write from different VMs are permitted\n+optional", + "errorPolicy": "If specified, it can change the default error policy (stop) for the disk\n+optional", } } @@ -367,7 +384,10 @@ func (LaunchSecurity) SwaggerDoc() map[string]string { func (SEV) SwaggerDoc() map[string]string { return map[string]string{ - "policy": "Guest policy flags as defined in AMD SEV API specification.\nNote: due to security reasons it is not allowed to enable guest debugging. Therefore NoDebug flag is not exposed to users and is always true.", + "policy": "Guest policy flags as defined in AMD SEV API specification.\nNote: due to security reasons it is not allowed to enable guest debugging. Therefore NoDebug flag is not exposed to users and is always true.", + "attestation": "If specified, run the attestation process for a vmi.\n+opitonal", + "session": "Base64 encoded session blob.", + "dhCert": "Base64 encoded guest owner's Diffie-Hellman key.", } } @@ -377,6 +397,10 @@ func (SEVPolicy) SwaggerDoc() map[string]string { } } +func (SEVAttestation) SwaggerDoc() map[string]string { + return map[string]string{} +} + func (LunTarget) SwaggerDoc() map[string]string { return map[string]string{ "bus": "Bus indicates the type of disk device to emulate.\nsupported values: virtio, sata, scsi.", @@ -631,6 +655,7 @@ func (Interface) SwaggerDoc() map[string]string { return map[string]string{ "name": "Logical name of the interface as well as a reference to the associated networks.\nMust match the Name of a Network.", "model": "Interface model.\nOne of: e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio.\nDefaults to virtio.", + "binding": "Binding specifies the binding plugin that will be used to connect the interface to the guest.\nIt provides an alternative to InterfaceBindingMethod.\nversion: 1alphav1", "ports": "List of ports to be forwarded to the virtual machine.", "macAddress": "Interface MAC address. For example: de:ad:00:00:be:af or DE-AD-00-00-BE-AF.", "bootOrder": "BootOrder is an integer value > 0, used to determine ordering of boot devices.\nLower values take precedence.\nEach interface or disk that has a boot order must have a unique value.\nInterfaces without a boot order are not tried.\n+optional", @@ -702,6 +727,13 @@ func (InterfacePasst) SwaggerDoc() map[string]string { } } +func (PluginBinding) SwaggerDoc() map[string]string { + return map[string]string{ + "": "PluginBinding represents a binding implemented in a plugin.", + "name": "Name references to the binding name as denined in the kubevirt CR.\nversion: 1alphav1", + } +} + func (Port) SwaggerDoc() map[string]string { return map[string]string{ "": "Port represents a port to expose from the virtual machine.\nDefault protocol TCP.\nThe port field is mandatory", @@ -721,6 +753,10 @@ func (ConfigDriveSSHPublicKeyAccessCredentialPropagation) SwaggerDoc() map[strin return map[string]string{} } +func (NoCloudSSHPublicKeyAccessCredentialPropagation) SwaggerDoc() map[string]string { + return map[string]string{} +} + func (AuthorizedKeysFile) SwaggerDoc() map[string]string { return map[string]string{ "": "AuthorizedKeysFile represents a path within the guest\nthat ssh public keys should be propagated to", @@ -749,6 +785,7 @@ func (SSHPublicKeyAccessCredentialPropagationMethod) SwaggerDoc() map[string]str return map[string]string{ "": "SSHPublicKeyAccessCredentialPropagationMethod represents the method used to\ninject a ssh public key into the vm guest.\nOnly one of its members may be specified.", "configDrive": "ConfigDrivePropagation means that the ssh public keys are injected\ninto the VM using metadata using the configDrive cloud-init provider\n+optional", + "noCloud": "NoCloudPropagation means that the ssh public keys are injected\ninto the VM using metadata using the noCloud cloud-init provider\n+optional", "qemuGuestAgent": "QemuGuestAgentAccessCredentailPropagation means ssh public keys are\ndynamically injected into the vm at runtime via the qemu guest agent.\nThis feature requires the qemu guest agent to be running within the guest.\n+optional", } } diff --git a/vendor/kubevirt.io/api/core/v1/types.go b/vendor/kubevirt.io/api/core/v1/types.go index 14d3580c..926dc994 100644 --- a/vendor/kubevirt.io/api/core/v1/types.go +++ b/vendor/kubevirt.io/api/core/v1/types.go @@ -280,6 +280,10 @@ type VirtualMachineInstanceStatus struct { // Current topology may differ from the desired topology in the spec while CPU hotplug // takes place. CurrentCPUTopology *CPUTopology `json:"currentCPUTopology,omitempty"` + + // Memory shows various informations about the VirtualMachine memory. + // +optional + Memory *MemoryStatus `json:"memory,omitempty"` } // PersistentVolumeClaimInfo contains the relavant information virt-handler needs cached about a PVC @@ -515,12 +519,10 @@ const ( VirtualMachineInstanceReasonNoTSCFrequencyMigratable = "NoTSCFrequencyNotLiveMigratable" // Reason means that VMI is not live migratable because it requested SCSI persitent reservation VirtualMachineInstanceReasonPRNotMigratable = "PersistentReservationNotLiveMigratable" - // Reason means that VMI is not live migratable because it uses dedicated CPU and emulator thread isolation - - VirtualMachineInstanceReasonDedicatedCPU = "DedicatedCPUNotLiveMigratable" - // Indicates that the VMI is in progress of Hot vCPU Plug/UnPlug VirtualMachineInstanceVCPUChange = "HotVCPUChange" + // Indicates that the VMI is hot(un)plugging memory + VirtualMachineInstanceMemoryChange = "HotMemoryChange" ) const ( @@ -927,6 +929,15 @@ const ( // KSMHandlerManagedAnnotation is an annotation used to mark the nodes where the virt-handler has enabled the ksm KSMHandlerManagedAnnotation string = "kubevirt.io/ksm-handler-managed" + // KSM debug annotations to override default constants + KSMPagesBoostOverride string = "kubevirt.io/ksm-pages-boost-override" + KSMPagesDecayOverride string = "kubevirt.io/ksm-pages-decay-override" + KSMPagesMinOverride string = "kubevirt.io/ksm-pages-min-override" + KSMPagesMaxOverride string = "kubevirt.io/ksm-pages-max-override" + KSMPagesInitOverride string = "kubevirt.io/ksm-pages-init-override" + KSMSleepMsBaselineOverride string = "kubevirt.io/ksm-sleep-ms-baseline-override" + KSMFreePercentOverride string = "kubevirt.io/ksm-free-percent-override" + // InstancetypeAnnotation is the name of a VirtualMachineInstancetype InstancetypeAnnotation string = "kubevirt.io/instancetype-name" @@ -971,6 +982,18 @@ const ( // VirtualMachinePodCPULimitsLabel indicates VMI pod CPU resource limits VirtualMachinePodCPULimitsLabel string = "kubevirt.io/vmi-pod-cpu-resource-limits" + // VirtualMachinePodMemoryRequestsLabel indicates VMI pod Memory resource requests + VirtualMachinePodMemoryRequestsLabel string = "kubevirt.io/vmi-pod-memory-resource-requests" + // MemoryHotplugOverheadRatioLabel indicates the guest memory overhead ratio required + // to correctly compute the target pod memory requests when doing memory hotplug. + // The label is used to store this value when memory hotplug is requested as it may change + // between the creation of the target pod and when the evaluation of `MemoryHotplugReadyLabel` + // happens. + MemoryHotplugOverheadRatioLabel string = "kubevirt.io/memory-hotplug-overhead-ratio" + + // AutoMemoryLimitsRatioLabel allows to use a custom ratio for auto memory limits calculation. + // Must be a float >= 1. + AutoMemoryLimitsRatioLabel string = "alpha.kubevirt.io/auto-memory-limits-ratio" ) func NewVMI(name string, uid types.UID) *VirtualMachineInstance { @@ -1535,11 +1558,6 @@ type VirtualMachineStatus struct { // updated through an Update() before ObservedGeneration in Status. // +optional DesiredGeneration int64 `json:"desiredGeneration,omitempty" optional:"true"` - - // InterfaceRequests indicates a list of interfaces added to the VMI template and - // hot-plugged on an active running VMI. - // +listType=atomic - InterfaceRequests []VirtualMachineInterfaceRequest `json:"interfaceRequests,omitempty" optional:"true"` } type VolumeSnapshotStatus struct { @@ -1569,15 +1587,6 @@ type VirtualMachineStateChangeRequest struct { UID *types.UID `json:"uid,omitempty" optional:"true" protobuf:"bytes,5,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"` } -type VirtualMachineInterfaceRequest struct { - // AddInterfaceOptions when set indicates a network interface should be added. - // The details within this field specify how to add the interface - AddInterfaceOptions *AddInterfaceOptions `json:"addInterfaceOptions,omitempty" optional:"true"` - // RemoveInterfaceOptions when set indicates a network interface should be removed. - // The details within this field specify how to remove the interface - RemoveInterfaceOptions *RemoveInterfaceOptions `json:"removeInterfaceOptions,omitempty" optional:"true"` -} - // VirtualMachineCondition represents the state of VirtualMachine type VirtualMachineCondition struct { Type VirtualMachineConditionType `json:"type"` @@ -2263,23 +2272,6 @@ type RemoveVolumeOptions struct { DryRun []string `json:"dryRun,omitempty"` } -// AddInterfaceOptions is provided when dynamically hot plugging a network interface -type AddInterfaceOptions struct { - // NetworkAttachmentDefinitionName references a NetworkAttachmentDefinition CRD object. Format: - // , /. If namespace is not - // specified, VMI namespace is assumed. - NetworkAttachmentDefinitionName string `json:"networkAttachmentDefinitionName"` - - // Name indicates the logical name of the interface. - Name string `json:"name"` -} - -// RemoveInterfaceOptions is provided when dynamically hot unplugging a network interface -type RemoveInterfaceOptions struct { - // Name indicates the logical name of the interface. - Name string `json:"name"` -} - type TokenBucketRateLimiter struct { // QPS indicates the maximum QPS to the apiserver from this client. // If it's zero, the component default will be used @@ -2309,19 +2301,20 @@ type ReloadableComponentConfiguration struct { // KubeVirtConfiguration holds all kubevirt configurations type KubeVirtConfiguration struct { - CPUModel string `json:"cpuModel,omitempty"` - CPURequest *resource.Quantity `json:"cpuRequest,omitempty"` - DeveloperConfiguration *DeveloperConfiguration `json:"developerConfiguration,omitempty"` - EmulatedMachines []string `json:"emulatedMachines,omitempty"` - ImagePullPolicy k8sv1.PullPolicy `json:"imagePullPolicy,omitempty"` - MigrationConfiguration *MigrationConfiguration `json:"migrations,omitempty"` - MachineType string `json:"machineType,omitempty"` - NetworkConfiguration *NetworkConfiguration `json:"network,omitempty"` - OVMFPath string `json:"ovmfPath,omitempty"` - SELinuxLauncherType string `json:"selinuxLauncherType,omitempty"` - DefaultRuntimeClass string `json:"defaultRuntimeClass,omitempty"` - SMBIOSConfig *SMBiosConfiguration `json:"smbios,omitempty"` - ArchitectureConfiguration *ArchConfiguration `json:"architectureConfiguration,omitempty"` + CPUModel string `json:"cpuModel,omitempty"` + CPURequest *resource.Quantity `json:"cpuRequest,omitempty"` + DeveloperConfiguration *DeveloperConfiguration `json:"developerConfiguration,omitempty"` + EmulatedMachines []string `json:"emulatedMachines,omitempty"` + ImagePullPolicy k8sv1.PullPolicy `json:"imagePullPolicy,omitempty"` + MigrationConfiguration *MigrationConfiguration `json:"migrations,omitempty"` + // Deprecated. Use architectureConfiguration instead. + MachineType string `json:"machineType,omitempty"` + NetworkConfiguration *NetworkConfiguration `json:"network,omitempty"` + OVMFPath string `json:"ovmfPath,omitempty"` + SELinuxLauncherType string `json:"selinuxLauncherType,omitempty"` + DefaultRuntimeClass string `json:"defaultRuntimeClass,omitempty"` + SMBIOSConfig *SMBiosConfiguration `json:"smbios,omitempty"` + ArchitectureConfiguration *ArchConfiguration `json:"architectureConfiguration,omitempty"` // EvictionStrategy defines at the cluster level if the VirtualMachineInstance should be // migrated instead of shut-off in case of a node drain. If the VirtualMachineInstance specific // field is set it overrides the cluster level one. @@ -2405,6 +2398,10 @@ const ( VirtioFS SupportContainerType = "virtiofs" // SideCar is the container resources for a side car SideCar SupportContainerType = "sidecar" + // VMExport is the container resources for a vm exporter pod + VMExport SupportContainerType = "vmexport" + // GuestConsoleLog is the container resources for a guest console log streaming container + GuestConsoleLog SupportContainerType = "guest-console-log" ) // SupportContainerResources are used to specify the cpu/memory request and limits for the containers that support various features of Virtual Machines. These containers are usually idle and don't require a lot of memory or cpu. @@ -2449,10 +2446,17 @@ type VirtualMachineOptions struct { // This will have effect only if AutoattachMemBalloon is not false and the vmi is not // requesting any high performance feature (dedicatedCPU/realtime/hugePages), in which free page reporting is always disabled. DisableFreePageReporting *DisableFreePageReporting `json:"disableFreePageReporting,omitempty"` + + // DisableSerialConsoleLog disables logging the auto-attached default serial console. + // If not set, serial console logs will be written to a file and then streamed from a container named `guest-console-log`. + // The value can be individually overridden for each VM, not relevant if AutoattachSerialConsole is disabled. + DisableSerialConsoleLog *DisableSerialConsoleLog `json:"disableSerialConsoleLog,omitempty"` } type DisableFreePageReporting struct{} +type DisableSerialConsoleLog struct{} + // TLSConfiguration holds TLS options type TLSConfiguration struct { // MinTLSVersion is a way to specify the minimum protocol version that is acceptable for TLS connections. @@ -2573,6 +2577,7 @@ type LogVerbosity struct { const ( PCIResourcePrefix = "PCI_RESOURCE" MDevResourcePrefix = "MDEV_PCI_RESOURCE" + USBResourcePrefix = "USB_RESOURCE" ) // PermittedHostDevices holds information about devices allowed for passthrough @@ -2581,6 +2586,24 @@ type PermittedHostDevices struct { PciHostDevices []PciHostDevice `json:"pciHostDevices,omitempty"` // +listType=atomic MediatedDevices []MediatedHostDevice `json:"mediatedDevices,omitempty"` + // +listType=atomic + USB []USBHostDevice `json:"usb,omitempty"` +} + +type USBHostDevice struct { + // Identifies the list of USB host devices. + // e.g: kubevirt.io/storage, kubevirt.io/bootable-usb, etc + ResourceName string `json:"resourceName"` + // +listType=atomic + Selectors []USBSelector `json:"selectors,omitempty"` + // If true, KubeVirt will leave the allocation and monitoring to an + // external device plugin + ExternalResourceProvider bool `json:"externalResourceProvider,omitempty"` +} + +type USBSelector struct { + Vendor string `json:"vendor"` + Product string `json:"product"` } // PciHostDevice represents a host PCI device allowed for passthrough @@ -2589,9 +2612,7 @@ type PciHostDevice struct { PCIVendorSelector string `json:"pciVendorSelector"` // The name of the resource that is representing the device. Exposed by // a device plugin and requested by VMs. Typically of the form - // vendor.com/product_nameThe name of the resource that is representing - // the device. Exposed by a device plugin and requested by VMs. - // Typically of the form vendor.com/product_name + // vendor.com/product_name ResourceName string `json:"resourceName"` // If true, KubeVirt will leave the allocation and monitoring to an // external device plugin @@ -2646,9 +2667,22 @@ type KSMConfiguration struct { // NetworkConfiguration holds network options type NetworkConfiguration struct { - NetworkInterface string `json:"defaultNetworkInterface,omitempty"` - PermitSlirpInterface *bool `json:"permitSlirpInterface,omitempty"` - PermitBridgeInterfaceOnPodNetwork *bool `json:"permitBridgeInterfaceOnPodNetwork,omitempty"` + NetworkInterface string `json:"defaultNetworkInterface,omitempty"` + PermitSlirpInterface *bool `json:"permitSlirpInterface,omitempty"` + PermitBridgeInterfaceOnPodNetwork *bool `json:"permitBridgeInterfaceOnPodNetwork,omitempty"` + Binding map[string]InterfaceBindingPlugin `json:"binding,omitempty"` +} + +type InterfaceBindingPlugin struct { + // SidecarImage references a container image that runs in the virt-launcher pod. + // The sidecar handles (libvirt) domain configuration and optional services. + // version: 1alphav1 + SidecarImage string `json:"sidecarImage,omitempty"` + // NetworkAttachmentDefinition references to a NetworkAttachmentDefinition CR object. + // Format: , /. + // If namespace is not specified, VMI namespace is assumed. + // version: 1alphav1 + NetworkAttachmentDefinition string `json:"networkAttachmentDefinition,omitempty"` } // GuestAgentPing configures the guest-agent based ping probe @@ -2675,6 +2709,13 @@ type Matcher interface { GetRevisionName() string } +type InferFromVolumeFailurePolicy string + +const ( + RejectInferFromVolumeFailure InferFromVolumeFailurePolicy = "Reject" + IgnoreInferFromVolumeFailure InferFromVolumeFailurePolicy = "Ignore" +) + // InstancetypeMatcher references a instancetype that is used to fill fields in the VMI template. type InstancetypeMatcher struct { // Name is the name of the VirtualMachineInstancetype or VirtualMachineClusterInstancetype @@ -2702,6 +2743,13 @@ type InstancetypeMatcher struct { // // +optional InferFromVolume string `json:"inferFromVolume,omitempty"` + + // InferFromVolumeFailurePolicy controls what should happen on failure when inferring the instancetype. + // Allowed values are: "RejectInferFromVolumeFailure" and "IgnoreInferFromVolumeFailure". + // If not specified, "RejectInferFromVolumeFailure" is used by default. + // + // +optional + InferFromVolumeFailurePolicy *InferFromVolumeFailurePolicy `json:"inferFromVolumeFailurePolicy,omitempty"` } func (i InstancetypeMatcher) GetName() string { @@ -2739,6 +2787,13 @@ type PreferenceMatcher struct { // // +optional InferFromVolume string `json:"inferFromVolume,omitempty"` + + // InferFromVolumeFailurePolicy controls what should happen on failure when preference the instancetype. + // Allowed values are: "RejectInferFromVolumeFailure" and "IgnoreInferFromVolumeFailure". + // If not specified, "RejectInferFromVolumeFailure" is used by default. + // + // +optional + InferFromVolumeFailurePolicy *InferFromVolumeFailurePolicy `json:"inferFromVolumeFailurePolicy,omitempty"` } func (p PreferenceMatcher) GetName() string { @@ -2755,14 +2810,83 @@ type LiveUpdateFeatures struct { // Default is specified on cluster level. // Absence of the struct means opt-out from CPU hotplug functionality. CPU *LiveUpdateCPU `json:"cpu,omitempty" optional:"true"` + // Affinity allows live updating the virtual machines node affinity + Affinity *LiveUpdateAffinity `json:"affinity,omitempty" optional:"true"` + // MemoryLiveUpdateConfiguration defines the live update memory features for the VirtualMachine + // +optional + Memory *LiveUpdateMemory `json:"memory,omitempty"` } +type LiveUpdateAffinity struct{} + type LiveUpdateCPU struct { // The maximum amount of sockets that can be hot-plugged to the Virtual Machine MaxSockets *uint32 `json:"maxSockets,omitempty" optional:"true"` } type LiveUpdateConfiguration struct { + // MaxHotplugRatio is the ratio used to define the max amount + // of a hotplug resource that can be made available to a VM + // when the specific Max* setting is not defined (MaxCpuSockets, MaxGuest) + // Example: VM is configured with 512Mi of guest memory, if MaxGuest is not + // defined and MaxHotplugRatio is 2 then MaxGuest = 1Gi + // defaults to 4 + MaxHotplugRatio uint32 `json:"maxHotplugRatio,omitempty"` // MaxCpuSockets holds the maximum amount of sockets that can be hotplugged MaxCpuSockets *uint32 `json:"maxCpuSockets,omitempty"` + // MaxGuest defines the maximum amount memory that can be allocated + // to the guest using hotplug. + MaxGuest *resource.Quantity `json:"maxGuest,omitempty"` +} + +type LiveUpdateMemory struct { + // MaxGuest defines the maximum amount memory that can be allocated for the VM. + // +optional + MaxGuest *resource.Quantity `json:"maxGuest,omitempty"` +} + +// SEVPlatformInfo contains information about the AMD SEV features for the node. +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type SEVPlatformInfo struct { + metav1.TypeMeta `json:",inline"` + // Base64 encoded platform Diffie-Hellman key. + PDH string `json:"pdh,omitempty"` + // Base64 encoded SEV certificate chain. + CertChain string `json:"certChain,omitempty"` +} + +// SEVMeasurementInfo contains information about the guest launch measurement. +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type SEVMeasurementInfo struct { + metav1.TypeMeta `json:",inline"` + // Base64 encoded launch measurement of the SEV guest. + Measurement string `json:"measurement,omitempty"` + // API major version of the SEV host. + APIMajor uint `json:"apiMajor,omitempty"` + // API minor version of the SEV host. + APIMinor uint `json:"apiMinor,omitempty"` + // Build ID of the SEV host. + BuildID uint `json:"buildID,omitempty"` + // Policy of the SEV guest. + Policy uint `json:"policy,omitempty"` + // SHA256 of the loader binary + LoaderSHA string `json:"loaderSHA,omitempty"` +} + +// SEVSessionOptions is used to provide SEV session parameters. +type SEVSessionOptions struct { + // Base64 encoded session blob. + Session string `json:"session,omitempty"` + // Base64 encoded guest owner's Diffie-Hellman key. + DHCert string `json:"dhCert,omitempty"` +} + +// SEVSecretOptions is used to provide a secret for a running guest. +type SEVSecretOptions struct { + // Base64 encoded header needed to decrypt the secret. + Header string `json:"header,omitempty"` + // Base64 encoded encrypted launch secret. + Secret string `json:"secret,omitempty"` } diff --git a/vendor/kubevirt.io/api/core/v1/types_swagger_generated.go b/vendor/kubevirt.io/api/core/v1/types_swagger_generated.go index 047ee237..213228f9 100644 --- a/vendor/kubevirt.io/api/core/v1/types_swagger_generated.go +++ b/vendor/kubevirt.io/api/core/v1/types_swagger_generated.go @@ -80,6 +80,7 @@ func (VirtualMachineInstanceStatus) SwaggerDoc() map[string]string { "selinuxContext": "SELinuxContext is the actual SELinux context of the virt-launcher pod\n+optional", "machine": "Machine shows the final resulting qemu machine type. This can be different\nthan the machine type selected in the spec, due to qemus machine type alias mechanism.\n+optional", "currentCPUTopology": "CurrentCPUTopology specifies the current CPU topology used by the VM workload.\nCurrent topology may differ from the desired topology in the spec while CPU hotplug\ntakes place.", + "memory": "Memory shows various informations about the VirtualMachine memory.\n+optional", } } @@ -358,7 +359,6 @@ func (VirtualMachineStatus) SwaggerDoc() map[string]string { "memoryDumpRequest": "MemoryDumpRequest tracks memory dump request phase and info of getting a memory\ndump to the given pvc\n+nullable\n+optional", "observedGeneration": "ObservedGeneration is the generation observed by the vmi when started.\n+optional", "desiredGeneration": "DesiredGeneration is the generation which is desired for the VMI.\nThis will be used in comparisons with ObservedGeneration to understand when\nthe VMI is out of sync. This will be changed at the same time as\nObservedGeneration to remove errors which could occur if Generation is\nupdated through an Update() before ObservedGeneration in Status.\n+optional", - "interfaceRequests": "InterfaceRequests indicates a list of interfaces added to the VMI template and\nhot-plugged on an active running VMI.\n+listType=atomic", } } @@ -385,13 +385,6 @@ func (VirtualMachineStateChangeRequest) SwaggerDoc() map[string]string { } } -func (VirtualMachineInterfaceRequest) SwaggerDoc() map[string]string { - return map[string]string{ - "addInterfaceOptions": "AddInterfaceOptions when set indicates a network interface should be added.\nThe details within this field specify how to add the interface", - "removeInterfaceOptions": "RemoveInterfaceOptions when set indicates a network interface should be removed.\nThe details within this field specify how to remove the interface", - } -} - func (VirtualMachineCondition) SwaggerDoc() map[string]string { return map[string]string{ "": "VirtualMachineCondition represents the state of VirtualMachine", @@ -671,21 +664,6 @@ func (RemoveVolumeOptions) SwaggerDoc() map[string]string { } } -func (AddInterfaceOptions) SwaggerDoc() map[string]string { - return map[string]string{ - "": "AddInterfaceOptions is provided when dynamically hot plugging a network interface", - "networkAttachmentDefinitionName": "NetworkAttachmentDefinitionName references a NetworkAttachmentDefinition CRD object. Format:\n, /. If namespace is not\nspecified, VMI namespace is assumed.", - "name": "Name indicates the logical name of the interface.", - } -} - -func (RemoveInterfaceOptions) SwaggerDoc() map[string]string { - return map[string]string{ - "": "RemoveInterfaceOptions is provided when dynamically hot unplugging a network interface", - "name": "Name indicates the logical name of the interface.", - } -} - func (TokenBucketRateLimiter) SwaggerDoc() map[string]string { return map[string]string{ "qps": "QPS indicates the maximum QPS to the apiserver from this client.\nIf it's zero, the component default will be used", @@ -714,6 +692,7 @@ func (ReloadableComponentConfiguration) SwaggerDoc() map[string]string { func (KubeVirtConfiguration) SwaggerDoc() map[string]string { return map[string]string{ "": "KubeVirtConfiguration holds all kubevirt configurations", + "machineType": "Deprecated. Use architectureConfiguration instead.", "evictionStrategy": "EvictionStrategy defines at the cluster level if the VirtualMachineInstance should be\nmigrated instead of shut-off in case of a node drain. If the VirtualMachineInstance specific\nfield is set it overrides the cluster level one.", "additionalGuestMemoryOverheadRatio": "AdditionalGuestMemoryOverheadRatio can be used to increase the virtualization infrastructure\noverhead. This is useful, since the calculation of this overhead is not accurate and cannot\nbe entirely known in advance. The ratio that is being set determines by which factor to increase\nthe overhead calculated by Kubevirt. A higher ratio means that the VMs would be less compromised\nby node pressures, but would mean that fewer VMs could be scheduled to a node.\nIf not set, the default is 1.", "supportContainerResources": "+listType=map\n+listMapKey=type\nSupportContainerResources specifies the resource requirements for various types of supporting containers such as container disks/virtiofs/sidecars and hotplug attachment pods. If omitted a sensible default will be supplied.", @@ -766,6 +745,7 @@ func (VirtualMachineOptions) SwaggerDoc() map[string]string { return map[string]string{ "": "VirtualMachineOptions holds the cluster level information regarding the virtual machine.", "disableFreePageReporting": "DisableFreePageReporting disable the free page reporting of\nmemory balloon device https://libvirt.org/formatdomain.html#memory-balloon-device.\nThis will have effect only if AutoattachMemBalloon is not false and the vmi is not\nrequesting any high performance feature (dedicatedCPU/realtime/hugePages), in which free page reporting is always disabled.", + "disableSerialConsoleLog": "DisableSerialConsoleLog disables logging the auto-attached default serial console.\nIf not set, serial console logs will be written to a file and then streamed from a container named `guest-console-log`.\nThe value can be individually overridden for each VM, not relevant if AutoattachSerialConsole is disabled.", } } @@ -773,6 +753,10 @@ func (DisableFreePageReporting) SwaggerDoc() map[string]string { return map[string]string{} } +func (DisableSerialConsoleLog) SwaggerDoc() map[string]string { + return map[string]string{} +} + func (TLSConfiguration) SwaggerDoc() map[string]string { return map[string]string{ "": "TLSConfiguration holds TLS options", @@ -831,14 +815,27 @@ func (PermittedHostDevices) SwaggerDoc() map[string]string { "": "PermittedHostDevices holds information about devices allowed for passthrough", "pciHostDevices": "+listType=atomic", "mediatedDevices": "+listType=atomic", + "usb": "+listType=atomic", + } +} + +func (USBHostDevice) SwaggerDoc() map[string]string { + return map[string]string{ + "resourceName": "Identifies the list of USB host devices.\ne.g: kubevirt.io/storage, kubevirt.io/bootable-usb, etc", + "selectors": "+listType=atomic", + "externalResourceProvider": "If true, KubeVirt will leave the allocation and monitoring to an\nexternal device plugin", } } +func (USBSelector) SwaggerDoc() map[string]string { + return map[string]string{} +} + func (PciHostDevice) SwaggerDoc() map[string]string { return map[string]string{ "": "PciHostDevice represents a host PCI device allowed for passthrough", "pciVendorSelector": "The vendor_id:product_id tuple of the PCI device", - "resourceName": "The name of the resource that is representing the device. Exposed by\na device plugin and requested by VMs. Typically of the form\nvendor.com/product_nameThe name of the resource that is representing\nthe device. Exposed by a device plugin and requested by VMs.\nTypically of the form vendor.com/product_name", + "resourceName": "The name of the resource that is representing the device. Exposed by\na device plugin and requested by VMs. Typically of the form\nvendor.com/product_name", "externalResourceProvider": "If true, KubeVirt will leave the allocation and monitoring to an\nexternal device plugin", } } @@ -880,6 +877,13 @@ func (NetworkConfiguration) SwaggerDoc() map[string]string { } } +func (InterfaceBindingPlugin) SwaggerDoc() map[string]string { + return map[string]string{ + "sidecarImage": "SidecarImage references a container image that runs in the virt-launcher pod.\nThe sidecar handles (libvirt) domain configuration and optional services.\nversion: 1alphav1", + "networkAttachmentDefinition": "NetworkAttachmentDefinition references to a NetworkAttachmentDefinition CR object.\nFormat: , /.\nIf namespace is not specified, VMI namespace is assumed.\nversion: 1alphav1", + } +} + func (GuestAgentPing) SwaggerDoc() map[string]string { return map[string]string{ "": "GuestAgentPing configures the guest-agent based ping probe", @@ -900,30 +904,38 @@ func (ClusterProfilerRequest) SwaggerDoc() map[string]string { func (InstancetypeMatcher) SwaggerDoc() map[string]string { return map[string]string{ - "": "InstancetypeMatcher references a instancetype that is used to fill fields in the VMI template.", - "name": "Name is the name of the VirtualMachineInstancetype or VirtualMachineClusterInstancetype\n\n+optional", - "kind": "Kind specifies which instancetype resource is referenced.\nAllowed values are: \"VirtualMachineInstancetype\" and \"VirtualMachineClusterInstancetype\".\nIf not specified, \"VirtualMachineClusterInstancetype\" is used by default.\n\n+optional", - "revisionName": "RevisionName specifies a ControllerRevision containing a specific copy of the\nVirtualMachineInstancetype or VirtualMachineClusterInstancetype to be used. This is initially\ncaptured the first time the instancetype is applied to the VirtualMachineInstance.\n\n+optional", - "inferFromVolume": "InferFromVolume lists the name of a volume that should be used to infer or discover the instancetype\nto be used through known annotations on the underlying resource. Once applied to the InstancetypeMatcher\nthis field is removed.\n\n+optional", + "": "InstancetypeMatcher references a instancetype that is used to fill fields in the VMI template.", + "name": "Name is the name of the VirtualMachineInstancetype or VirtualMachineClusterInstancetype\n\n+optional", + "kind": "Kind specifies which instancetype resource is referenced.\nAllowed values are: \"VirtualMachineInstancetype\" and \"VirtualMachineClusterInstancetype\".\nIf not specified, \"VirtualMachineClusterInstancetype\" is used by default.\n\n+optional", + "revisionName": "RevisionName specifies a ControllerRevision containing a specific copy of the\nVirtualMachineInstancetype or VirtualMachineClusterInstancetype to be used. This is initially\ncaptured the first time the instancetype is applied to the VirtualMachineInstance.\n\n+optional", + "inferFromVolume": "InferFromVolume lists the name of a volume that should be used to infer or discover the instancetype\nto be used through known annotations on the underlying resource. Once applied to the InstancetypeMatcher\nthis field is removed.\n\n+optional", + "inferFromVolumeFailurePolicy": "InferFromVolumeFailurePolicy controls what should happen on failure when inferring the instancetype.\nAllowed values are: \"RejectInferFromVolumeFailure\" and \"IgnoreInferFromVolumeFailure\".\nIf not specified, \"RejectInferFromVolumeFailure\" is used by default.\n\n+optional", } } func (PreferenceMatcher) SwaggerDoc() map[string]string { return map[string]string{ - "": "PreferenceMatcher references a set of preference that is used to fill fields in the VMI template.", - "name": "Name is the name of the VirtualMachinePreference or VirtualMachineClusterPreference\n\n+optional", - "kind": "Kind specifies which preference resource is referenced.\nAllowed values are: \"VirtualMachinePreference\" and \"VirtualMachineClusterPreference\".\nIf not specified, \"VirtualMachineClusterPreference\" is used by default.\n\n+optional", - "revisionName": "RevisionName specifies a ControllerRevision containing a specific copy of the\nVirtualMachinePreference or VirtualMachineClusterPreference to be used. This is\ninitially captured the first time the instancetype is applied to the VirtualMachineInstance.\n\n+optional", - "inferFromVolume": "InferFromVolume lists the name of a volume that should be used to infer or discover the preference\nto be used through known annotations on the underlying resource. Once applied to the PreferenceMatcher\nthis field is removed.\n\n+optional", + "": "PreferenceMatcher references a set of preference that is used to fill fields in the VMI template.", + "name": "Name is the name of the VirtualMachinePreference or VirtualMachineClusterPreference\n\n+optional", + "kind": "Kind specifies which preference resource is referenced.\nAllowed values are: \"VirtualMachinePreference\" and \"VirtualMachineClusterPreference\".\nIf not specified, \"VirtualMachineClusterPreference\" is used by default.\n\n+optional", + "revisionName": "RevisionName specifies a ControllerRevision containing a specific copy of the\nVirtualMachinePreference or VirtualMachineClusterPreference to be used. This is\ninitially captured the first time the instancetype is applied to the VirtualMachineInstance.\n\n+optional", + "inferFromVolume": "InferFromVolume lists the name of a volume that should be used to infer or discover the preference\nto be used through known annotations on the underlying resource. Once applied to the PreferenceMatcher\nthis field is removed.\n\n+optional", + "inferFromVolumeFailurePolicy": "InferFromVolumeFailurePolicy controls what should happen on failure when preference the instancetype.\nAllowed values are: \"RejectInferFromVolumeFailure\" and \"IgnoreInferFromVolumeFailure\".\nIf not specified, \"RejectInferFromVolumeFailure\" is used by default.\n\n+optional", } } func (LiveUpdateFeatures) SwaggerDoc() map[string]string { return map[string]string{ - "cpu": "LiveUpdateCPU holds hotplug configuration for the CPU resource.\nEmpty struct indicates that default will be used for maxSockets.\nDefault is specified on cluster level.\nAbsence of the struct means opt-out from CPU hotplug functionality.", + "cpu": "LiveUpdateCPU holds hotplug configuration for the CPU resource.\nEmpty struct indicates that default will be used for maxSockets.\nDefault is specified on cluster level.\nAbsence of the struct means opt-out from CPU hotplug functionality.", + "affinity": "Affinity allows live updating the virtual machines node affinity", + "memory": "MemoryLiveUpdateConfiguration defines the live update memory features for the VirtualMachine\n+optional", } } +func (LiveUpdateAffinity) SwaggerDoc() map[string]string { + return map[string]string{} +} + func (LiveUpdateCPU) SwaggerDoc() map[string]string { return map[string]string{ "maxSockets": "The maximum amount of sockets that can be hot-plugged to the Virtual Machine", @@ -932,6 +944,50 @@ func (LiveUpdateCPU) SwaggerDoc() map[string]string { func (LiveUpdateConfiguration) SwaggerDoc() map[string]string { return map[string]string{ - "maxCpuSockets": "MaxCpuSockets holds the maximum amount of sockets that can be hotplugged", + "maxHotplugRatio": "MaxHotplugRatio is the ratio used to define the max amount\nof a hotplug resource that can be made available to a VM\nwhen the specific Max* setting is not defined (MaxCpuSockets, MaxGuest)\nExample: VM is configured with 512Mi of guest memory, if MaxGuest is not\ndefined and MaxHotplugRatio is 2 then MaxGuest = 1Gi\ndefaults to 4", + "maxCpuSockets": "MaxCpuSockets holds the maximum amount of sockets that can be hotplugged", + "maxGuest": "MaxGuest defines the maximum amount memory that can be allocated\nto the guest using hotplug.", + } +} + +func (LiveUpdateMemory) SwaggerDoc() map[string]string { + return map[string]string{ + "maxGuest": "MaxGuest defines the maximum amount memory that can be allocated for the VM.\n+optional", + } +} + +func (SEVPlatformInfo) SwaggerDoc() map[string]string { + return map[string]string{ + "": "SEVPlatformInfo contains information about the AMD SEV features for the node.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + "pdh": "Base64 encoded platform Diffie-Hellman key.", + "certChain": "Base64 encoded SEV certificate chain.", + } +} + +func (SEVMeasurementInfo) SwaggerDoc() map[string]string { + return map[string]string{ + "": "SEVMeasurementInfo contains information about the guest launch measurement.\n\n+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object", + "measurement": "Base64 encoded launch measurement of the SEV guest.", + "apiMajor": "API major version of the SEV host.", + "apiMinor": "API minor version of the SEV host.", + "buildID": "Build ID of the SEV host.", + "policy": "Policy of the SEV guest.", + "loaderSHA": "SHA256 of the loader binary", + } +} + +func (SEVSessionOptions) SwaggerDoc() map[string]string { + return map[string]string{ + "": "SEVSessionOptions is used to provide SEV session parameters.", + "session": "Base64 encoded session blob.", + "dhCert": "Base64 encoded guest owner's Diffie-Hellman key.", + } +} + +func (SEVSecretOptions) SwaggerDoc() map[string]string { + return map[string]string{ + "": "SEVSecretOptions is used to provide a secret for a running guest.", + "header": "Base64 encoded header needed to decrypt the secret.", + "secret": "Base64 encoded encrypted launch secret.", } } diff --git a/vendor/kubevirt.io/api/instancetype/register.go b/vendor/kubevirt.io/api/instancetype/register.go index a4784e9f..d4eafd31 100644 --- a/vendor/kubevirt.io/api/instancetype/register.go +++ b/vendor/kubevirt.io/api/instancetype/register.go @@ -42,3 +42,11 @@ const ( DefaultPreferenceLabel = "instancetype.kubevirt.io/default-preference" DefaultPreferenceKindLabel = "instancetype.kubevirt.io/default-preference-kind" ) + +const ( + ControllerRevisionObjectGenerationLabel = "instancetype.kubevirt.io/object-generation" + ControllerRevisionObjectKindLabel = "instancetype.kubevirt.io/object-kind" + ControllerRevisionObjectNameLabel = "instancetype.kubevirt.io/object-name" + ControllerRevisionObjectUIDLabel = "instancetype.kubevirt.io/object-uid" + ControllerRevisionObjectVersionLabel = "instancetype.kubevirt.io/object-version" +) diff --git a/vendor/kubevirt.io/api/instancetype/v1alpha1/conversion.go b/vendor/kubevirt.io/api/instancetype/v1alpha1/conversion.go index 9bff08c2..89397b59 100644 --- a/vendor/kubevirt.io/api/instancetype/v1alpha1/conversion.go +++ b/vendor/kubevirt.io/api/instancetype/v1alpha1/conversion.go @@ -63,3 +63,7 @@ func Convert_v1beta1_DevicePreferences_To_v1alpha1_DevicePreferences(in *v1beta1 func Convert_v1beta1_MemoryInstancetype_To_v1alpha1_MemoryInstancetype(in *v1beta1.MemoryInstancetype, out *MemoryInstancetype, s conversion.Scope) error { return autoConvert_v1beta1_MemoryInstancetype_To_v1alpha1_MemoryInstancetype(in, out, s) } + +func Convert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha1_VirtualMachineInstancetypeSpec(in *v1beta1.VirtualMachineInstancetypeSpec, out *VirtualMachineInstancetypeSpec, s conversion.Scope) error { + return autoConvert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha1_VirtualMachineInstancetypeSpec(in, out, s) +} diff --git a/vendor/kubevirt.io/api/instancetype/v1alpha1/conversion_generated.go b/vendor/kubevirt.io/api/instancetype/v1alpha1/conversion_generated.go index fc9f1f65..d4bd5b88 100644 --- a/vendor/kubevirt.io/api/instancetype/v1alpha1/conversion_generated.go +++ b/vendor/kubevirt.io/api/instancetype/v1alpha1/conversion_generated.go @@ -158,11 +158,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachineInstancetypeSpec)(nil), (*VirtualMachineInstancetypeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha1_VirtualMachineInstancetypeSpec(a.(*v1beta1.VirtualMachineInstancetypeSpec), b.(*VirtualMachineInstancetypeSpec), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*VirtualMachineInstancetypeSpec)(nil), (*v1beta1.VirtualMachineInstancetypeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha1_VirtualMachineInstancetypeSpec_To_v1beta1_VirtualMachineInstancetypeSpec(a.(*VirtualMachineInstancetypeSpec), b.(*v1beta1.VirtualMachineInstancetypeSpec), scope) }); err != nil { @@ -213,6 +208,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*v1beta1.VirtualMachineInstancetypeSpec)(nil), (*VirtualMachineInstancetypeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha1_VirtualMachineInstancetypeSpec(a.(*v1beta1.VirtualMachineInstancetypeSpec), b.(*VirtualMachineInstancetypeSpec), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*v1beta1.VirtualMachinePreferenceSpec)(nil), (*VirtualMachinePreferenceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_VirtualMachinePreferenceSpec_To_v1alpha1_VirtualMachinePreferenceSpec(a.(*v1beta1.VirtualMachinePreferenceSpec), b.(*VirtualMachinePreferenceSpec), scope) }); err != nil { @@ -655,6 +655,8 @@ func Convert_v1alpha1_VirtualMachineInstancetypeList_To_v1beta1_VirtualMachineIn } func autoConvert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha1_VirtualMachineInstancetypeSpec(in *v1beta1.VirtualMachineInstancetypeSpec, out *VirtualMachineInstancetypeSpec, s conversion.Scope) error { + // WARNING: in.NodeSelector requires manual conversion: does not exist in peer-type + // WARNING: in.SchedulerName requires manual conversion: does not exist in peer-type if err := Convert_v1beta1_CPUInstancetype_To_v1alpha1_CPUInstancetype(&in.CPU, &out.CPU, s); err != nil { return err } @@ -665,14 +667,10 @@ func autoConvert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha1_VirtualMachi out.HostDevices = *(*[]corev1.HostDevice)(unsafe.Pointer(&in.HostDevices)) out.IOThreadsPolicy = (*corev1.IOThreadsPolicy)(unsafe.Pointer(in.IOThreadsPolicy)) out.LaunchSecurity = (*corev1.LaunchSecurity)(unsafe.Pointer(in.LaunchSecurity)) + // WARNING: in.Annotations requires manual conversion: does not exist in peer-type return nil } -// Convert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha1_VirtualMachineInstancetypeSpec is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha1_VirtualMachineInstancetypeSpec(in *v1beta1.VirtualMachineInstancetypeSpec, out *VirtualMachineInstancetypeSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha1_VirtualMachineInstancetypeSpec(in, out, s) -} - func autoConvert_v1alpha1_VirtualMachineInstancetypeSpec_To_v1beta1_VirtualMachineInstancetypeSpec(in *VirtualMachineInstancetypeSpec, out *v1beta1.VirtualMachineInstancetypeSpec, s conversion.Scope) error { if err := Convert_v1alpha1_CPUInstancetype_To_v1beta1_CPUInstancetype(&in.CPU, &out.CPU, s); err != nil { return err @@ -787,6 +785,8 @@ func autoConvert_v1beta1_VirtualMachinePreferenceSpec_To_v1alpha1_VirtualMachine // WARNING: in.PreferredSubdomain requires manual conversion: does not exist in peer-type // WARNING: in.PreferredTerminationGracePeriodSeconds requires manual conversion: does not exist in peer-type // WARNING: in.Requirements requires manual conversion: does not exist in peer-type + // WARNING: in.Annotations requires manual conversion: does not exist in peer-type + // WARNING: in.PreferSpreadSocketToCoreRatio requires manual conversion: does not exist in peer-type return nil } diff --git a/vendor/kubevirt.io/api/instancetype/v1alpha2/conversion.go b/vendor/kubevirt.io/api/instancetype/v1alpha2/conversion.go index fc190656..7702fa55 100644 --- a/vendor/kubevirt.io/api/instancetype/v1alpha2/conversion.go +++ b/vendor/kubevirt.io/api/instancetype/v1alpha2/conversion.go @@ -63,3 +63,7 @@ func Convert_v1beta1_DevicePreferences_To_v1alpha2_DevicePreferences(in *v1beta1 func Convert_v1beta1_MemoryInstancetype_To_v1alpha2_MemoryInstancetype(in *v1beta1.MemoryInstancetype, out *MemoryInstancetype, s conversion.Scope) error { return autoConvert_v1beta1_MemoryInstancetype_To_v1alpha2_MemoryInstancetype(in, out, s) } + +func Convert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha2_VirtualMachineInstancetypeSpec(in *v1beta1.VirtualMachineInstancetypeSpec, out *VirtualMachineInstancetypeSpec, s conversion.Scope) error { + return autoConvert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha2_VirtualMachineInstancetypeSpec(in, out, s) +} diff --git a/vendor/kubevirt.io/api/instancetype/v1alpha2/conversion_generated.go b/vendor/kubevirt.io/api/instancetype/v1alpha2/conversion_generated.go index c26e4b86..2b733082 100644 --- a/vendor/kubevirt.io/api/instancetype/v1alpha2/conversion_generated.go +++ b/vendor/kubevirt.io/api/instancetype/v1alpha2/conversion_generated.go @@ -158,11 +158,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1beta1.VirtualMachineInstancetypeSpec)(nil), (*VirtualMachineInstancetypeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha2_VirtualMachineInstancetypeSpec(a.(*v1beta1.VirtualMachineInstancetypeSpec), b.(*VirtualMachineInstancetypeSpec), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*VirtualMachineInstancetypeSpec)(nil), (*v1beta1.VirtualMachineInstancetypeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha2_VirtualMachineInstancetypeSpec_To_v1beta1_VirtualMachineInstancetypeSpec(a.(*VirtualMachineInstancetypeSpec), b.(*v1beta1.VirtualMachineInstancetypeSpec), scope) }); err != nil { @@ -223,6 +218,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*v1beta1.VirtualMachineInstancetypeSpec)(nil), (*VirtualMachineInstancetypeSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha2_VirtualMachineInstancetypeSpec(a.(*v1beta1.VirtualMachineInstancetypeSpec), b.(*VirtualMachineInstancetypeSpec), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*v1beta1.VirtualMachinePreferenceSpec)(nil), (*VirtualMachinePreferenceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_VirtualMachinePreferenceSpec_To_v1alpha2_VirtualMachinePreferenceSpec(a.(*v1beta1.VirtualMachinePreferenceSpec), b.(*VirtualMachinePreferenceSpec), scope) }); err != nil { @@ -665,6 +665,8 @@ func Convert_v1alpha2_VirtualMachineInstancetypeList_To_v1beta1_VirtualMachineIn } func autoConvert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha2_VirtualMachineInstancetypeSpec(in *v1beta1.VirtualMachineInstancetypeSpec, out *VirtualMachineInstancetypeSpec, s conversion.Scope) error { + // WARNING: in.NodeSelector requires manual conversion: does not exist in peer-type + // WARNING: in.SchedulerName requires manual conversion: does not exist in peer-type if err := Convert_v1beta1_CPUInstancetype_To_v1alpha2_CPUInstancetype(&in.CPU, &out.CPU, s); err != nil { return err } @@ -675,14 +677,10 @@ func autoConvert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha2_VirtualMachi out.HostDevices = *(*[]corev1.HostDevice)(unsafe.Pointer(&in.HostDevices)) out.IOThreadsPolicy = (*corev1.IOThreadsPolicy)(unsafe.Pointer(in.IOThreadsPolicy)) out.LaunchSecurity = (*corev1.LaunchSecurity)(unsafe.Pointer(in.LaunchSecurity)) + // WARNING: in.Annotations requires manual conversion: does not exist in peer-type return nil } -// Convert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha2_VirtualMachineInstancetypeSpec is an autogenerated conversion function. -func Convert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha2_VirtualMachineInstancetypeSpec(in *v1beta1.VirtualMachineInstancetypeSpec, out *VirtualMachineInstancetypeSpec, s conversion.Scope) error { - return autoConvert_v1beta1_VirtualMachineInstancetypeSpec_To_v1alpha2_VirtualMachineInstancetypeSpec(in, out, s) -} - func autoConvert_v1alpha2_VirtualMachineInstancetypeSpec_To_v1beta1_VirtualMachineInstancetypeSpec(in *VirtualMachineInstancetypeSpec, out *v1beta1.VirtualMachineInstancetypeSpec, s conversion.Scope) error { if err := Convert_v1alpha2_CPUInstancetype_To_v1beta1_CPUInstancetype(&in.CPU, &out.CPU, s); err != nil { return err @@ -797,6 +795,8 @@ func autoConvert_v1beta1_VirtualMachinePreferenceSpec_To_v1alpha2_VirtualMachine // WARNING: in.PreferredSubdomain requires manual conversion: does not exist in peer-type // WARNING: in.PreferredTerminationGracePeriodSeconds requires manual conversion: does not exist in peer-type // WARNING: in.Requirements requires manual conversion: does not exist in peer-type + // WARNING: in.Annotations requires manual conversion: does not exist in peer-type + // WARNING: in.PreferSpreadSocketToCoreRatio requires manual conversion: does not exist in peer-type return nil } diff --git a/vendor/kubevirt.io/api/instancetype/v1alpha2/types.go b/vendor/kubevirt.io/api/instancetype/v1alpha2/types.go index 163a8abe..2072bb55 100644 --- a/vendor/kubevirt.io/api/instancetype/v1alpha2/types.go +++ b/vendor/kubevirt.io/api/instancetype/v1alpha2/types.go @@ -111,7 +111,7 @@ type CPUInstancetype struct { // Required number of vCPUs to expose to the guest. // - // The resulting CPU topology being derived from the optional PreferredCPUTopology attribute of CPUPreferences that itself defaults to PreferCores. + // The resulting CPU topology being derived from the optional PreferredCPUTopology attribute of CPUPreferences that itself defaults to PreferSockets. Guest uint32 `json:"guest"` // Model specifies the CPU model inside the VMI. diff --git a/vendor/kubevirt.io/api/instancetype/v1alpha2/types_swagger_generated.go b/vendor/kubevirt.io/api/instancetype/v1alpha2/types_swagger_generated.go index fdd7b9a7..fc9bfa6e 100644 --- a/vendor/kubevirt.io/api/instancetype/v1alpha2/types_swagger_generated.go +++ b/vendor/kubevirt.io/api/instancetype/v1alpha2/types_swagger_generated.go @@ -43,7 +43,7 @@ func (VirtualMachineInstancetypeSpec) SwaggerDoc() map[string]string { func (CPUInstancetype) SwaggerDoc() map[string]string { return map[string]string{ "": "CPUInstancetype contains the CPU related configuration of a given VirtualMachineInstancetypeSpec.\n\nGuest is a required attribute and defines the number of vCPUs to be exposed to the guest by the instancetype.", - "guest": "Required number of vCPUs to expose to the guest.\n\nThe resulting CPU topology being derived from the optional PreferredCPUTopology attribute of CPUPreferences that itself defaults to PreferCores.", + "guest": "Required number of vCPUs to expose to the guest.\n\nThe resulting CPU topology being derived from the optional PreferredCPUTopology attribute of CPUPreferences that itself defaults to PreferSockets.", "model": "Model specifies the CPU model inside the VMI.\nList of available models https://github.com/libvirt/libvirt/tree/master/src/cpu_map.\nIt is possible to specify special cases like \"host-passthrough\" to get the same CPU as the node\nand \"host-model\" to get CPU closest to the node one.\nDefaults to host-model.\n+optional", "dedicatedCPUPlacement": "DedicatedCPUPlacement requests the scheduler to place the VirtualMachineInstance on a node\nwith enough dedicated pCPUs and pin the vCPUs to it.\n+optional", "numa": "NUMA allows specifying settings for the guest NUMA topology\n+optional", diff --git a/vendor/kubevirt.io/api/instancetype/v1beta1/deepcopy_generated.go b/vendor/kubevirt.io/api/instancetype/v1beta1/deepcopy_generated.go index 89783e13..2583e5ac 100644 --- a/vendor/kubevirt.io/api/instancetype/v1beta1/deepcopy_generated.go +++ b/vendor/kubevirt.io/api/instancetype/v1beta1/deepcopy_generated.go @@ -572,6 +572,13 @@ func (in *VirtualMachineInstancetypeList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VirtualMachineInstancetypeSpec) DeepCopyInto(out *VirtualMachineInstancetypeSpec) { *out = *in + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } in.CPU.DeepCopyInto(&out.CPU) in.Memory.DeepCopyInto(&out.Memory) if in.GPUs != nil { @@ -596,6 +603,13 @@ func (in *VirtualMachineInstancetypeSpec) DeepCopyInto(out *VirtualMachineInstan *out = new(v1.LaunchSecurity) (*in).DeepCopyInto(*out) } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } return } @@ -722,6 +736,13 @@ func (in *VirtualMachinePreferenceSpec) DeepCopyInto(out *VirtualMachinePreferen *out = new(PreferenceRequirements) (*in).DeepCopyInto(*out) } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } return } diff --git a/vendor/kubevirt.io/api/instancetype/v1beta1/types.go b/vendor/kubevirt.io/api/instancetype/v1beta1/types.go index f51492f9..6aeff79e 100644 --- a/vendor/kubevirt.io/api/instancetype/v1beta1/types.go +++ b/vendor/kubevirt.io/api/instancetype/v1beta1/types.go @@ -74,6 +74,20 @@ type VirtualMachineClusterInstancetypeList struct { // // CPU and Memory are required attributes with both requiring that their Guest attribute is defined, ensuring a number of vCPUs and amount of RAM is always provided by each instancetype. type VirtualMachineInstancetypeSpec struct { + // NodeSelector is a selector which must be true for the vmi to fit on a node. + // Selector which must match a node's labels for the vmi to be scheduled on that node. + // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + // + // NodeSelector is the name of the custom node selector for the instancetype. + // +optional + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + + // If specified, the VMI will be dispatched by specified scheduler. + // If not specified, the VMI will be dispatched by default scheduler. + // + // SchedulerName is the name of the custom K8s scheduler for the instancetype. + // +optional + SchedulerName string `json:"schedulerName,omitempty"` // Required CPU related attributes of the instancetype. CPU CPUInstancetype `json:"cpu"` @@ -102,6 +116,11 @@ type VirtualMachineInstancetypeSpec struct { // // +optional LaunchSecurity *v1.LaunchSecurity `json:"launchSecurity,omitempty"` + + // Optionally defines the required Annotations to be used by the instance type and applied to the VirtualMachineInstance + // + // +optional + Annotations map[string]string `json:"annotations,omitempty"` } // CPUInstancetype contains the CPU related configuration of a given VirtualMachineInstancetypeSpec. @@ -111,7 +130,7 @@ type CPUInstancetype struct { // Required number of vCPUs to expose to the guest. // - // The resulting CPU topology being derived from the optional PreferredCPUTopology attribute of CPUPreferences that itself defaults to PreferCores. + // The resulting CPU topology being derived from the optional PreferredCPUTopology attribute of CPUPreferences that itself defaults to PreferSockets. Guest uint32 `json:"guest"` // Model specifies the CPU model inside the VMI. @@ -260,6 +279,16 @@ type VirtualMachinePreferenceSpec struct { // //+optional Requirements *PreferenceRequirements `json:"requirements,omitempty"` + + // Optionally defines preferred Annotations to be applied to the VirtualMachineInstance + // + //+optional + Annotations map[string]string `json:"annotations,omitempty"` + + // PreferSpreadSocketToCoreRatio defines the ratio to spread vCPUs between cores and sockets, it defaults to 2. + // + //+optional + PreferSpreadSocketToCoreRatio uint32 `json:"preferSpreadSocketToCoreRatio,omitempty"` } type VolumePreferences struct { @@ -283,6 +312,14 @@ const ( // Prefer vCPUs to be exposed as threads to the guest PreferThreads PreferredCPUTopology = "preferThreads" + + // Prefer vCPUs to be spread evenly between cores and sockets with any remaining vCPUs being presented as cores + PreferSpread PreferredCPUTopology = "preferSpread" + + // Prefer vCPUs to be spread according to VirtualMachineInstanceTemplateSpec + // + // If used with VirtualMachineInstanceType it will use sockets as default + PreferAny PreferredCPUTopology = "preferAny" ) // CPUPreferences contains various optional CPU preferences. diff --git a/vendor/kubevirt.io/api/instancetype/v1beta1/types_swagger_generated.go b/vendor/kubevirt.io/api/instancetype/v1beta1/types_swagger_generated.go index d4856861..60921770 100644 --- a/vendor/kubevirt.io/api/instancetype/v1beta1/types_swagger_generated.go +++ b/vendor/kubevirt.io/api/instancetype/v1beta1/types_swagger_generated.go @@ -31,19 +31,22 @@ func (VirtualMachineClusterInstancetypeList) SwaggerDoc() map[string]string { func (VirtualMachineInstancetypeSpec) SwaggerDoc() map[string]string { return map[string]string{ "": "VirtualMachineInstancetypeSpec is a description of the VirtualMachineInstancetype or VirtualMachineClusterInstancetype.\n\nCPU and Memory are required attributes with both requiring that their Guest attribute is defined, ensuring a number of vCPUs and amount of RAM is always provided by each instancetype.", + "nodeSelector": "NodeSelector is a selector which must be true for the vmi to fit on a node.\nSelector which must match a node's labels for the vmi to be scheduled on that node.\nMore info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/\n\nNodeSelector is the name of the custom node selector for the instancetype.\n+optional", + "schedulerName": "If specified, the VMI will be dispatched by specified scheduler.\nIf not specified, the VMI will be dispatched by default scheduler.\n\nSchedulerName is the name of the custom K8s scheduler for the instancetype.\n+optional", "cpu": "Required CPU related attributes of the instancetype.", "memory": "Required Memory related attributes of the instancetype.", "gpus": "Optionally defines any GPU devices associated with the instancetype.\n\n+optional\n+listType=atomic", "hostDevices": "Optionally defines any HostDevices associated with the instancetype.\n\n+optional\n+listType=atomic", "ioThreadsPolicy": "Optionally defines the IOThreadsPolicy to be used by the instancetype.\n\n+optional", "launchSecurity": "Optionally defines the LaunchSecurity to be used by the instancetype.\n\n+optional", + "annotations": "Optionally defines the required Annotations to be used by the instance type and applied to the VirtualMachineInstance\n\n+optional", } } func (CPUInstancetype) SwaggerDoc() map[string]string { return map[string]string{ "": "CPUInstancetype contains the CPU related configuration of a given VirtualMachineInstancetypeSpec.\n\nGuest is a required attribute and defines the number of vCPUs to be exposed to the guest by the instancetype.", - "guest": "Required number of vCPUs to expose to the guest.\n\nThe resulting CPU topology being derived from the optional PreferredCPUTopology attribute of CPUPreferences that itself defaults to PreferCores.", + "guest": "Required number of vCPUs to expose to the guest.\n\nThe resulting CPU topology being derived from the optional PreferredCPUTopology attribute of CPUPreferences that itself defaults to PreferSockets.", "model": "Model specifies the CPU model inside the VMI.\nList of available models https://github.com/libvirt/libvirt/tree/master/src/cpu_map.\nIt is possible to specify special cases like \"host-passthrough\" to get the same CPU as the node\nand \"host-model\" to get CPU closest to the node one.\nDefaults to host-model.\n+optional", "dedicatedCPUPlacement": "DedicatedCPUPlacement requests the scheduler to place the VirtualMachineInstance on a node\nwith enough dedicated pCPUs and pin the vCPUs to it.\n+optional", "numa": "NUMA allows specifying settings for the guest NUMA topology\n+optional", @@ -102,6 +105,8 @@ func (VirtualMachinePreferenceSpec) SwaggerDoc() map[string]string { "preferredSubdomain": "Subdomain of the VirtualMachineInstance\n\n+optional", "preferredTerminationGracePeriodSeconds": "Grace period observed after signalling a VirtualMachineInstance to stop after which the VirtualMachineInstance is force terminated.\n\n+optional", "requirements": "Requirements defines the minium amount of instance type defined resources required by a set of preferences\n\n+optional", + "annotations": "Optionally defines preferred Annotations to be applied to the VirtualMachineInstance\n\n+optional", + "preferSpreadSocketToCoreRatio": "PreferSpreadSocketToCoreRatio defines the ratio to spread vCPUs between cores and sockets, it defaults to 2.\n\n+optional", } } diff --git a/vendor/modules.txt b/vendor/modules.txt index 83ceca6b..2b1acf81 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -734,7 +734,7 @@ k8s.io/utils/internal/third_party/forked/golang/net k8s.io/utils/net k8s.io/utils/pointer k8s.io/utils/strings/slices -# kubevirt.io/api v1.0.0 +# kubevirt.io/api v1.1.0 ## explicit; go 1.17 kubevirt.io/api/clone kubevirt.io/api/clone/v1alpha1