v1alpha1

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the metal v1alpha1 API group +kubebuilder:object:generate=true +groupName=metal.sidero.dev

Index

Constants

View Source
const (
	// ConditionPowerCycle is used to control the powercycle flow.
	ConditionPowerCycle clusterv1.ConditionType = "PowerCycle"
	// ConditionPXEBooted is used to record the fact that server got PXE booted.
	ConditionPXEBooted clusterv1.ConditionType = "PXEBooted"
)
View Source
const EnvironmentDefault = "default"

EnvironmentDefault is an automatically created Environment.

View Source
const ServerClassAny = "any"

ServerClassAny is an automatically created ServerClass that includes all Servers.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "metal.sidero.dev", Version: "v1alpha1"}

	// 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
)

Functions

func AcceptedServerFilter

func AcceptedServerFilter(s Server) (bool, error)

AcceptedServerFilter matches Servers that have Spec.Accepted set to true.

func NotCordonedServerFilter

func NotCordonedServerFilter(s Server) (bool, error)

NotCordonedServerFilter matches Servers that have Spec.Paused set to false.

func PartialEqual

func PartialEqual(a, b interface{}) bool

Types

type Asset

type Asset struct {
	URL    string `json:"url,omitempty"`
	SHA512 string `json:"sha512,omitempty"`
}

func (*Asset) DeepCopy

func (in *Asset) DeepCopy() *Asset

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

func (*Asset) DeepCopyInto

func (in *Asset) DeepCopyInto(out *Asset)

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

type AssetCondition

type AssetCondition struct {
	Asset  `json:",inline"`
	Status string `json:"status"`
	Type   string `json:"type"`
}

func (*AssetCondition) DeepCopy

func (in *AssetCondition) DeepCopy() *AssetCondition

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

func (*AssetCondition) DeepCopyInto

func (in *AssetCondition) DeepCopyInto(out *AssetCondition)

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

type BMC

type BMC struct {
	// BMC endpoint.
	Endpoint string `json:"endpoint"`
	// BMC port. Defaults to 623.
	// +optional
	Port uint32 `json:"port,omitempty"`
	// BMC user value.
	// +optional
	User string `json:"user,omitempty"`
	// Source for the user value. Cannot be used if User is not empty.
	// +optional
	UserFrom *CredentialSource `json:"userFrom,omitempty"`
	// BMC password value.
	// +optional
	Pass string `json:"pass,omitempty"`
	// Source for the password value. Cannot be used if Pass is not empty.
	// +optional
	PassFrom *CredentialSource `json:"passFrom,omitempty"`
	// BMC Interface Type. Defaults to lanplus.
	// +optional
	Interface string `json:"interface,omitempty"`
}

BMC defines data about how to talk to the node via ipmitool.

func (*BMC) DeepCopy

func (in *BMC) DeepCopy() *BMC

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

func (*BMC) DeepCopyInto

func (in *BMC) DeepCopyInto(out *BMC)

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

type CPUInformation

type CPUInformation struct {
	Manufacturer string `json:"manufacturer,omitempty"`
	Version      string `json:"version,omitempty"`
}

func (*CPUInformation) DeepCopy

func (in *CPUInformation) DeepCopy() *CPUInformation

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

func (*CPUInformation) DeepCopyInto

func (in *CPUInformation) DeepCopyInto(out *CPUInformation)

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

func (*CPUInformation) PartialEqual

func (a *CPUInformation) PartialEqual(b *CPUInformation) bool

type ConfigPatches

type ConfigPatches struct {
	Op    string             `json:"op"`
	Path  string             `json:"path"`
	Value apiextensions.JSON `json:"value,omitempty"`
}

func (*ConfigPatches) DeepCopy

func (in *ConfigPatches) DeepCopy() *ConfigPatches

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

func (*ConfigPatches) DeepCopyInto

func (in *ConfigPatches) DeepCopyInto(out *ConfigPatches)

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

type CredentialSource

type CredentialSource struct {
	SecretKeyRef *SecretKeyRef `json:"secretKeyRef,omitempty"`
}

CredentialSource defines a reference to the credential value.

func (*CredentialSource) DeepCopy

func (in *CredentialSource) DeepCopy() *CredentialSource

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

