Skip to content

Commit

Permalink
api update by KubeVirt Prow build 1826539953216032768
Browse files Browse the repository at this point in the history
  • Loading branch information
kubevirt-bot committed Aug 22, 2024
1 parent 9d6ee0e commit 4eb2693
Show file tree
Hide file tree
Showing 9 changed files with 117 additions and 47 deletions.
9 changes: 7 additions & 2 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# See the OWNERS docs at https://go.k8s.io/owners

labels:
- kind/api-change
filters:
# examples:
# pkg/api/types.go
# pkg/api/*/register.go
"\\.go$":
labels:
- kind/api-change
61 changes: 60 additions & 1 deletion core/v1/deepcopy_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions core/v1/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,19 @@ func SetDefaults_Probe(probe *Probe) {
}
}

func SetDefaults_NetworkInterface(obj *VirtualMachineInstance) {
autoAttach := obj.Spec.Domain.Devices.AutoattachPodInterface
if autoAttach != nil && *autoAttach == false {
return
}

// Override only when nothing is specified
if len(obj.Spec.Networks) == 0 {
obj.Spec.Domain.Devices.Interfaces = []Interface{*DefaultBridgeNetworkInterface()}
obj.Spec.Networks = []Network{*DefaultPodNetwork()}
}
}

func DefaultBridgeNetworkInterface() *Interface {
iface := &Interface{
Name: "default",
Expand Down
2 changes: 1 addition & 1 deletion core/v1/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,7 @@ type Interface struct {
// Must match the Name of a Network.
Name string `json:"name"`
// Interface model.
// One of: e1000, e1000e, igb, ne2k_pci, pcnet, rtl8139, virtio.
// One of: e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio.
// Defaults to virtio.
// TODO:(ihar) switch to enums once opengen-api supports them. See: https://github.com/kubernetes/kube-openapi/issues/51
Model string `json:"model,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion core/v1/schema_swagger_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 14 additions & 11 deletions core/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,9 @@ type PersistentVolumeClaimInfo struct {

// Percentage of filesystem's size to be reserved when resizing the PVC
// +optional
FilesystemOverhead *Percent `json:"filesystemOverhead,omitempty"`
FilesystemOverhead *cdiv1.Percent `json:"filesystemOverhead,omitempty"`
}

// Percent is a string that can only be a value between [0,1)
// +kubebuilder:validation:Pattern=`^(0(?:\.\d{1,3})?|1)$`
type Percent string

// VolumeStatus represents information about the status of volumes attached to the VirtualMachineInstance.
type VolumeStatus struct {
// Name is the name of the volume
Expand Down Expand Up @@ -572,9 +568,6 @@ const (

// Summarizes that all the DataVolumes attached to the VMI are Ready or not
VirtualMachineInstanceDataVolumesReady VirtualMachineInstanceConditionType = "DataVolumesReady"

// Indicates whether the VMI is live migratable
VirtualMachineInstanceIsStorageLiveMigratable VirtualMachineInstanceConditionType = "StorageLiveMigratable"
)

// These are valid reasons for VMI conditions.
Expand Down Expand Up @@ -603,9 +596,6 @@ const (
VirtualMachineInstanceReasonNotAllDVsReady = "NotAllDVsReady"
// Reason means that all of the VMI's DVs are bound and not running
VirtualMachineInstanceReasonAllDVsReady = "AllDVsReady"

// Indicates a generic reason that the VMI isn't migratable and more details are spiecified in the condition message.
VirtualMachineInstanceReasonNotMigratable = "NotMigratable"
)

const (
Expand Down Expand Up @@ -3002,6 +2992,13 @@ func (p PreferenceMatcher) GetRevisionName() string {
return p.RevisionName
}

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
Expand All @@ -3017,6 +3014,12 @@ type LiveUpdateConfiguration struct {
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
Expand Down
16 changes: 16 additions & 0 deletions core/v1/types_swagger_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions instancetype/OWNERS

This file was deleted.

26 changes: 5 additions & 21 deletions instancetype/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,39 +312,23 @@ type VolumePreferences struct {
type PreferredCPUTopology string

const (
// Prefer vCPUs to be exposed as cores to the guest
DeprecatedPreferCores PreferredCPUTopology = "preferCores"

// Prefer vCPUs to be exposed as sockets to the guest, this is the default for the PreferredCPUTopology attribute of CPUPreferences.
DeprecatedPreferSockets PreferredCPUTopology = "preferSockets"

// Prefer vCPUs to be exposed as threads to the guest
DeprecatedPreferThreads PreferredCPUTopology = "preferThreads"

// Prefer vCPUs to be spread evenly between cores and sockets with any remaining vCPUs being presented as cores
DeprecatedPreferSpread PreferredCPUTopology = "preferSpread"

// Prefer vCPUs to be spread according to VirtualMachineInstanceTemplateSpec
//
// If used with VirtualMachineInstanceType it will use sockets as default
DeprecatedPreferAny PreferredCPUTopology = "preferAny"

// Prefer vCPUs to be exposed as cores to the guest
Cores PreferredCPUTopology = "cores"
PreferCores PreferredCPUTopology = "preferCores"

// Prefer vCPUs to be exposed as sockets to the guest, this is the default for the PreferredCPUTopology attribute of CPUPreferences.
Sockets PreferredCPUTopology = "sockets"
PreferSockets PreferredCPUTopology = "preferSockets"

// Prefer vCPUs to be exposed as threads to the guest
Threads PreferredCPUTopology = "threads"
PreferThreads PreferredCPUTopology = "preferThreads"

// Prefer vCPUs to be spread evenly between cores and sockets with any remaining vCPUs being presented as cores
Spread PreferredCPUTopology = "spread"
PreferSpread PreferredCPUTopology = "preferSpread"

// Prefer vCPUs to be spread according to VirtualMachineInstanceTemplateSpec
//
// If used with VirtualMachineInstanceType it will use sockets as default
Any PreferredCPUTopology = "any"
PreferAny PreferredCPUTopology = "preferAny"
)

// CPUPreferences contains various optional CPU preferences.
Expand Down

0 comments on commit 4eb2693

Please sign in to comment.