v1

package
v0.0.0-...-1217209 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package v1 contains API Schema definitions for the kvm v1 API group +kubebuilder:ac:generate=true +kubebuilder:ac:output:package=../../applyconfigurations +kubebuilder:object:generate=true +groupName=kvm.cloud.sap

Index

Constants

View Source
const (
	// ConditionTypeMigration is the type of condition for migration status of a server
	ConditionTypeMigration = "MigratingInstance"

	// ConditionTypePreflight is a condition for preflight checks, e.g. OS Hypervisor validation
	ConditionTypePreflight = "PreflightChecksSucceeded"

	// ConditionTypeHypervisorReEnabled is the type of condition for hypervisor re-enabled status
	ConditionTypeHypervisorReEnabled = "HypervisorReEnabled"

	// ConditionTypeHypervisorDisabled is the type of condition for hypervisor disabled status
	ConditionTypeHypervisorDisabled = "HypervisorDisabled"

	// ConditionTypeEvicting is the type of condition for eviction status
	ConditionTypeEvicting = "Evicting"
)

Eviction Condition Types type of condition in CamelCase or in foo.example.com/CamelCase.

View Source
const (
	// ConditionReasonRunning means the eviction is currently running
	ConditionReasonRunning string = "Running"

	// ConditionReasonFailed means the eviction has failed
	ConditionReasonFailed string = "Failed"

	// ConditionReasonSucceeded means the eviction has succeeded
	ConditionReasonSucceeded string = "Succeeded"
)

Condition Reasons

View Source
const (
	// ConditionTypeOnboarding is the type of condition for onboarding status
	ConditionTypeOnboarding = "Onboarding"

	// ConditionTypeReady is the type of condition for ready status of a hypervisor
	ConditionTypeReady = "Ready"

	// ConditionTypeTerminating is the type of condition for terminating status of a hypervisor
	ConditionTypeTerminating = "Terminating"

	// ConditionTypeTainted is the type of condition for tainted status of a hypervisor
	ConditionTypeTainted = "Tainted"

	// ConditionTypeTraitsUpdated is the type of condition for traits updated status of a hypervisor
	ConditionTypeTraitsUpdated = "TraitsUpdated"

	// ConditionTypeAggregatesUpdated is the type of condition for aggregates updated status of a hypervisor
	ConditionTypeAggregatesUpdated = "AggregatesUpdated"
)

Hypervisor Condition Types type of condition in CamelCase or in foo.example.com/CamelCase.

View Source
const (
	// ConditionTypeReady reasons
	ConditionReasonReadyReady       = "Ready"
	ConditionReasonReadyMaintenance = "Maintenance"
	ConditionReasonReadyEvicted     = "Evicted"

	// ConditionTypeOnboarding reasons
	ConditionReasonInitial    = "Initial"
	ConditionReasonOnboarding = "Onboarding"
	ConditionReasonTesting    = "Testing"
	ConditionReasonAborted    = "Aborted"
)

Condition Reasons The value should be a CamelCase string.

View Source
const (
	// HypervisorMaintenance "enum"
	MaintenanceUnset       = ""
	MaintenanceManual      = "manual"      // manual maintenance mode by external user
	MaintenanceAuto        = "auto"        // automatic maintenance mode
	MaintenanceHA          = "ha"          // high availability maintenance mode
	MaintenanceTermination = "termination" // internal use only, when node is terminating state
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "kvm.cloud.sap", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme

	// Workaround: https://github.com/kubernetes-sigs/controller-tools/issues/1193
	SchemeGroupVersion = GroupVersion
)

Functions

This section is empty.

Types

type Capabilities

type Capabilities struct {
	// +kubebuilder:default:=unknown
	// The hosts CPU architecture (not the guests).
	HostCpuArch string `json:"cpuArch,omitempty"`
	// Total host memory available as a sum of memory over all numa cells.
	HostMemory resource.Quantity `json:"memory,omitempty"`
	// Total host cpus available as a sum of cpus over all numa cells.
	HostCpus resource.Quantity `json:"cpus,omitempty"`
}

Capabilities of the hypervisor as reported by libvirt.

func (*Capabilities) DeepCopy

func (in *Capabilities) DeepCopy() *Capabilities

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Capabilities.

func (*Capabilities) DeepCopyInto

func (in *Capabilities) DeepCopyInto(out *Capabilities)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Cell

type Cell struct {
	// Cell ID.
	CellID uint64 `json:"cellID"`

	// Auto-discovered resource allocation of all hosted VMs in this cell.
	// +kubebuilder:validation:Optional
	Allocation map[string]resource.Quantity `json:"allocation"`

	// Auto-discovered capacity of this cell.
	// +kubebuilder:validation:Optional
	Capacity map[string]resource.Quantity `json:"capacity"`
}

Cell represents a NUMA cell on the hypervisor.

func (*Cell) DeepCopy

func (in *Cell) DeepCopy() *Cell

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cell.

func (*Cell) DeepCopyInto

func (in *Cell) DeepCopyInto(out *Cell)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DomainCapabilities

type DomainCapabilities struct {
	// The available domain cpu architecture.
	// +kubebuilder:default:=unknown
	Arch string `json:"arch,omitempty"`

	// The supported type of virtualization for domains, such as "ch".
	// +kubebuilder:default:=unknown
	HypervisorType string `json:"hypervisorType,omitempty"`

	// Supported devices for domains.
	//
	// The format of this list is the device type, and if specified, a specific
	// model. For example, the take the following xml domain device definition:
	//
	// <video supported='yes'>
	//   <enum name='modelType'>
	//     <value>nvidia</value>
	//   </enum>
	// </video>
	//
	// The corresponding entries in this list would be "video" and "video/nvidia".
	//
	// +kubebuilder:default:={}
	SupportedDevices []string `json:"supportedDevices,omitempty"`

	// Supported cpu modes for domains.
	//
	// The format of this list is cpu mode, and if specified, a specific
	// submode. For example, the take the following xml domain cpu definition:
	//
	// <mode name='host-passthrough' supported='yes'>
	//   <enum name='hostPassthroughMigratable'/>
	// </mode>
	//
	// The corresponding entries in this list would be "host-passthrough" and
	// "host-passthrough/migratable".
	//
	// +kubebuilder:default:={}
	SupportedCpuModes []string `json:"supportedCpuModes,omitempty"`

	// Supported features for domains, such as "sev" or "sgx".
	//
	// This is a flat list of supported features, meaning the following xml:
	//
	// <features>
	//   <sev supported='no'/>
	//   <sgx supported='no'/>
	// </features>
	//
	// Would correspond to the entries "sev" and "sgx" in this list.
	//
	// +kubebuilder:default:={}
	SupportedFeatures []string `json:"supportedFeatures,omitempty"`
}

Domain capabilities of the hypervisor as reported by libvirt. These details are relevant to check if a VM can be scheduled on the hypervisor.

func (*DomainCapabilities) DeepCopy

func (in *DomainCapabilities) DeepCopy() *DomainCapabilities

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DomainCapabilities.

func (*DomainCapabilities) DeepCopyInto

func (in *DomainCapabilities) DeepCopyInto(out *DomainCapabilities)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Eviction

type Eviction struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   EvictionSpec   `json:"spec,omitempty"`
	Status EvictionStatus `json:"status,omitempty"`
}

Eviction is the Schema for the evictions API

func (*Eviction) DeepCopy

func (in *Eviction) DeepCopy() *Eviction

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Eviction.

func (*Eviction) DeepCopyInto

func (in *Eviction) DeepCopyInto(out *Eviction)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Eviction) DeepCopyObject

func (in *Eviction) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type EvictionList

type EvictionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Eviction `json:"items"`
}

EvictionList contains a list of Eviction

func (*EvictionList) DeepCopy

func (in *EvictionList) DeepCopy() *EvictionList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EvictionList.

func (*EvictionList) DeepCopyInto

func (in *EvictionList) DeepCopyInto(out *EvictionList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*EvictionList) DeepCopyObject

