compute

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package compute is the internal version of the API.

Package compute contains API Schema definitions for the compute internal API group +kubebuilder:object:generate=true +groupName=compute.api.onmetal.de

Index

Constants

View Source
const DefaultIgnitionKey = "ignition.yaml"

DefaultIgnitionKey is the default key for MachineSpec.UserData.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "compute.api.onmetal.de", Version: runtime.APIVersionInternal}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

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

Functions

func Resource

func Resource(resource string) schema.GroupResource

Types

type EFIVar

type EFIVar struct {
	// Name is the name of the EFIVar.
	Name string
	// UUID is the uuid of the EFIVar.
	UUID string
	// Value is the value of the EFIVar.
	Value string
}

EFIVar is a variable to pass to EFI while booting up.

func (*EFIVar) DeepCopy

func (in *EFIVar) DeepCopy() *EFIVar

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

func (*EFIVar) DeepCopyInto

func (in *EFIVar) DeepCopyInto(out *EFIVar)

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

type EmptyDiskVolumeSource added in v0.0.11

type EmptyDiskVolumeSource struct {
	// SizeLimit is the total amount of local storage required for this EmptyDisk volume.
	// The default is nil which means that the limit is undefined.
	SizeLimit *resource.Quantity
}

EmptyDiskVolumeSource is a volume that's offered by the machine pool provider. Usually ephemeral (i.e. deleted when the surrounding entity is deleted), with varying performance characteristics. Potentially not recoverable.

func (*EmptyDiskVolumeSource) DeepCopy added in v0.0.11

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

func (*EmptyDiskVolumeSource) DeepCopyInto added in v0.0.11

func (in *EmptyDiskVolumeSource) DeepCopyInto(out *EmptyDiskVolumeSource)

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

type EphemeralNetworkInterfaceSource

type EphemeralNetworkInterfaceSource struct {
	// NetworkInterfaceTemplate is the template definition of the networking.NetworkInterface.
	NetworkInterfaceTemplate *networking.NetworkInterfaceTemplateSpec
}

EphemeralNetworkInterfaceSource is a definition for an ephemeral (i.e. coupled to the lifetime of the surrounding object) networking.NetworkInterface.

func (*EphemeralNetworkInterfaceSource) DeepCopy

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

func (*EphemeralNetworkInterfaceSource) DeepCopyInto

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

type EphemeralVolumeSource added in v0.0.12

type EphemeralVolumeSource struct {
	// VolumeTemplate is the template definition of the storage.Volume.
	VolumeTemplate *storage.VolumeTemplateSpec
}

EphemeralVolumeSource is a definition for an ephemeral (i.e. coupled to the lifetime of the surrounding object) storage.Volume.

func (*EphemeralVolumeSource) DeepCopy added in v0.0.12

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

func (*EphemeralVolumeSource) DeepCopyInto added in v0.0.12

func (in *EphemeralVolumeSource) DeepCopyInto(out *EphemeralVolumeSource)

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

type Machine

type Machine struct {
	metav1.TypeMeta
	metav1.ObjectMeta

	Spec   MachineSpec
	Status MachineStatus
}

Machine is the Schema for the machines API

func (*Machine) DeepCopy

func (in *Machine) DeepCopy() *Machine

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

func (*Machine) DeepCopyInto

func (in *Machine) DeepCopyInto(out *Machine)

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

func (*Machine) DeepCopyObject

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

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

type MachineClass

type MachineClass struct {
	metav1.TypeMeta
	metav1.ObjectMeta

	// Capabilities describes the resources a machine class can provide.
	Capabilities corev1.ResourceList
}

MachineClass is the Schema for the machineclasses API

func (*MachineClass) DeepCopy

func (in *MachineClass) DeepCopy() *MachineClass

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

func (*MachineClass) DeepCopyInto

func (in *MachineClass) DeepCopyInto(out *MachineClass)

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

func (*MachineClass) DeepCopyObject

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

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

type MachineClassList

type MachineClassList struct {
	metav1.TypeMeta
	metav1.ListMeta
	Items []MachineClass
}

MachineClassList contains a list of MachineClass

func (*MachineClassList) DeepCopy

func (in *MachineClassList) DeepCopy() *MachineClassList

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

func (*MachineClassList) DeepCopyInto

func (in *MachineClassList) DeepCopyInto(out *MachineClassList)

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

func (*MachineClassList) DeepCopyObject

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

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

