kubevirt

package
v1.62.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2025 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Affinity

type Affinity struct {
	// Deprecated: Use TopologySpreadConstraint instead.
	PodAffinityPreset providerconfig.ConfigVarString `json:"podAffinityPreset,omitempty"`
	// Deprecated: Use TopologySpreadConstraint instead.
	PodAntiAffinityPreset providerconfig.ConfigVarString `json:"podAntiAffinityPreset,omitempty"`
	NodeAffinityPreset    NodeAffinityPreset             `json:"nodeAffinityPreset,omitempty"`
}

Affinity.

type Auth

type Auth struct {
	Kubeconfig providerconfig.ConfigVarString `json:"kubeconfig,omitempty"`
}

Auth.

type Disk

type Disk struct {
	Size              providerconfig.ConfigVarString `json:"size,omitempty"`
	StorageClassName  providerconfig.ConfigVarString `json:"storageClassName,omitempty"`
	StorageAccessType providerconfig.ConfigVarString `json:"storageAccessType,omitempty"`
}

Disk.

type Flavor

type Flavor struct {
	Name    providerconfig.ConfigVarString `json:"name,omitempty"`
	Profile providerconfig.ConfigVarString `json:"profile,omitempty"`
}

Flavor.

type Location

type Location struct {
	Region string `json:"region,omitempty"`
	Zone   string `json:"zone,omitempty"`
}

Location describes the region and zone where the machines are created at and where the deployed resources will reside.

type NodeAffinityPreset

type NodeAffinityPreset struct {
	Type   providerconfig.ConfigVarString   `json:"type,omitempty"`
	Key    providerconfig.ConfigVarString   `json:"key,omitempty"`
	Values []providerconfig.ConfigVarString `json:"values,omitempty"`
}

NodeAffinityPreset.

type PrimaryDisk

type PrimaryDisk struct {
	Disk
	// DataVolumeSecretRef is the name of the secret that will be sent to the CDI data importer pod to read basic auth parameters.
	DataVolumeSecretRef providerconfig.ConfigVarString `json:"dataVolumeSecretRef,omitempty"`
	// ExtraHeaders is a list of strings containing extra headers to include with HTTP transfer requests
	// +optional
	ExtraHeaders []string `json:"extraHeaders,omitempty"`
	// ExtraHeadersSecretRef is a secret that contains a list of strings containing extra headers to include with HTTP transfer requests
	// +optional
	ExtraHeadersSecretRef providerconfig.ConfigVarString `json:"extraHeadersSecretRef,omitempty"`
	// StorageTarget describes which VirtualMachine storage target will be used in the DataVolumeTemplate.
	StorageTarget providerconfig.ConfigVarString `json:"storageTarget,omitempty"`
	// OsImage describes the OS that will be installed on the VirtualMachine.
	OsImage providerconfig.ConfigVarString `json:"osImage,omitempty"`
	// Source describes the VM Disk Image source.
	Source providerconfig.ConfigVarString `json:"source,omitempty"`
	// PullMethod describes the VM Disk Image source optional pull method for registry source. Defaults to 'node'.
	PullMethod providerconfig.ConfigVarString `json:"pullMethod,omitempty"`
}

PrimaryDisk.

type ProviderNetwork

type ProviderNetwork struct {
	Name string `json:"name"`
	VPC  VPC    `json:"vpc"`
}

ProviderNetwork describes the infra cluster network fabric that is being used.

type RawConfig

type RawConfig struct {
	ClusterName               providerconfig.ConfigVarString `json:"clusterName"`
	Auth                      Auth                           `json:"auth,omitempty"`
	VirtualMachine            VirtualMachine                 `json:"virtualMachine,omitempty"`
	Affinity                  Affinity                       `json:"affinity,omitempty"`
	TopologySpreadConstraints []TopologySpreadConstraint     `json:"topologySpreadConstraints"`
}

func GetConfig

func GetConfig(pconfig providerconfig.Config) (*RawConfig, error)

type SecondaryDisks

type SecondaryDisks struct {
	Disk
}

SecondaryDisks.

type Subnet

type Subnet struct {
	Name string `json:"name"`
}

Subnet a smaller, segmented portion of a larger network, like a Virtual Private Cloud (VPC).

type Template

type Template struct {
	// VCPUs is to configure vcpus used by a the virtual machine
	// when using kubevirts cpuAllocationRatio feature this leads to auto assignment of the
	// calculated ratio as resource cpu requests for the pod which launches the virtual machine
	VCPUs VCPUs `json:"vcpus,omitempty"`
	// CPUs is to configure cpu requests and limits directly for the pod which launches the virtual machine
	// and is related to the underlying hardware
	CPUs           providerconfig.ConfigVarString `json:"cpus,omitempty"`
	Memory         providerconfig.ConfigVarString `json:"memory,omitempty"`
	PrimaryDisk    PrimaryDisk                    `json:"primaryDisk,omitempty"`
	SecondaryDisks []SecondaryDisks               `json:"secondaryDisks,omitempty"`
}

Template.

type TopologySpreadConstraint

type TopologySpreadConstraint struct {
	// MaxSkew describes the degree to which VMs may be unevenly distributed.
	MaxSkew providerconfig.ConfigVarString `json:"maxSkew,omitempty"`
	// TopologyKey is the key of infra-node labels.
	TopologyKey providerconfig.ConfigVarString `json:"topologyKey,omitempty"`
	// WhenUnsatisfiable indicates how to deal with a VM if it doesn't satisfy
	// the spread constraint.
	WhenUnsatisfiable providerconfig.ConfigVarString `json:"whenUnsatisfiable,omitempty"`
}

TopologySpreadConstraint describes topology spread constraints for VMs.

type VCPUs

type VCPUs struct {
	Cores int `json:"cores,omitempty"`
}

VCPUs.

type VPC

type VPC struct {
	Name   string  `json:"name"`
	Subnet *Subnet `json:"subnet,omitempty"`
}

VPC is a virtual network dedicated to a single tenant within a KubeVirt, where the resources in the VPC is isolated from any other resources within the KubeVirt infra cluster.

type VirtualMachine

type VirtualMachine struct {
	// Deprecated: use Instancetype/Preference instead.
	Flavor Flavor `json:"flavor,omitempty"`
	// Instancetype is optional.
	Instancetype *kubevirtcorev1.InstancetypeMatcher `json:"instancetype,omitempty"`
	// Preference is optional.
	Preference              *kubevirtcorev1.PreferenceMatcher `json:"preference,omitempty"`
	Template                Template                          `json:"template,omitempty"`
	DNSPolicy               providerconfig.ConfigVarString    `json:"dnsPolicy,omitempty"`
	DNSConfig               *corev1.PodDNSConfig              `json:"dnsConfig,omitempty"`
	Location                *Location                         `json:"location,omitempty"`
	ProviderNetwork         *ProviderNetwork                  `json:"providerNetwork,omitempty"`
	EnableNetworkMultiQueue providerconfig.ConfigVarBool      `json:"enableNetworkMultiQueue,omitempty"`
	EvictionStrategy        string                            `json:"evictionStrategy,omitempty"`
}

VirtualMachine.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL