v1beta1

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 13 Imported by: 4

Documentation

Overview

Package v1beta1 contains API Schema definitions for the infrastructure v1beta1 API group.

Index

Constants

View Source
const (
	// ClusterFinalizer allows ReconcileTinkerbellCluster to clean up Tinkerbell resources before
	// removing it from the apiserver.
	ClusterFinalizer = "tinkerbellcluster.infrastructure.cluster.x-k8s.io"
)
View Source
const (
	// MachineFinalizer allows ReconcileTinkerbellMachine to clean up Tinkerbell resources before
	// removing it from the apiserver.
	MachineFinalizer = "tinkerbellmachine.infrastructure.cluster.x-k8s.io"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1beta1"}

	// 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
)
View Source
var (
	TinkerbellResourceStatusPending = TinkerbellResourceStatus(0)
	TinkerbellResourceStatusRunning = TinkerbellResourceStatus(1)
	TinkerbellResourceStatusFailed  = TinkerbellResourceStatus(2)
	TinkerbellResourceStatusTimeout = TinkerbellResourceStatus(3)
	TinkerbellResourceStatusSuccess = TinkerbellResourceStatus(4)
)

Functions

This section is empty.

Types

type HardwareAffinity added in v0.2.0

type HardwareAffinity struct {
	// Required are the required hardware affinity terms.  The terms are OR'd together, hardware must match one term to
	// be considered.
	// +optional
	Required []HardwareAffinityTerm `json:"required,omitempty"`
	// Preferred are the preferred hardware affinity terms. Hardware matching these terms are preferred according to the
	// weights provided, but are not required.
	// +optional
	Preferred []WeightedHardwareAffinityTerm `json:"preferred,omitempty"`
}

HardwareAffinity defines the required and preferred hardware affinities.

func (*HardwareAffinity) DeepCopy added in v0.2.0

func (in *HardwareAffinity) DeepCopy() *HardwareAffinity

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

func (*HardwareAffinity) DeepCopyInto added in v0.2.0

func (in *HardwareAffinity) DeepCopyInto(out *HardwareAffinity)

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

type HardwareAffinityTerm added in v0.2.0

type HardwareAffinityTerm struct {
	// LabelSelector is used to select for particular hardware by label.
	LabelSelector metav1.LabelSelector `json:"labelSelector"`
}

HardwareAffinityTerm is used to select for a particular existing hardware resource.

func (*HardwareAffinityTerm) DeepCopy added in v0.2.0

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

func (*HardwareAffinityTerm) DeepCopyInto added in v0.2.0

func (in *HardwareAffinityTerm) DeepCopyInto(out *HardwareAffinityTerm)

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

type TinkerbellCluster

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

	Spec   TinkerbellClusterSpec   `json:"spec,omitempty"`
	Status TinkerbellClusterStatus `json:"status,omitempty"`
}

TinkerbellCluster is the Schema for the tinkerbellclusters API.

func (*TinkerbellCluster) DeepCopy

func (in *TinkerbellCluster) DeepCopy() *TinkerbellCluster

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

func (*TinkerbellCluster) DeepCopyInto

func (in *TinkerbellCluster) DeepCopyInto(out *TinkerbellCluster)

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

func (*TinkerbellCluster) DeepCopyObject

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

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

func (*TinkerbellCluster) Default

func (c *TinkerbellCluster) Default()

Default implements webhookutil.defaulter so a webhook will be registered for the type.

func (*TinkerbellCluster) SetupWebhookWithManager

func (c *TinkerbellCluster) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager sets up and registers the webhook with the manager.

func (*TinkerbellCluster) ValidateCreate

func (c *TinkerbellCluster) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*TinkerbellCluster) ValidateDelete

func (c *TinkerbellCluster) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*TinkerbellCluster) ValidateUpdate

func (c *TinkerbellCluster) ValidateUpdate(_ runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type TinkerbellClusterList

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

TinkerbellClusterList contains a list of TinkerbellCluster.

func (*TinkerbellClusterList) DeepCopy

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

func (*TinkerbellClusterList) DeepCopyInto

func (in *TinkerbellClusterList) DeepCopyInto(out *TinkerbellClusterList)

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

func (*TinkerbellClusterList) DeepCopyObject

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

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

type TinkerbellClusterSpec

type TinkerbellClusterSpec struct {
	// ControlPlaneEndpoint is a required field by ClusterAPI v1beta1.
	//
	// See https://cluster-api.sigs.k8s.io/developer/architecture/controllers/cluster.html
	// for more details.
	//
	// +optional
	ControlPlaneEndpoint clusterv1.APIEndpoint `json:"controlPlaneEndpoint,omitempty"`

	// ImageLookupFormat is the URL naming format to use for machine images when
	// a machine does not specify. When set, this will be used for all cluster machines
	// unless a machine specifies a different ImageLookupFormat. Supports substitutions
	// for {{.BaseRegistry}}, {{.OSDistro}}, {{.OSVersion}} and {{.KubernetesVersion}} with
	// the basse URL, OS distribution, OS version, and kubernetes version, respectively.
	// BaseRegistry will be the value in ImageLookupBaseRegistry or ghcr.io/tinkerbell/cluster-api-provider-tinkerbell
	// (the default), OSDistro will be the value in ImageLookupOSDistro or ubuntu (the default),
	// OSVersion will be the value in ImageLookupOSVersion or default based on the OSDistro
	// (if known), and the kubernetes version as defined by the packages produced by
	// kubernetes/release: v1.13.0, v1.12.5-mybuild.1, or v1.17.3. For example, the default
	// image format of {{.BaseRegistry}}/{{.OSDistro}}-{{.OSVersion}}:{{.KubernetesVersion}}.gz will
	// attempt to pull the image from that location. See also: https://golang.org/pkg/text/template/
	// +optional
	ImageLookupFormat string `json:"imageLookupFormat,omitempty"`

	// ImageLookupBaseRegistry is the base Registry URL that is used for pulling images,
	// if not set, the default will be to use ghcr.io/tinkerbell/cluster-api-provider-tinkerbell.
	// +optional
	// +kubebuilder:default=ghcr.io/tinkerbell/cluster-api-provider-tinkerbell
	ImageLookupBaseRegistry string `json:"imageLookupBaseRegistry,omitempty"`

	// ImageLookupOSDistro is the name of the OS distro to use when fetching machine images,
	// if not set it will default to ubuntu.
	// +optional
	// +kubebuilder:default=ubuntu
	ImageLookupOSDistro string `json:"imageLookupOSDistro,omitempty"`

	// ImageLookupOSVersion is the version of the OS distribution to use when fetching machine
	// images. If not set it will default based on ImageLookupOSDistro.
	// +optional
	ImageLookupOSVersion string `json:"imageLookupOSVersion,omitempty"`
}

TinkerbellClusterSpec defines the desired state of TinkerbellCluster.

func (*TinkerbellClusterSpec) DeepCopy

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

func (*TinkerbellClusterSpec) DeepCopyInto

func (in *TinkerbellClusterSpec) DeepCopyInto(out *TinkerbellClusterSpec)

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

type TinkerbellClusterStatus

type TinkerbellClusterStatus struct {

	// Ready denotes that the cluster (infrastructure) is ready.
	// +optional
	Ready bool `json:"ready"`
}

TinkerbellClusterStatus defines the observed state of TinkerbellCluster.

func (*TinkerbellClusterStatus) DeepCopy

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

func (*TinkerbellClusterStatus) DeepCopyInto

func (in *TinkerbellClusterStatus) DeepCopyInto(out *TinkerbellClusterStatus)

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

type TinkerbellMachine

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

	Spec   TinkerbellMachineSpec   `json:"spec,omitempty"`
	Status TinkerbellMachineStatus `json:"status,omitempty"`
}

TinkerbellMachine is the Schema for the tinkerbellmachines API.

func (*TinkerbellMachine) DeepCopy

func (in *TinkerbellMachine) DeepCopy() *TinkerbellMachine

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

func (*TinkerbellMachine) DeepCopyInto

func (in *TinkerbellMachine) DeepCopyInto(out *TinkerbellMachine)

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

func (*TinkerbellMachine) DeepCopyObject

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

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

func (*TinkerbellMachine) SetupWebhookWithManager

func (m *TinkerbellMachine) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager sets up and registers the webhook with the manager.

func (*TinkerbellMachine) ValidateCreate

func (m *TinkerbellMachine) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*TinkerbellMachine) ValidateDelete