func (*CredentialSource) DeepCopyInto

func (in *CredentialSource) DeepCopyInto(out *CredentialSource)

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

func (*CredentialSource) Resolve

func (source *CredentialSource) Resolve(ctx context.Context, reader client.Client) (string, error)

Resolve the value using the references.

type Environment

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

	Spec   EnvironmentSpec   `json:"spec,omitempty"`
	Status EnvironmentStatus `json:"status,omitempty"`
}

Environment is the Schema for the environments API.

func (*Environment) DeepCopy

func (in *Environment) DeepCopy() *Environment

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

func (*Environment) DeepCopyInto

func (in *Environment) DeepCopyInto(out *Environment)

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

func (*Environment) DeepCopyObject

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

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

func (*Environment) IsReady

func (env *Environment) IsReady() bool

IsReady returns aggregated Environment readiness.

type EnvironmentList

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

EnvironmentList contains a list of Environment.

func (*EnvironmentList) DeepCopy

func (in *EnvironmentList) DeepCopy() *EnvironmentList

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

func (*EnvironmentList) DeepCopyInto

func (in *EnvironmentList) DeepCopyInto(out *EnvironmentList)

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

func (*EnvironmentList) DeepCopyObject

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

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

type EnvironmentSpec

type EnvironmentSpec struct {
	Kernel Kernel `json:"kernel,omitempty"`
	Initrd Initrd `json:"initrd,omitempty"`
}

EnvironmentSpec defines the desired state of Environment.

func EnvironmentDefaultSpec

func EnvironmentDefaultSpec(talosRelease, apiEndpoint string, apiPort uint16) *EnvironmentSpec

EnvironmentDefaultSpec returns EnvironmentDefault's spec.

func (*EnvironmentSpec) DeepCopy

func (in *EnvironmentSpec) DeepCopy() *EnvironmentSpec

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

func (*EnvironmentSpec) DeepCopyInto

func (in *EnvironmentSpec) DeepCopyInto(out *EnvironmentSpec)

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

type EnvironmentStatus

type EnvironmentStatus struct {
	Conditions []AssetCondition `json:"conditions,omitempty"`
}

EnvironmentStatus defines the observed state of Environment.

func (*EnvironmentStatus) DeepCopy

func (in *EnvironmentStatus) DeepCopy() *EnvironmentStatus

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

func (*EnvironmentStatus) DeepCopyInto

func (in *EnvironmentStatus) DeepCopyInto(out *EnvironmentStatus)

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

type Initrd

type Initrd struct {
	Asset `json:",inline"`
}

func (*Initrd) DeepCopy

func (in *Initrd) DeepCopy() *Initrd

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

func (*Initrd) DeepCopyInto

func (in *Initrd) DeepCopyInto(out *Initrd)

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

type Kernel

type Kernel struct {
	Asset `json:",inline"`

	Args []string `json:"args,omitempty"`
}

func (*Kernel) DeepCopy

func (in *Kernel) DeepCopy() *Kernel

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

func (*Kernel) DeepCopyInto

func (in *Kernel) DeepCopyInto(out *Kernel)

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

type ManagementAPI

type ManagementAPI struct {
	Endpoint string `json:"endpoint"`
}

ManagementAPI defines data about how to talk to the node via simple HTTP API.

func (*ManagementAPI) DeepCopy

func (in *ManagementAPI) DeepCopy() *ManagementAPI

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

func (*ManagementAPI) DeepCopyInto

func (in *ManagementAPI) DeepCopyInto(out *ManagementAPI)

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

type Qualifiers

type Qualifiers struct {
	CPU               []CPUInformation    `json:"cpu,omitempty"`
	SystemInformation []SystemInformation `json:"systemInformation,omitempty"`
	LabelSelectors    []map[string]string `json:"labelSelectors,omitempty"`
}

func (*Qualifiers) DeepCopy

func (in *Qualifiers) DeepCopy() *Qualifiers

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

func (*Qualifiers) DeepCopyInto

func (in *Qualifiers) DeepCopyInto(out *Qualifiers)

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

type SecretKeyRef

