Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: kubevirt/api
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.3.0
Choose a base ref
...
head repository: kubevirt/api
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.3.1
Choose a head ref
  • 5 commits
  • 6 files changed
  • 1 contributor

Commits on Aug 1, 2024

  1. Copy the full SHA
    4c4d6b6 View commit details

Commits on Aug 2, 2024

  1. Copy the full SHA
    40aea84 View commit details

Commits on Aug 8, 2024

  1. Copy the full SHA
    0d0c046 View commit details

Commits on Aug 21, 2024

  1. Copy the full SHA
    9d6ee0e View commit details

Commits on Aug 22, 2024

  1. Copy the full SHA
    4eb2693 View commit details
Showing with 112 additions and 37 deletions.
  1. +60 −1 core/v1/deepcopy_generated.go
  2. +13 −0 core/v1/defaults.go
  3. +18 −5 core/v1/types.go
  4. +16 −0 core/v1/types_swagger_generated.go
  5. +0 −10 instancetype/OWNERS
  6. +5 −21 instancetype/v1beta1/types.go
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
@@ -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",
23 changes: 18 additions & 5 deletions core/v1/types.go
Original file line number Diff line number Diff line change
@@ -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
@@ -1092,6 +1088,10 @@ const (
// VolumesUpdateMigration indicates that the migration copies and update
// the volumes
VolumesUpdateMigration string = "kubevirt.io/volume-update-migration"

// ImmediateDataVolumeCreation indicates that the data volumes should be created immediately
// Even if the VM is halted
ImmediateDataVolumeCreation string = "kubevirt.io/immediate-data-volume-creation"
)

func NewVMI(name string, uid types.UID) *VirtualMachineInstance {
@@ -2992,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
@@ -3007,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
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
@@ -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.