func (m *TinkerbellMachine) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*TinkerbellMachine) ValidateUpdate

func (m *TinkerbellMachine) ValidateUpdate(oldRaw runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type TinkerbellMachineList

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

TinkerbellMachineList contains a list of TinkerbellMachine.

func (*TinkerbellMachineList) DeepCopy

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

func (*TinkerbellMachineList) DeepCopyInto

func (in *TinkerbellMachineList) DeepCopyInto(out *TinkerbellMachineList)

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

func (*TinkerbellMachineList) DeepCopyObject

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

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

type TinkerbellMachineSpec

type TinkerbellMachineSpec struct {
	// ImageLookupFormat is the URL naming format to use for machine images when
	// a machine does not specify. When set, this will be used for all cluster machines
	// unless a machine specifies a different ImageLookupFormat. Supports substitutions
	// for {{.BaseRegistry}}, {{.OSDistro}}, {{.OSVersion}} and {{.KubernetesVersion}} with
	// the basse URL, OS distribution, OS version, and kubernetes version, respectively.
	// BaseRegistry will be the value in ImageLookupBaseRegistry or ghcr.io/tinkerbell/cluster-api-provider-tinkerbell
	// (the default), OSDistro will be the value in ImageLookupOSDistro or ubuntu (the default),
	// OSVersion will be the value in ImageLookupOSVersion or default based on the OSDistro
	// (if known), and the kubernetes version as defined by the packages produced by
	// kubernetes/release: v1.13.0, v1.12.5-mybuild.1, or v1.17.3. For example, the default
	// image format of {{.BaseRegistry}}/{{.OSDistro}}-{{.OSVersion}}:{{.KubernetesVersion}}.gz will
	// attempt to pull the image from that location. See also: https://golang.org/pkg/text/template/
	// +optional
	ImageLookupFormat string `json:"imageLookupFormat,omitempty"`

	// ImageLookupBaseRegistry is the base Registry URL that is used for pulling images,
	// if not set, the default will be to use ghcr.io/tinkerbell/cluster-api-provider-tinkerbell.
	// +optional
	ImageLookupBaseRegistry string `json:"imageLookupBaseRegistry,omitempty"`

	// ImageLookupOSDistro is the name of the OS distro to use when fetching machine images,
	// if not set it will default to ubuntu.
	// +optional
	ImageLookupOSDistro string `json:"imageLookupOSDistro,omitempty"`

	// ImageLookupOSVersion is the version of the OS distribution to use when fetching machine
	// images. If not set it will default based on ImageLookupOSDistro.
	// +optional
	ImageLookupOSVersion string `json:"imageLookupOSVersion,omitempty"`

	// TemplateOverride overrides the default Tinkerbell template used by CAPT.
	// You can learn more about Tinkerbell templates here: https://docs.tinkerbell.org/templates/
	// +optional
	TemplateOverride string `json:"templateOverride,omitempty"`

	// HardwareAffinity allows filtering for hardware.
	// +optional
	HardwareAffinity *HardwareAffinity `json:"hardwareAffinity,omitempty"`

	// Those fields are set programmatically, but they cannot be re-constructed from "state of the world", so
	// we put them in spec instead of status.
	HardwareName string `json:"hardwareName,omitempty"`
	ProviderID   string `json:"providerID,omitempty"`
}

TinkerbellMachineSpec defines the desired state of TinkerbellMachine.

func (*TinkerbellMachineSpec) DeepCopy

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

func (*TinkerbellMachineSpec) DeepCopyInto

func (in *TinkerbellMachineSpec) DeepCopyInto(out *TinkerbellMachineSpec)

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

type TinkerbellMachineStatus

type TinkerbellMachineStatus struct {

	// Ready is true when the provider resource is ready.
	// +optional
	Ready bool `json:"ready"`

	// Addresses contains the Tinkerbell device associated addresses.
	Addresses []corev1.NodeAddress `json:"addresses,omitempty"`

	// InstanceStatus is the status of the Tinkerbell device instance for this machine.
	// +optional
	InstanceStatus *TinkerbellResourceStatus `json:"instanceStatus,omitempty"`

	// Any transient errors that occur during the reconciliation of Machines
	// can be added as events to the Machine object and/or logged in the
	// controller's output.
	// +optional
	ErrorReason *capierrors.MachineStatusError `json:"errorReason,omitempty"`

	// ErrorMessage will be set in the event that there is a terminal problem
	// reconciling the Machine and will contain a more verbose string suitable
	// for logging and human consumption.
	//
	// This field should not be set for transitive errors that a controller
	// faces that are expected to be fixed automatically over
	// time (like service outages), but instead indicate that something is
	// fundamentally wrong with the Machine's spec or the configuration of
	// the controller, and that manual intervention is required. Examples
	// of terminal errors would be invalid combinations of settings in the
	// spec, values that are unsupported by the controller, or the
	// responsible controller itself being critically misconfigured.
	//
	// Any transient errors that occur during the reconciliation of Machines
	// can be added as events to the Machine object and/or logged in the
	// controller's output.
	// +optional
	ErrorMessage *string `json:"errorMessage,omitempty"`
}

TinkerbellMachineStatus defines the observed state of TinkerbellMachine.

func (*TinkerbellMachineStatus) DeepCopy

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

func (*TinkerbellMachineStatus) DeepCopyInto

func (in *TinkerbellMachineStatus) DeepCopyInto(out *TinkerbellMachineStatus)

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

type TinkerbellMachineTemplate

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

	Spec TinkerbellMachineTemplateSpec `json:"spec,omitempty"`
}

