Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the fleet v1alpha1 API group. +kubebuilder:object:generate=true +groupName=fleet.otterscale.io
Index ¶
- Variables
- type BareMetalHostReference
- type Cluster
- type ClusterList
- type ClusterNetworkSpec
- type ClusterPhase
- type ClusterSpec
- type ClusterStatus
- type ConfigPatch
- type Endpoint
- type ImageSpec
- type Machine
- type MachineAddress
- type MachineList
- type MachinePhase
- type MachineRole
- type MachineSpec
- type MachineStatus
- type ResourceReference
- type TalosConfigSpec
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "fleet.otterscale.io", Version: "v1alpha1"} // 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 ¶
This section is empty.
Types ¶
type BareMetalHostReference ¶
type BareMetalHostReference struct {
// Name is the name of the BareMetalHost.
// +kubebuilder:validation:MinLength=1
// +required
Name string `json:"name"`
// Namespace is the namespace of the BareMetalHost.
// +kubebuilder:validation:MinLength=1
// +required
Namespace string `json:"namespace"`
}
BareMetalHostReference identifies a Metal3 BareMetalHost resource.
func (*BareMetalHostReference) DeepCopy ¶
func (in *BareMetalHostReference) DeepCopy() *BareMetalHostReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BareMetalHostReference.
func (*BareMetalHostReference) DeepCopyInto ¶
func (in *BareMetalHostReference) DeepCopyInto(out *BareMetalHostReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Cluster ¶
type Cluster struct {
metav1.TypeMeta `json:",inline"`
// Standard object's metadata.
// +optional
metav1.ObjectMeta `json:"metadata,omitzero"`
// Spec defines the desired behavior of the Cluster.
// +required
Spec ClusterSpec `json:"spec"`
// Status represents the current information about the Cluster.
// +optional
Status ClusterStatus `json:"status,omitzero"`
}
Cluster is the Schema for the clusters API. A Cluster represents a Talos Linux Kubernetes cluster provisioned on bare metal via Metal3 BareMetalHost resources.
func (*Cluster) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
func (*Cluster) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Cluster) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterList ¶
type ClusterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitzero"`
Items []Cluster `json:"items"`
}
ClusterList contains a list of Cluster resources.
func (*ClusterList) DeepCopy ¶
func (in *ClusterList) DeepCopy() *ClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList.
func (*ClusterList) DeepCopyInto ¶
func (in *ClusterList) DeepCopyInto(out *ClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterList) DeepCopyObject ¶
func (in *ClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterNetworkSpec ¶
type ClusterNetworkSpec struct {
// DNSDomain is the DNS domain used for internal cluster DNS (default: cluster.local).
// +kubebuilder:default="cluster.local"
// +optional
DNSDomain string `json:"dnsDomain,omitempty"`
// PodSubnets is the list of CIDR ranges for pod IP allocation.
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=4
// +kubebuilder:validation:items:MaxLength=43
// +kubebuilder:validation:XValidation:rule="self.all(cidr, isCIDR(cidr))",message="each entry must be a valid CIDR notation"
// +optional
PodSubnets []string `json:"podSubnets,omitempty"`
// ServiceSubnets is the list of CIDR ranges for service ClusterIP allocation.
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=4
// +kubebuilder:validation:items:MaxLength=43
// +kubebuilder:validation:XValidation:rule="self.all(cidr, isCIDR(cidr))",message="each entry must be a valid CIDR notation"
// +optional
ServiceSubnets []string `json:"serviceSubnets,omitempty"`
}
ClusterNetworkSpec configures cluster-level networking.
func (*ClusterNetworkSpec) DeepCopy ¶
func (in *ClusterNetworkSpec) DeepCopy() *ClusterNetworkSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNetworkSpec.
func (*ClusterNetworkSpec) DeepCopyInto ¶
func (in *ClusterNetworkSpec) DeepCopyInto(out *ClusterNetworkSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterPhase ¶
type ClusterPhase string
ClusterPhase represents the lifecycle phase of a Cluster. +kubebuilder:validation:Enum=Pending;Provisioning;Provisioned;Ready;Failed;Deleting +enum
const ( ClusterPhasePending ClusterPhase = "Pending" ClusterPhaseProvisioning ClusterPhase = "Provisioning" ClusterPhaseProvisioned ClusterPhase = "Provisioned" ClusterPhaseReady ClusterPhase = "Ready" ClusterPhaseFailed ClusterPhase = "Failed" ClusterPhaseDeleting ClusterPhase = "Deleting" )
type ClusterSpec ¶
type ClusterSpec struct {
// ControlPlaneEndpoint is the API server endpoint (typically a VIP or load balancer).
// +required
ControlPlaneEndpoint Endpoint `json:"controlPlaneEndpoint"`
// TalosVersion is the Talos OS version to use for config generation (e.g., "v1.9").
// +kubebuilder:validation:Pattern=`^v\d+\.\d+(\.\d+)?$`
// +required
TalosVersion string `json:"talosVersion"`
// KubernetesVersion is the target Kubernetes version (e.g., "v1.32.0").
// +kubebuilder:validation:Pattern=`^v\d+\.\d+\.\d+$`
// +required
KubernetesVersion string `json:"kubernetesVersion"`
// TalosImage specifies the Talos OS image written to each BareMetalHost.
// +required
TalosImage ImageSpec `json:"talosImage"`
// ClusterNetwork configures pod, service, and DNS networking.
// +optional
ClusterNetwork *ClusterNetworkSpec `json:"clusterNetwork,omitempty"`
// ControlPlaneConfig defines how Talos machine configs are produced for control plane nodes.
// Individual Machines may override this via their own TalosConfig field.
// +optional
ControlPlaneConfig TalosConfigSpec `json:"controlPlaneConfig,omitzero"`
// WorkerConfig defines how Talos machine configs are produced for worker nodes.
// When omitted, defaults to generateType "worker" which auto-generates a join config.
// Individual Machines may override this via their own TalosConfig field.
// +optional
WorkerConfig TalosConfigSpec `json:"workerConfig,omitzero"`
}
ClusterSpec defines the desired state of a Cluster.
func (*ClusterSpec) DeepCopy ¶
func (in *ClusterSpec) DeepCopy() *ClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.
func (*ClusterSpec) DeepCopyInto ¶
func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterStatus ¶
type ClusterStatus struct {
// ObservedGeneration is the most recent generation observed by the controller.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Phase is the high-level summary of the cluster lifecycle.
// +optional
Phase ClusterPhase `json:"phase,omitempty"`
// ControlPlaneReady is true when all control plane Machines are bootstrapped and running.
// +optional
ControlPlaneReady bool `json:"controlPlaneReady,omitempty"`
// Initialized is true once the first control plane node has been bootstrapped
// and etcd has been initialized.
// +optional
Initialized bool `json:"initialized,omitempty"`
// SecretsRef references the Secret containing the Talos secrets bundle.
// +optional
SecretsRef *ResourceReference `json:"secretsRef,omitempty"`
// TalosconfigRef references the Secret containing the talosconfig client configuration.
// +optional
TalosconfigRef *ResourceReference `json:"talosconfigRef,omitempty"`
// ReadyWorkers is the count of worker Machines that are ready.
// +optional
ReadyWorkers int32 `json:"readyWorkers,omitempty"`
// TotalWorkers is the total count of worker Machines.
// +optional
TotalWorkers int32 `json:"totalWorkers,omitempty"`
// Conditions store the status conditions of the Cluster.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
ClusterStatus defines the observed state of a Cluster.
func (*ClusterStatus) DeepCopy ¶
func (in *ClusterStatus) DeepCopy() *ClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus.
func (*ClusterStatus) DeepCopyInto ¶
func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigPatch ¶
type ConfigPatch struct {
// Op is the patch operation (add, remove, replace, move, copy, test).
// +kubebuilder:validation:Enum=add;remove;replace;move;copy;test
// +required
Op string `json:"op"`
// Path is the JSON pointer to the target location.
// +kubebuilder:validation:MinLength=1
// +required
Path string `json:"path"`
// Value is the value to use in the patch operation (required for add/replace/test).
// +kubebuilder:pruning:PreserveUnknownFields
// +optional
Value *runtime.RawExtension `json:"value,omitempty"`
}
ConfigPatch defines a single RFC 6902 JSON patch operation.
func (*ConfigPatch) DeepCopy ¶
func (in *ConfigPatch) DeepCopy() *ConfigPatch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigPatch.
func (*ConfigPatch) DeepCopyInto ¶
func (in *ConfigPatch) DeepCopyInto(out *ConfigPatch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Endpoint ¶
type Endpoint struct {
// Host is the hostname or IP address of the API server.
// +kubebuilder:validation:MinLength=1
// +required
Host string `json:"host"`
// Port is the port number of the API server.
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=65535
// +kubebuilder:default=6443
// +optional
Port int32 `json:"port,omitempty"`
}
Endpoint defines a host:port pair for the Kubernetes API server.
func (*Endpoint) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint.
func (*Endpoint) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageSpec ¶
type ImageSpec struct {
// URL is the location of the OS image (e.g., HTTP server hosting Talos raw image).
// +kubebuilder:validation:MinLength=1
// +required
URL string `json:"url"`
// Checksum is the image checksum or a URL pointing to a checksum file.
// +kubebuilder:validation:MinLength=1
// +required
Checksum string `json:"checksum"`
// ChecksumType is the algorithm used for the checksum (sha256, sha512, md5, or auto).
// +kubebuilder:validation:Enum=sha256;sha512;md5;auto
// +kubebuilder:default="sha256"
// +optional
ChecksumType string `json:"checksumType,omitempty"`
// Format is the disk image format (raw, qcow2, or live-iso).
// +kubebuilder:validation:Enum=raw;qcow2;live-iso
// +kubebuilder:default="raw"
// +optional
Format string `json:"format,omitempty"`
}
ImageSpec defines the OS image to be provisioned on BareMetalHost resources.
func (*ImageSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSpec.
func (*ImageSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Machine ¶
type Machine struct {
metav1.TypeMeta `json:",inline"`
// Standard object's metadata.
// +optional
metav1.ObjectMeta `json:"metadata,omitzero"`
// Spec defines the desired behavior of the Machine.
// +required
Spec MachineSpec `json:"spec"`
// Status represents the current information about the Machine.
// +optional
Status MachineStatus `json:"status,omitzero"`
}
Machine is the Schema for the machines API. A Machine represents a single bare metal node in a Talos cluster, backed by a Metal3 BareMetalHost.
func (*Machine) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Machine.
func (*Machine) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Machine) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MachineAddress ¶
type MachineAddress struct {
// Type is the type of the address (InternalIP, ExternalIP, Hostname).
// +required
Type string `json:"type"`
// Address is the actual address value.
// +required
Address string `json:"address"`
}
MachineAddress contains information about a machine's address.
func (*MachineAddress) DeepCopy ¶
func (in *MachineAddress) DeepCopy() *MachineAddress
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineAddress.
func (*MachineAddress) DeepCopyInto ¶
func (in *MachineAddress) DeepCopyInto(out *MachineAddress)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MachineList ¶
type MachineList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitzero"`
Items []Machine `json:"items"`
}
MachineList contains a list of Machine resources.
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 MachinePhase ¶
type MachinePhase string
MachinePhase represents the lifecycle phase of a Machine. +kubebuilder:validation:Enum=Pending;Provisioning;Provisioned;Bootstrapping;Running;Failed;Deleting +enum
const ( MachinePhasePending MachinePhase = "Pending" MachinePhaseProvisioning MachinePhase = "Provisioning" MachinePhaseProvisioned MachinePhase = "Provisioned" MachinePhaseBootstrapping MachinePhase = "Bootstrapping" MachinePhaseRunning MachinePhase = "Running" MachinePhaseFailed MachinePhase = "Failed" MachinePhaseDeleting MachinePhase = "Deleting" )
type MachineRole ¶
type MachineRole string
MachineRole defines the role a Machine plays in the cluster. +kubebuilder:validation:Enum=controlplane;worker +enum
const ( MachineRoleControlPlane MachineRole = "controlplane" MachineRoleWorker MachineRole = "worker" )
type MachineSpec ¶
type MachineSpec struct {
// ClusterRef is the name of the Cluster this Machine belongs to.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="clusterRef is immutable"
// +required
ClusterRef string `json:"clusterRef"`
// Role defines whether this Machine is a control plane or worker node.
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="role is immutable"
// +required
Role MachineRole `json:"role"`
// BareMetalHostRef references the Metal3 BareMetalHost that backs this Machine.
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="bareMetalHostRef is immutable"
// +required
BareMetalHostRef BareMetalHostReference `json:"bareMetalHostRef"`
// TalosConfig overrides the Cluster-level default config for this Machine.
// When omitted, the fallback is role-aware: control plane Machines use
// the Cluster's ControlPlaneConfig, worker Machines use the Cluster's WorkerConfig.
// +optional
TalosConfig *TalosConfigSpec `json:"talosConfig,omitempty"`
// Bootstrap indicates whether this Machine is the initial bootstrap node
// responsible for initializing etcd. Exactly one control plane Machine per
// Cluster should have this set to true. Must not be set on worker Machines.
// +kubebuilder:default=false
// +optional
Bootstrap bool `json:"bootstrap,omitempty"`
}
MachineSpec defines the desired state of a Machine. +kubebuilder:validation:XValidation:rule="!(self.role == 'worker' && self.bootstrap)",message="worker nodes cannot be bootstrap nodes"
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 MachineStatus ¶
type MachineStatus struct {
// ObservedGeneration is the most recent generation observed by the controller.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// Phase is the high-level summary of the machine lifecycle.
// +optional
Phase MachinePhase `json:"phase,omitempty"`
// Ready is true when the Machine is fully bootstrapped and the node is healthy.
// +optional
Ready bool `json:"ready,omitempty"`
// InfrastructureReady is true when the BareMetalHost has finished provisioning.
// +optional
InfrastructureReady bool `json:"infrastructureReady,omitempty"`
// BootstrapReady is true when the Talos bootstrap has completed.
// +optional
BootstrapReady bool `json:"bootstrapReady,omitempty"`
// BootstrapDataSecretRef references the Secret containing the Talos machine config.
// +optional
BootstrapDataSecretRef *ResourceReference `json:"bootstrapDataSecretRef,omitempty"`
// Addresses contains the addresses reported by the BareMetalHost hardware inspection.
// +optional
Addresses []MachineAddress `json:"addresses,omitempty"`
// Conditions store the status conditions of the Machine.
// +listType=map
// +listMapKey=type
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`
}
MachineStatus defines the observed state of a 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 ResourceReference ¶
type ResourceReference struct {
// Name is the name of the referenced resource.
// +required
Name string `json:"name"`
// Namespace is the namespace of the referenced resource.
// Empty for cluster-scoped resources.
// +optional
Namespace string `json:"namespace,omitempty"`
}
ResourceReference is a lightweight reference to a Kubernetes resource managed by the operator.
func (*ResourceReference) DeepCopy ¶
func (in *ResourceReference) DeepCopy() *ResourceReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceReference.
func (*ResourceReference) DeepCopyInto ¶
func (in *ResourceReference) DeepCopyInto(out *ResourceReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TalosConfigSpec ¶
type TalosConfigSpec struct {
// GenerateType determines how the Talos machine config is produced.
// "controlplane" auto-generates a control plane config from cluster parameters.
// "worker" auto-generates a worker (join) config from cluster parameters.
// "none" expects the user to supply a complete config in the Data field.
// When omitted, the controller defaults based on the Machine role.
// +kubebuilder:validation:Enum=controlplane;worker;none
// +optional
GenerateType string `json:"generateType,omitempty"`
// Data is the raw Talos machine configuration YAML.
// Required when GenerateType is "none"; ignored otherwise.
// +optional
Data string `json:"data,omitempty"`
// ConfigPatches is a list of RFC 6902 JSON patches applied to the generated config.
// Ignored when GenerateType is "none".
// +optional
ConfigPatches []ConfigPatch `json:"configPatches,omitempty"`
}
TalosConfigSpec defines how Talos machine configuration is produced.
func (*TalosConfigSpec) DeepCopy ¶
func (in *TalosConfigSpec) DeepCopy() *TalosConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TalosConfigSpec.
func (*TalosConfigSpec) DeepCopyInto ¶
func (in *TalosConfigSpec) DeepCopyInto(out *TalosConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.