type MachineCondition

type MachineCondition struct {
	// Type is the type of the condition.
	Type MachineConditionType
	// Status is the status of the condition.
	Status corev1.ConditionStatus
	// Reason is a machine-readable indication of why the condition is in a certain state.
	Reason string
	// Message is a human-readable explanation of why the condition has a certain reason / state.
	Message string
	// ObservedGeneration represents the .metadata.generation that the condition was set based upon.
	ObservedGeneration int64
	// LastTransitionTime is the last time the status of a condition has transitioned from one state to another.
	LastTransitionTime metav1.Time
}

MachineCondition is one of the conditions of a volume.

func (*MachineCondition) DeepCopy

func (in *MachineCondition) DeepCopy() *MachineCondition

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

func (*MachineCondition) DeepCopyInto

func (in *MachineCondition) DeepCopyInto(out *MachineCondition)

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

type MachineConditionType

type MachineConditionType string

MachineConditionType is a type a MachineCondition can have.

const (
	// MachineSynced represents the condition of a machine being synced with its backing resources
	MachineSynced MachineConditionType = "Synced"
)

type MachineList

type MachineList struct {
	metav1.TypeMeta
	metav1.ListMeta
	Items []Machine
}

MachineList contains a list of Machine

func (*MachineList) DeepCopy

func (in *MachineList) DeepCopy() *MachineList

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

func (*MachineList) DeepCopyInto

func (in *MachineList) DeepCopyInto(out *MachineList)

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

func (*MachineList) DeepCopyObject

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

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

type MachinePool

type MachinePool struct {
	metav1.TypeMeta
	metav1.ObjectMeta

	Spec   MachinePoolSpec
	Status MachinePoolStatus
}

MachinePool is the Schema for the machinepools API

func (*MachinePool) DeepCopy

func (in *MachinePool) DeepCopy() *MachinePool

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

func (*MachinePool) DeepCopyInto

func (in *MachinePool) DeepCopyInto(out *MachinePool)

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

func (*MachinePool) DeepCopyObject

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

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

type MachinePoolCondition

type MachinePoolCondition struct {
	// Type is the type of the condition.
	Type MachinePoolConditionType
	// Status is the status of the condition.
	Status corev1.ConditionStatus
	// Reason is a machine-readable indication of why the condition is in a certain state.
	Reason string
	// Message is a human-readable explanation of why the condition has a certain reason / state.
	Message string
	// ObservedGeneration represents the .metadata.generation that the condition was set based upon.
	ObservedGeneration int64
	// LastTransitionTime is the last time the status of a condition has transitioned from one state to another.
	LastTransitionTime metav1.Time
}

MachinePoolCondition is one of the conditions of a volume.

func (*MachinePoolCondition) DeepCopy

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

func (*MachinePoolCondition) DeepCopyInto

func (in *MachinePoolCondition) DeepCopyInto(out *MachinePoolCondition)

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

type MachinePoolConditionType

type MachinePoolConditionType string

MachinePoolConditionType is a type a MachinePoolCondition can have.

type MachinePoolList

type MachinePoolList struct {
	metav1.TypeMeta
	metav1.ListMeta
	Items []MachinePool
}

MachinePoolList contains a list of MachinePool

func (*MachinePoolList) DeepCopy

func (in *MachinePoolList) DeepCopy() *MachinePoolList

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

func (*MachinePoolList) DeepCopyInto

func (in *MachinePoolList) DeepCopyInto(out *MachinePoolList)

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

func (*MachinePoolList) DeepCopyObject

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

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

type MachinePoolSpec

type MachinePoolSpec struct {
	// ProviderID identifies the MachinePool on provider side.
	ProviderID string
	// Taints of the MachinePool. Only Machines who tolerate all the taints
	// will land in the MachinePool.
	Taints []commonv1alpha1.Taint
}

MachinePoolSpec defines the desired state of MachinePool

func (*MachinePoolSpec) DeepCopy

func (in *MachinePoolSpec) DeepCopy() *MachinePoolSpec

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

func (*MachinePoolSpec) DeepCopyInto

func (in *MachinePoolSpec) DeepCopyInto(out *MachinePoolSpec)

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

type MachinePoolState

type MachinePoolState string

MachinePoolState is a state a MachinePool can be in. +enum