type SecretKeyRef struct {
	// Namespace and name of credential secret
	// nb: can't use namespacedname here b/c it doesn't have json tags in the struct :(
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
	// Key to select
	Key string `json:"key"`
}

SecretKeyRef defines a ref to a given key within a secret.

func (*SecretKeyRef) DeepCopy

func (in *SecretKeyRef) DeepCopy() *SecretKeyRef

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

func (*SecretKeyRef) DeepCopyInto

func (in *SecretKeyRef) DeepCopyInto(out *SecretKeyRef)

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

type Server

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

	Spec   ServerSpec   `json:"spec,omitempty"`
	Status ServerStatus `json:"status,omitempty"`
}

Server is the Schema for the servers API.

func FilterServers

func FilterServers(servers []Server, filters ...func(Server) (bool, error)) ([]Server, error)

FilterServers returns the subset of servers that pass all provided filters. In case of error the returned slice will be nil.

func (*Server) DeepCopy

func (in *Server) DeepCopy() *Server

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

func (*Server) DeepCopyInto

func (in *Server) DeepCopyInto(out *Server)

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

func (*Server) DeepCopyObject

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

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

func (*Server) GetConditions

func (s *Server) GetConditions() clusterv1.Conditions

func (*Server) SetConditions

func (s *Server) SetConditions(conditions clusterv1.Conditions)

type ServerClass

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

	Spec   ServerClassSpec   `json:"spec,omitempty"`
	Status ServerClassStatus `json:"status,omitempty"`
}

ServerClass is the Schema for the serverclasses API.

func (*ServerClass) DeepCopy

func (in *ServerClass) DeepCopy() *ServerClass

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

func (*ServerClass) DeepCopyInto

func (in *ServerClass) DeepCopyInto(out *ServerClass)

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

func (*ServerClass) DeepCopyObject

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

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

func (*ServerClass) QualifiersFilter

func (sc *ServerClass) QualifiersFilter() func(Server) (bool, error)

QualifiersFilter returns a ServerFilter that matches servers against the serverclass's qualifiers field.

func (*ServerClass) SelectorFilter

func (sc *ServerClass) SelectorFilter() func(Server) (bool, error)

SelectorFilter returns a ServerFilter that matches servers against the serverclass's selector field.

type ServerClassList

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

ServerClassList contains a list of ServerClass.

func (*ServerClassList) DeepCopy

func (in *ServerClassList) DeepCopy() *ServerClassList

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

func (*ServerClassList) DeepCopyInto

func (in *ServerClassList) DeepCopyInto(out *ServerClassList)

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

func (*ServerClassList) DeepCopyObject

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

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

type ServerClassSpec

type ServerClassSpec struct {
	// Reference to the environment which should be used to provision the servers via this server class.
	// +optional
	EnvironmentRef *corev1.ObjectReference `json:"environmentRef,omitempty"`
	// Qualifiers to match on the server spec.
	//
	// If qualifiers are empty, they match all servers.
	// Server should match both qualifiers and selector conditions to be included into the server class.
	// +optional
	Qualifiers Qualifiers `json:"qualifiers"`
	// Label selector to filter the matching servers based on labels.
	// A label selector is a label query over a set of resources. The result of matchLabels and
	// matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
	// +optional
	Selector metav1.LabelSelector `json:"selector"`
	// Set of config patches to apply to the machine configuration to the servers provisioned via this server class.
	// +optional
	ConfigPatches []ConfigPatches `json:"configPatches,omitempty"`
	// BootFromDiskMethod specifies the method to exit iPXE to force boot from disk.
	//
	// If not set, controller default is used.
	// Valid values: ipxe-exit, http-404, ipxe-sanboot.
	//
	// +optional
	BootFromDiskMethod siderotypes.BootFromDisk `json:"bootFromDiskMethod,omitempty"`
}

ServerClassSpec defines the desired state of ServerClass.

func (*ServerClassSpec) DeepCopy

func (in *ServerClassSpec) DeepCopy() *ServerClassSpec

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

func (*ServerClassSpec) DeepCopyInto

func (in *ServerClassSpec) DeepCopyInto(out *ServerClassSpec)

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

type ServerClassStatus