func (in *EvictionList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type EvictionSpec

type EvictionSpec struct {

	// Name of hypervisor to evict
	Hypervisor string `json:"hypervisor"`

	// Reason for eviction, always required
	Reason string `json:"reason"`
}

EvictionSpec defines the desired state of Eviction

func (*EvictionSpec) DeepCopy

func (in *EvictionSpec) DeepCopy() *EvictionSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EvictionSpec.

func (*EvictionSpec) DeepCopyInto

func (in *EvictionSpec) DeepCopyInto(out *EvictionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EvictionStatus

type EvictionStatus struct {
	// +kubebuilder:validation:Optional
	HypervisorServiceId string `json:"hypervisorServiceId"`
	// +kubebuilder:validation:Optional
	// +kubebuilder:default=0
	OutstandingRamMb int64 `json:"outstandingRamMb"`
	// +kubebuilder:validation:Optional
	OutstandingInstances []string `json:"outstandingInstances"`

	// Conditions is an array of current conditions
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

EvictionStatus defines the observed state of Eviction

func (*EvictionStatus) DeepCopy

func (in *EvictionStatus) DeepCopy() *EvictionStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EvictionStatus.

func (*EvictionStatus) DeepCopyInto

func (in *EvictionStatus) DeepCopyInto(out *EvictionStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HyperVisorUpdateStatus

type HyperVisorUpdateStatus struct {
	// +kubebuilder:default:=false
	// Represents a running Operating System update.
	InProgress bool `json:"inProgress"`

	// +kubebuilder:default:=unknown
	// Represents the Operating System installed update version.
	Installed string `json:"installed,omitempty"`

	// +kubebuilder:default:=3
	// Represents the number of retries.
	Retry int `json:"retry"`
}

func (*HyperVisorUpdateStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HyperVisorUpdateStatus.

func (*HyperVisorUpdateStatus) DeepCopyInto

func (in *HyperVisorUpdateStatus) DeepCopyInto(out *HyperVisorUpdateStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Hypervisor

type Hypervisor struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   HypervisorSpec   `json:"spec,omitempty"`
	Status HypervisorStatus `json:"status,omitempty"`
}

Hypervisor is the Schema for the hypervisors API

func (*Hypervisor) DeepCopy

func (in *Hypervisor) DeepCopy() *Hypervisor

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Hypervisor.

func (*Hypervisor) DeepCopyInto

func (in *Hypervisor) DeepCopyInto(out *Hypervisor)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Hypervisor) DeepCopyObject

func (in *Hypervisor) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type HypervisorList

type HypervisorList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Hypervisor `json:"items"`
}

HypervisorList contains a list of Hypervisor

func (*HypervisorList) DeepCopy

func (in *HypervisorList) DeepCopy() *HypervisorList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HypervisorList.

func (*HypervisorList) DeepCopyInto

func (in *HypervisorList) DeepCopyInto(out *HypervisorList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HypervisorList) DeepCopyObject

func (in *HypervisorList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type HypervisorSpec

type HypervisorSpec struct {
	// +kubebuilder:validation:Optional
	// OperatingSystemVersion represents the desired operating system version.
	OperatingSystemVersion string `json:"version,omitempty"`

	// +kubebuilder:default:=false
	// Reboot request an reboot after successful installation of an upgrade.
	Reboot bool `json:"reboot"`

	// +kubebuilder:default:=true
	// EvacuateOnReboot request an evacuation of all instances before reboot.
	EvacuateOnReboot bool `json:"evacuateOnReboot"`

	// +kubebuilder:default:=true
	// LifecycleEnabled enables the lifecycle management of the hypervisor via hypervisor-operator.
	LifecycleEnabled bool `json:"lifecycleEnabled"`

	// +kubebuilder:default:=false
	// SkipTests skips the tests during the onboarding process.
	SkipTests bool `json:"skipTests"`

	// +kubebuilder:default:={}
	// CustomTraits are used to apply custom traits to the hypervisor.
	CustomTraits []string `json:"customTraits"`

	// +kubebuilder:default:={}
	// Aggregates are used to apply aggregates to the hypervisor.
	Aggregates []string `json:"aggregates"`

	// +kubebuilder:default:={}
	// AllowedProjects defines which openstack projects are allowed to schedule
	// instances on this hypervisor. The values of this list should be project
	// uuids. If left empty, all projects are allowed.
	AllowedProjects []string `json:"allowedProjects"`

	// +kubebuilder:default:=true
	// HighAvailability is used to enable the high availability handling of the hypervisor.
	HighAvailability bool `json:"highAvailability"`

	// +kubebuilder:default:=false
	// Require to issue a certificate from cert-manager for the hypervisor, to be used for
	// secure communication with the libvirt API.
	CreateCertManagerCertificate bool `json:"createCertManagerCertificate"`

	// +kubebuilder:default:=true
	// InstallCertificate is used to enable the installations of the certificates via kvm-node-agent.
	InstallCertificate bool `json:"installCertificate"`

	// +kubebuilder:optional
	// +kubebuilder:validation:Enum:="";manual;auto;ha;termination
	// Maintenance indicates whether the hypervisor is in maintenance mode.
	Maintenance string `json:"maintenance,omitempty"`
}

HypervisorSpec defines the desired state of Hypervisor

func (*HypervisorSpec) DeepCopy

func (in *HypervisorSpec) DeepCopy() *HypervisorSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HypervisorSpec.

func (*HypervisorSpec) DeepCopyInto

func (in *HypervisorSpec) DeepCopyInto(out *HypervisorSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HypervisorStatus

type HypervisorStatus struct {
	// +kubebuilder:default:=unknown
	// Represents the LibVirt version.
	LibVirtVersion string `json:"libVirtVersion,omitempty"`

	// Represents the Operating System status.
	OperatingSystem OperatingSystemStatus `json:"operatingSystem,omitempty"`

	// Represents the Hypervisor update status.
	Update HyperVisorUpdateStatus `json:"updateStatus,omitempty"`

	// Represents the Hypervisor hosted Virtual Machines
	Instances []Instance `json:"instances,omitempty"`

	// Auto-discovered capabilities as reported by libvirt.
	// +kubebuilder:validation:Optional
	Capabilities Capabilities `json:"capabilities"`

	// Auto-discovered domain capabilities relevant to check if a VM
	// can be scheduled on the hypervisor.
	// +kubebuilder:validation:Optional
	DomainCapabilities DomainCapabilities `json:"domainCapabilities"`

	// Auto-discovered resource allocation of all hosted VMs.
	// +kubebuilder:validation:Optional
	Allocation map[string]resource.Quantity `json:"allocation"`

	// Auto-discovered capacity of the hypervisor.
	// +kubebuilder:validation:Optional
	Capacity map[string]resource.Quantity `json:"capacity"`

	// Auto-discovered cells on this hypervisor.
	// +kubebuilder:validation:Optional
	Cells []Cell `json:"cells,omitempty"`

	// +kubebuilder:default:=0
	// Represent the num of instances
	NumInstances int `json:"numInstances"`

	// HypervisorID is the unique identifier of the hypervisor in OpenStack.
	HypervisorID string `json:"hypervisorId,omitempty"`

	// ServiceID is the unique identifier of the compute service in OpenStack.
	ServiceID string `json:"serviceId,omitempty"`

	// Traits are the applied traits of the hypervisor.
	Traits []string `json:"traits,omitempty"`

	// Aggregates are the applied aggregates of the hypervisor.
	Aggregates []string `json:"aggregates,omitempty"`

	// InternalIP is the internal IP address of the hypervisor.
	InternalIP string `json:"internalIp,omitempty"`

	// Evicted indicates whether the hypervisor is evicted. (no instances left with active maintenance mode)
	Evicted bool `json:"evicted,omitempty"`

	// Represents the Hypervisor node conditions.
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`

	SpecHash string `json:"specHash,omitempty"`
}

HypervisorStatus defines the observed state of Hypervisor

func (*HypervisorStatus) DeepCopy

func (in *HypervisorStatus) DeepCopy() *HypervisorStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HypervisorStatus.

func (*HypervisorStatus) DeepCopyInto

func (in *HypervisorStatus) DeepCopyInto(out *HypervisorStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Instance

type Instance struct {
	// Represents the instance ID (uuidv4).
	ID string `json:"id"`

	// Represents the instance name.
	Name string `json:"name"`

	// Represents the instance state.
	Active bool `json:"active"`
}

func (*Instance) DeepCopy

func (in *Instance) DeepCopy() *Instance

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Instance.

func (*Instance) DeepCopyInto

func (in *Instance) DeepCopyInto(out *Instance)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OperatingSystemStatus

type OperatingSystemStatus struct {
	// Represents the Operating System version.
	Version string `json:"version,omitempty"`

	// Identifying a specific variant or edition of the operating system
	VariantID string `json:"variantID,omitempty"`

	// PrettyVersion
	PrettyVersion string `json:"prettyVersion,omitempty"`

	// KernelName
	KernelName string `json:"kernelName,omitempty"`

	// KernelRelease
	KernelRelease string `json:"kernelRelease,omitempty"`

	// KernelVersion
	KernelVersion string `json:"kernelVersion,omitempty"`

	// HardwareVendor
	HardwareVendor string `json:"hardwareVendor,omitempty"`

	// HardwareModel
	HardwareModel string `json:"hardwareModel,omitempty"`

	// HardwareSerial
	HardwareSerial string `json:"hardwareSerial,omitempty"`

	// FirmwareVersion
	FirmwareVersion string `json:"firmwareVersion,omitempty"`

	// FirmwareVendor
	FirmwareVendor string `json:"firmwareVendor,omitempty"`

	// FirmwareDate
	FirmwareDate metav1.Time `json:"firmwareDate,omitempty"`

	// Represents the Garden Linux build commit id
	GardenLinuxCommitID string `json:"gardenLinuxCommitID,omitempty"`

	// Represents the Garden Linux Feature Set
	GardenLinuxFeatures []string `json:"gardenLinuxFeatures,omitempty"`
}

func (*OperatingSystemStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatingSystemStatus.

func (*OperatingSystemStatus) DeepCopyInto

func (in *OperatingSystemStatus) DeepCopyInto(out *OperatingSystemStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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