ovirt

package
v0.9.0-master.0...-3485fdd Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package ovirt contains ovirt-specific structures for installer configuration and management.

Index

Constants

View Source
const Name string = "ovirt"

Name is the name for the ovirt platform.

Variables

This section is empty.

Functions

This section is empty.

Types

type AffinityGroup

type AffinityGroup struct {
	// Name name of the affinity group
	Name string `json:"name"`
	// Priority of the affinity group, needs to be between 1 (lowest) - 5 (highest)
	Priority int `json:"priority"`
	// Description of the affinity group
	// +optional
	Description string `json:"description,omitempty"`
	// Enforcing whether to create a hard affinity rule, default is false
	// +optional
	Enforcing bool `json:"enforcing"`
}

AffinityGroup defines the affinity group that the installer will create

type AutoPinningPolicy

type AutoPinningPolicy string

AutoPinningPolicy defines the policy to automatically set the CPU and NUMA including pinning to the host for the instance. +kubebuilder:validation:Enum=none;resize_and_pin

const (
	// AutoPinningNone - will mean to do nothing, leaving the VM configuration
	// as is.
	AutoPinningNone AutoPinningPolicy = "none"
	// AutoPinningResizeAndPin - will override the CPU and NUMA topology to fit the host,
	// including pinning them to get maximal performance.
	AutoPinningResizeAndPin AutoPinningPolicy = "resize_and_pin"
)

type CPU

type CPU struct {
	// Sockets is the number of sockets for a VM.
	// Total CPUs is (Sockets * Cores)
	Sockets int32 `json:"sockets"`

	// Cores is the number of cores per socket.
	// Total CPUs is (Sockets * Cores)
	Cores int32 `json:"cores"`

	// Threads is the number of CPU threads.
	Threads int32 `json:"threads"`
}

CPU defines the VM cpu, made of (Sockets * Cores).

type Disk

type Disk struct {
	// SizeGB size of the bootable disk in GiB.
	SizeGB int64 `json:"sizeGB"`
}

Disk defines a VM disk

type Hugepages

type Hugepages int32

Hugepages is the size of a VM's hugepages to use in KiBs. The VM will consume its memory from the host using the host hugepages. In order to run the VM, the host should have enough hugepages with the specific size. +kubebuilder:validation:Enum=2048;1048576

const (
	// Hugepages2MB for using 2MB hugepages.
	Hugepages2MB Hugepages = 2048
	// Hugepages1GB for using 1GB hugepages.
	Hugepages1GB Hugepages = 1048576
)

func (Hugepages) String

func (h Hugepages) String() string

type MachinePool

type MachinePool struct {
	// InstanceTypeID defines the VM instance type and overrides
	// the hardware parameters of the created VM, including cpu and memory.
	// If InstanceTypeID is passed, all memory and cpu variables will be ignored.
	InstanceTypeID string `json:"instanceTypeID,omitempty"`

	// CPU defines the VM CPU.
	// +optional
	CPU *CPU `json:"cpu,omitempty"`

	// MemoryMB is the size of a VM's memory in MiBs.
	// +optional
	MemoryMB int32 `json:"memoryMB,omitempty"`

	// OSDisk is the the root disk of the node.
	// +optional
	OSDisk *Disk `json:"osDisk,omitempty"`

	// VMType defines the workload type of the VM.
	// +kubebuilder:validation:Enum="";desktop;server;high_performance
	// +optional
	VMType VMType `json:"vmType,omitempty"`

	// AffinityGroupsNames contains a list of oVirt affinity group names that the newly created machines will join.
	// The affinity groups should exist on the oVirt cluster or created by the OpenShift installer.
	// +optional
	AffinityGroupsNames []string `json:"affinityGroupsNames"`

	// AutoPinningPolicy defines the policy to automatically set the CPU
	// and NUMA including pinning to the host for the instance.
	// When the field is omitted the default will be "none".
	// +optional
	AutoPinningPolicy AutoPinningPolicy `json:"autoPinningPolicy,omitempty"`

	// Hugepages is the size of a VM's hugepages to use in KiBs.
	// +optional
	Hugepages Hugepages `json:"hugepages,omitempty"`

	// Clone makes sure that the disks are cloned from the template and are not linked.
	// Defaults to true for high performance and server VM types, false for desktop types.
	//
	// Note: this option is not documented in the OpenShift documentation. This is intentional as it has sane defaults
	// that shouldn't be changed unless needed for debugging or resolving issues in cooperation with Red Hat support.
	//
	// +optional
	Clone *bool `json:"clone,omitempty"`

	// Sparse indicates that sparse provisioning should be used and disks should be not preallocated.
	// +optional
	Sparse *bool `json:"sparse,omitempty"`

	// Format is the disk format that the disks are in. Can be "cow" or "raw". "raw" disables several features that
	// may be needed, such as incremental backups.
	// +kubebuilder:validation:Enum="";raw;cow
	// +optional
	Format string `json:"format,omitempty"`
}