const (
	// MachinePoolStateReady marks a MachinePool as ready for accepting a Machine.
	MachinePoolStateReady MachinePoolState = "Ready"
	// MachinePoolStatePending marks a MachinePool as pending readiness.
	MachinePoolStatePending MachinePoolState = "Pending"
	// MachinePoolStateError marks a MachinePool in an error state.
	MachinePoolStateError MachinePoolState = "Error"
	// MachinePoolStateOffline marks a MachinePool as offline.
	MachinePoolStateOffline MachinePoolState = "Offline"
)

type MachinePoolStatus

type MachinePoolStatus struct {
	State                   MachinePoolState
	Conditions              []MachinePoolCondition
	AvailableMachineClasses []corev1.LocalObjectReference
}

MachinePoolStatus defines the observed state of MachinePool

func (*MachinePoolStatus) DeepCopy

func (in *MachinePoolStatus) DeepCopy() *MachinePoolStatus

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

func (*MachinePoolStatus) DeepCopyInto

func (in *MachinePoolStatus) DeepCopyInto(out *MachinePoolStatus)

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

type MachineSpec

type MachineSpec struct {
	// MachineClassRef is a reference to the machine class/flavor of the machine.
	MachineClassRef corev1.LocalObjectReference
	// MachinePoolSelector selects a suitable MachinePoolRef by the given labels.
	MachinePoolSelector map[string]string
	// MachinePoolRef defines machine pool to run the machine in.
	// If empty, a scheduler will figure out an appropriate pool to run the machine in.
	MachinePoolRef *corev1.LocalObjectReference
	// Image is the URL providing the operating system image of the machine.
	Image string
	// ImagePullSecretRef is an optional secret for pulling the image of a machine.
	ImagePullSecretRef *corev1.LocalObjectReference
	// NetworkInterfaces define a list of network interfaces present on the machine
	NetworkInterfaces []NetworkInterface
	// Volumes are volumes attached to this machine.
	Volumes []Volume
	// IgnitionRef is a reference to a config map containing the ignition YAML for the machine to boot up.
	// If key is empty, DefaultIgnitionKey will be used as fallback.
	IgnitionRef *commonv1alpha1.ConfigMapKeySelector
	// EFIVars are variables to pass to EFI while booting up.
	EFIVars []EFIVar
	// Tolerations define tolerations the Machine has. Only MachinePools whose taints
	// covered by Tolerations will be considered to run the Machine.
	Tolerations []commonv1alpha1.Toleration
}

MachineSpec defines the desired state of Machine

func (*MachineSpec) DeepCopy

func (in *MachineSpec) DeepCopy() *MachineSpec

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

func (*MachineSpec) DeepCopyInto

func (in *MachineSpec) DeepCopyInto(out *MachineSpec)

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

type MachineState

type MachineState string

MachineState is the state of a machine. +enum

const (
	// MachineStatePending means the Machine has been accepted by the system, but not yet completely started.
	// This includes time before being bound to a MachinePool, as well as time spent setting up the Machine on that
	// MachinePool.
	MachineStatePending MachineState = "Pending"
	// MachineStateRunning means the machine is running on a MachinePool.
	MachineStateRunning MachineState = "Running"
	// MachineStateShutdown means the machine is shut down.
	MachineStateShutdown MachineState = "Shutdown"
	// MachineStateError means the machine is in an error state.
	MachineStateError MachineState = "Error"
)

type MachineStatus

type MachineStatus struct {
	// State is the state of the machine.
	State MachineState
	// Conditions are the conditions of the machines.
	Conditions []MachineCondition
	// NetworkInterfaces is the list of network interface states for the machine.
	NetworkInterfaces []NetworkInterfaceStatus
	// Volumes is the list of volume states for the machine.
	Volumes []VolumeStatus
}

MachineStatus defines the observed state of Machine

func (*MachineStatus) DeepCopy

func (in *MachineStatus) DeepCopy() *MachineStatus

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

func (*MachineStatus) DeepCopyInto

func (in *MachineStatus) DeepCopyInto(out *MachineStatus)

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

type NetworkInterface

type NetworkInterface struct {
	// Name is the name of the network interface.
	Name string
	// NetworkInterfaceSource is where to obtain the interface from.
	NetworkInterfaceSource
}

NetworkInterface is the definition of a single interface

func (*NetworkInterface) DeepCopy

func (in *NetworkInterface) DeepCopy() *NetworkInterface

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

func (*NetworkInterface) DeepCopyInto