type ServerClassStatus struct {
	ServersAvailable []string `json:"serversAvailable"`
	ServersInUse     []string `json:"serversInUse"`
}

ServerClassStatus defines the observed state of ServerClass.

func (*ServerClassStatus) DeepCopy

func (in *ServerClassStatus) DeepCopy() *ServerClassStatus

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

func (*ServerClassStatus) DeepCopyInto

func (in *ServerClassStatus) DeepCopyInto(out *ServerClassStatus)

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

type ServerList

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

ServerList contains a list of Server.

func (*ServerList) DeepCopy

func (in *ServerList) DeepCopy() *ServerList

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

func (*ServerList) DeepCopyInto

func (in *ServerList) DeepCopyInto(out *ServerList)

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

func (*ServerList) DeepCopyObject

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

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

type ServerSpec

type ServerSpec struct {
	EnvironmentRef    *corev1.ObjectReference `json:"environmentRef,omitempty"`
	Hostname          string                  `json:"hostname,omitempty"`
	SystemInformation *SystemInformation      `json:"system,omitempty"`
	CPU               *CPUInformation         `json:"cpu,omitempty"`
	BMC               *BMC                    `json:"bmc,omitempty"`
	ManagementAPI     *ManagementAPI          `json:"managementApi,omitempty"`
	ConfigPatches     []ConfigPatches         `json:"configPatches,omitempty"`
	Accepted          bool                    `json:"accepted"`
	Cordoned          bool                    `json:"cordoned,omitempty"`
	PXEBootAlways     bool                    `json:"pxeBootAlways,omitempty"`
	// BootFromDiskMethod specifies the method to exit iPXE to force boot from disk.
	//
	// If not set, controller default is used.
	// Valid values: ipxe-exit, http-404, ipxe-sanboot.
	//
	// +optional
	BootFromDiskMethod siderotypes.BootFromDisk `json:"bootFromDiskMethod,omitempty"`
	// PXEMode specifies the method to trigger PXE boot via IPMI.
	//
	// If not set, controller default is used.
	// Valid values: uefi, bios.
	//
	// +optional
	PXEMode siderotypes.PXEMode `json:"pxeMode,omitempty"`
}

ServerSpec defines the desired state of Server.

func (*ServerSpec) DeepCopy

func (in *ServerSpec) DeepCopy() *ServerSpec

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

func (*ServerSpec) DeepCopyInto

func (in *ServerSpec) DeepCopyInto(out *ServerSpec)

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

type ServerStatus

type ServerStatus struct {
	// Ready is true when server is accepted and in use.
	// +optional
	Ready bool `json:"ready"`

	// InUse is true when server is assigned to some MetalMachine.
	// +optional
	InUse bool `json:"inUse"`

	// IsClean is true when server disks are wiped.
	// +optional
	IsClean bool `json:"isClean"`

	// Conditions defines current service state of the Server.
	Conditions []clusterv1.Condition `json:"conditions,omitempty"`

	// Addresses lists discovered node IPs.
	Addresses []corev1.NodeAddress `json:"addresses,omitempty"`

	// Power is the current power state of the server: "on", "off" or "unknown".
	Power string `json:"power,omitempty"`
}

ServerStatus defines the observed state of Server.

func (*ServerStatus) DeepCopy

func (in *ServerStatus) DeepCopy() *ServerStatus

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

func (*ServerStatus) DeepCopyInto

func (in *ServerStatus) DeepCopyInto(out *ServerStatus)

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

type SystemInformation

type SystemInformation struct {
	Manufacturer string `json:"manufacturer,omitempty"`
	ProductName  string `json:"productName,omitempty"`
	Version      string `json:"version,omitempty"`
	SerialNumber string `json:"serialNumber,omitempty"`
	SKUNumber    string `json:"skuNumber,omitempty"`
	Family       string `json:"family,omitempty"`
}

func (*SystemInformation) DeepCopy

func (in *SystemInformation) DeepCopy() *SystemInformation

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

func (*SystemInformation) DeepCopyInto

func (in *SystemInformation) DeepCopyInto(out *SystemInformation)

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

func (*SystemInformation) PartialEqual

func (a *SystemInformation) PartialEqual(b *SystemInformation) bool

Jump to

Keyboard shortcuts

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