api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const RootDiskName = "root-disk"

RootDiskName is name of the root disk

Variables

This section is empty.

Functions

This section is empty.

Types

type AdditionalVolumeSpec

type AdditionalVolumeSpec struct {
	// Name is the additional volume name
	Name string `json:"name"`
	// DataVolume is an optional specification of an additional data volume.
	// +optional
	DataVolume *cdicorev1alpha1.DataVolumeSpec `json:"dataVolume,omitempty"`
	// VolumeSource is an optional reference to an additional volume source.
	// +optional
	VolumeSource *VolumeSource `json:"volumeSource,omitempty"`
}

AdditionalVolumeSpec represents an additional volume attached to a VM. Only one of its members may be specified.

type Devices

type Devices struct {
	// Disks allows customizing the disks attached to the VM.
	// +optional
	Disks []kubevirtv1.Disk `json:"disks,omitempty"`
	// Rng specifies whether to have a random number generator from host.
	// +optional
	Rng *kubevirtv1.Rng `json:"rng,omitempty"`
	// BlockMultiQueue specifies whether to enable virtio multi-queue for block devices.
	// +optional
	BlockMultiQueue bool `json:"blockMultiQueue,omitempty"`
	// NetworkInterfaceMultiQueue specifies whether virtual network interfaces configured with a virtio bus will also enable the vhost multi-queue feature.
	// +optional
	NetworkInterfaceMultiQueue bool `json:"networkInterfaceMultiqueue,omitempty"`
}

Devices allows to fine-tune devices attached to KubeVirt VM

type KubeVirtProviderSpec

type KubeVirtProviderSpec struct {
	// Region is the VM region name.
	Region string `json:"region"`
	// Zone is the VM zone name.
	Zone string `json:"zone"`
	// Resources specifies the requests and limits for VM resources (CPU and memory).
	Resources kubevirtv1.ResourceRequirements `json:"resources"`
	// Devices is the specification of disks and additional high performance options
	Devices *Devices `json:"devices,omitempty"`
	// RootVolume is the specification for the root volume of the VM.
	RootVolume cdicorev1alpha1.DataVolumeSpec `json:"rootVolume"`
	// AdditionalVolumes is an optional list of additional volumes attached to the VM.
	// +optional
	AdditionalVolumes []AdditionalVolumeSpec `json:"additionalVolumes,omitempty"`
	// SSHKeys is an optional list of SSH public keys added to the VM.
	// +optional
	SSHKeys []string `json:"sshKeys,omitempty"`
	// Networks is an optional list of networks for the VM. If any of the networks is specified as "default"
	// the pod network won't be added, otherwise it will be added as default.
	// +optional
	Networks []NetworkSpec `json:"networks,omitempty"`
	// CPU allows specifying the CPU topology of the VM.
	// +optional
	CPU *kubevirtv1.CPU `json:"cpu,omitempty"`
	// Memory allows specifying the VM memory features such as hugepages and guest memory settings.
	// Each feature might require enabling the appropriate feature gate.
	// +optional
	Memory *kubevirtv1.Memory `json:"memory,omitempty"`
	// DNSPolicy is the DNS policy of the VM pod.
	// Defaults to "ClusterFirst" and valid values are "ClusterFirstWithHostNet", "ClusterFirst", "Default" or "None".
	// +optional
	DNSPolicy corev1.DNSPolicy `json:"dnsPolicy,omitempty"`
	// DNSConfig is the DNS configuration of the VM pod.
	// The parameters specified here will be merged with the DNS configuration generated based on DNSPolicy.
	// +optional
	DNSConfig *corev1.PodDNSConfig `json:"dnsConfig,omitempty"`
	// Tags is an optional map of tags that are added to the VM as labels.
	// +optional
	Tags map[string]string `json:"tags,omitempty"`
}

KubeVirtProviderSpec is the kubevirt provider specification. It contains parameters to be used when creating kubevirt VMs.

type NetworkSpec

type NetworkSpec struct {
	// Name is the name (in the format <name> or <namespace>/<name>) of the network.
	Name string `json:"name"`
	// Default is whether the network is the default or not.
	// +optional
	Default bool `json:"default,omitempty"`
}

NetworkSpec contains information about a network.

type VolumeSource

type VolumeSource struct {
	// PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace.
	// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
	// +optional
	PersistentVolumeClaim *corev1.PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty"`
	// ConfigMapSource represents a reference to a ConfigMap in the same namespace.
	// More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/
	// +optional
	ConfigMap *kubevirtv1.ConfigMapVolumeSource `json:"configMap,omitempty"`
	// SecretVolumeSource represents a reference to a secret data in the same namespace.
	// More info: https://kubernetes.io/docs/concepts/configuration/secret/
	// +optional
	Secret *kubevirtv1.SecretVolumeSource `json:"secret,omitempty"`
}

VolumeSource represents the source of a volume to mount. Only one of its members may be specified.

Jump to

Keyboard shortcuts

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