TinkerbellMachineTemplate is the Schema for the tinkerbellmachinetemplates API.

func (*TinkerbellMachineTemplate) DeepCopy

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

func (*TinkerbellMachineTemplate) DeepCopyInto

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

func (*TinkerbellMachineTemplate) DeepCopyObject

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

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

func (*TinkerbellMachineTemplate) SetupWebhookWithManager

func (m *TinkerbellMachineTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager sets up and registers the webhook with the manager.

func (*TinkerbellMachineTemplate) ValidateCreate

func (m *TinkerbellMachineTemplate) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type.

func (*TinkerbellMachineTemplate) ValidateDelete

func (m *TinkerbellMachineTemplate) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type.

func (*TinkerbellMachineTemplate) ValidateUpdate

func (m *TinkerbellMachineTemplate) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.

type TinkerbellMachineTemplateList

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

TinkerbellMachineTemplateList contains a list of TinkerbellMachineTemplate.

func (*TinkerbellMachineTemplateList) DeepCopy

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

func (*TinkerbellMachineTemplateList) DeepCopyInto

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

func (*TinkerbellMachineTemplateList) DeepCopyObject

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

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

type TinkerbellMachineTemplateResource

type TinkerbellMachineTemplateResource struct {
	// Spec is the specification of the desired behavior of the machine.
	Spec TinkerbellMachineSpec `json:"spec"`
}

TinkerbellMachineTemplateResource describes the data needed to create am TinkerbellMachine from a template.

func (*TinkerbellMachineTemplateResource) DeepCopy

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

func (*TinkerbellMachineTemplateResource) DeepCopyInto

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

type TinkerbellMachineTemplateSpec

type TinkerbellMachineTemplateSpec struct {
	Template TinkerbellMachineTemplateResource `json:"template"`
}

TinkerbellMachineTemplateSpec defines the desired state of TinkerbellMachineTemplate.

func (*TinkerbellMachineTemplateSpec) DeepCopy

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

func (*TinkerbellMachineTemplateSpec) DeepCopyInto

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

type TinkerbellResourceStatus

type TinkerbellResourceStatus int

TinkerbellResourceStatus describes the status of a Tinkerbell resource.

type WeightedHardwareAffinityTerm added in v0.2.0

type WeightedHardwareAffinityTerm struct {
	// Weight associated with matching the corresponding hardwareAffinityTerm, in the range 1-100.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=100
	Weight int32 `json:"weight"`
	// HardwareAffinityTerm is the term associated with the corresponding weight.
	HardwareAffinityTerm HardwareAffinityTerm `json:"hardwareAffinityTerm"`
}

WeightedHardwareAffinityTerm is a HardwareAffinityTerm with an associated weight. The weights of all the matched WeightedHardwareAffinityTerm fields are added per-hardware to find the most preferred hardware.

func (*WeightedHardwareAffinityTerm) DeepCopy added in v0.2.0

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

func (*WeightedHardwareAffinityTerm) DeepCopyInto added in v0.2.0

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