func (in *NetworkInterface) DeepCopyInto(out *NetworkInterface)

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

type NetworkInterfacePhase added in v0.0.12

type NetworkInterfacePhase string

NetworkInterfacePhase represents the binding phase a NetworkInterface can be in.

const (
	// NetworkInterfacePhasePending is used for a NetworkInterface that is not yet bound.
	NetworkInterfacePhasePending NetworkInterfacePhase = "Pending"
	// NetworkInterfacePhaseBound is used for a NetworkInterface that is bound.
	NetworkInterfacePhaseBound NetworkInterfacePhase = "Bound"
)

type NetworkInterfaceSource

type NetworkInterfaceSource struct {
	// NetworkInterfaceRef instructs to use the NetworkInterface at the target reference.
	NetworkInterfaceRef *corev1.LocalObjectReference
	// Ephemeral instructs to create an ephemeral (i.e. coupled to the lifetime of the surrounding object)
	// NetworkInterface to use.
	Ephemeral *EphemeralNetworkInterfaceSource
}

func (*NetworkInterfaceSource) DeepCopy

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

func (*NetworkInterfaceSource) DeepCopyInto

func (in *NetworkInterfaceSource) DeepCopyInto(out *NetworkInterfaceSource)

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

type NetworkInterfaceStatus

type NetworkInterfaceStatus struct {
	// Name is the name of the NetworkInterface to whom the status belongs to.
	Name string
	// Phase is the NetworkInterface binding phase of the NetworkInterface.
	Phase NetworkInterfacePhase
	// IPs are the ips allocated for the network interface.
	IPs []commonv1alpha1.IP
	// VirtualIP is the virtual ip allocated for the network interface.
	VirtualIP *commonv1alpha1.IP
}

NetworkInterfaceStatus reports the status of an NetworkInterfaceSource.

func (*NetworkInterfaceStatus) DeepCopy

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

func (*NetworkInterfaceStatus) DeepCopyInto

func (in *NetworkInterfaceStatus) DeepCopyInto(out *NetworkInterfaceStatus)

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

type Volume

type Volume struct {
	// Name is the name of the Volume
	Name string
	// VolumeSource is the source where the storage for the Volume resides at.
	VolumeSource
}

Volume defines a volume attachment of a machine

func (*Volume) DeepCopy

func (in *Volume) DeepCopy() *Volume

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

func (*Volume) DeepCopyInto

func (in *Volume) DeepCopyInto(out *Volume)

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

type VolumePhase added in v0.0.12

type VolumePhase string

VolumePhase represents the binding phase a Volume can be in.

const (
	// VolumePhasePending is used for a Volume that is not yet bound.
	VolumePhasePending VolumePhase = "Pending"
	// VolumePhaseBound is used for a Volume that is bound.
	VolumePhaseBound VolumePhase = "Bound"
)

type VolumeSource

type VolumeSource struct {
	// VolumeRef instructs the Volume to use the specified Volume for the attachment.
	VolumeRef *corev1.LocalObjectReference
	// EmptyDisk instructs to use a Volume offered by the machine pool provider.
	EmptyDisk *EmptyDiskVolumeSource
	// Ephemeral instructs to create an ephemeral (i.e. coupled to the lifetime of the surrounding object)
	// Volume to use.
	Ephemeral *EphemeralVolumeSource
}

VolumeSource specifies the source to use for a Volume.

func (*VolumeSource) DeepCopy

func (in *VolumeSource) DeepCopy() *VolumeSource

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

func (*VolumeSource) DeepCopyInto

func (in *VolumeSource) DeepCopyInto(out *VolumeSource)

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

type VolumeStatus

type VolumeStatus struct {
	// Name is the name of a volume attachment.
	Name string
	// Phase represents the binding phase of a Volume.
	Phase VolumePhase
	// DeviceID is the disk device ID on the host.
	DeviceID string
}

VolumeStatus is the status of a Volume.

func (*VolumeStatus) DeepCopy

func (in *VolumeStatus) DeepCopy() *VolumeStatus

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

func (*VolumeStatus) DeepCopyInto

func (in *VolumeStatus) DeepCopyInto(out *VolumeStatus)

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

Directories

Path Synopsis
Package v1alpha1 is the v1alpha1 version of the API.
Package v1alpha1 is the v1alpha1 version of the API.

Jump to

Keyboard shortcuts

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