MachinePool stores the configuration for a machine pool installed on ovirt.

func (*MachinePool) Set

func (p *MachinePool) Set(required *MachinePool)

Set sets the values from `required` to `p`.

type Metadata

type Metadata struct {
	ClusterID      string `json:"cluster_id"`
	RemoveTemplate bool   `json:"remove_template"`
}

Metadata contains ovirt metadata (e.g. for uninstalling the cluster).

type Platform

type Platform struct {
	// The target cluster under which all VMs will run
	ClusterID string `json:"ovirt_cluster_id"`

	// The target storage domain under which all VM disk would be created.
	StorageDomainID string `json:"ovirt_storage_domain_id"`

	// NetworkName is the target network of all the network interfaces of the nodes.
	// When no ovirt_network_name is provided it defaults to `ovirtmgmt` network, which is a default network for every ovirt cluster.
	// +optional
	NetworkName string `json:"ovirt_network_name,omitempty"`

	// VNICProfileID defines the VNIC profile ID to use the the VM network interfaces.
	// When no vnicProfileID is provided it will be set to the profile of the network. If there are multiple
	// profiles for the network, the installer requires you to explicitly set the vnicProfileID.
	// +optional
	VNICProfileID string `json:"vnicProfileID,omitempty"`

	// DeprecatedAPIVIP is an IP which will be served by bootstrap and then pivoted masters, using keepalived
	// Deprecated: Use APIVIPs
	//
	// +kubebuilder:validation:Format=ip
	// +optional
	DeprecatedAPIVIP string `json:"api_vip,omitempty"`

	// APIVIPs contains the VIP(s) which will be served by bootstrap and then
	// pivoted masters, using keepalived. In dual stack clusters it contains an
	// IPv4 and IPv6 address, otherwise only one VIP
	//
	// +kubebuilder:validation:MaxItems=2
	// +kubebuilder:validation:UniqueItems=true
	// +kubebuilder:validation:Format=ip
	// +optional
	APIVIPs []string `json:"api_vips,omitempty"`

	// IngressIP is an external IP which routes to the default ingress controller.
	// The IP is a suitable target of a wildcard DNS record used to resolve default route host names.
	// Deprecated: Use IngressVIPs
	//
	// +kubebuilder:validation:Format=ip
	// +optional
	DeprecatedIngressVIP string `json:"ingress_vip,omitempty"`

	// IngressVIPs are external IP(s) which route to the default ingress
	// controller. The VIPs are suitable targets of wildcard DNS records used to
	// resolve default route host names. In dual stack clusters it contains an
	// IPv4 and IPv6 address, otherwise only one VIP
	//
	// +kubebuilder:validation:MaxItems=2
	// +kubebuilder:validation:UniqueItems=true
	// +kubebuilder:validation:Format=ip
	// +optional
	IngressVIPs []string `json:"ingress_vips,omitempty"`

	// DefaultMachinePlatform is the default configuration used when
	// installing on ovirt for machine pools which do not define their
	// own platform configuration.
	// Default will set the image field to the latest RHCOS image.
	// +optional
	DefaultMachinePlatform *MachinePool `json:"defaultMachinePlatform,omitempty"`

	// AffinityGroups contains the RHV affinity groups that the installer will create.
	// +optional
	AffinityGroups []AffinityGroup `json:"affinityGroups"`

	// LoadBalancer defines how the load balancer used by the cluster is configured.
	// LoadBalancer is available in TechPreview.
	// +optional
	LoadBalancer *configv1.OvirtPlatformLoadBalancer `json:"loadBalancer,omitempty"`
}

Platform stores all the global configuration that all machinesets use.

type VMType

type VMType string

VMType defines the type of the VM, which will change the VM configuration, like including or excluding devices (like excluding sound-card), device configuration (like using multi-queues for vNic), and several other configuration tweaks. This doesn't effect properties like CPU count and amount of memory.

const (
	// VMTypeDesktop set the VM type to desktop. Virtual machines optimized to act
	// as desktop machines do have a sound card, use an image (thin allocation),
	// and are stateless.
	VMTypeDesktop VMType = "desktop"
	// VMTypeServer sets the VM type to server. Virtual machines optimized to act
	// as servers have no sound card, use a cloned disk image, and are not stateless.
	VMTypeServer VMType = "server"
	// VMTypeHighPerformance sets a VM type to high_performance which sets various
	// properties of a VM to optimize for performance, like enabling headless mode,
	// disabling usb, smart-card, and sound devices, enabling host cpu pass-through,
	// multi-queues for vNics and several more items.
	// See https://www.ovirt.org/develop/release-management/features/virt/high-performance-vm.html.
	VMTypeHighPerformance VMType = "high_performance"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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