v1alpha3

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MPL-2.0 Imports: 15 Imported by: 3

Documentation

Overview

+kubebuilder:object:generate=true +groupName=controlplane.cluster.x-k8s.io

Package v1alpha3 contains API Schema definitions for the controlplane v1alpha3 API group +kubebuilder:object:generate=true +groupName=controlplane.cluster.x-k8s.io

Index

Constants

View Source
const (
	// MachinesBootstrapped is tracking control planes bootstrap status.
	MachinesBootstrapped clusterv1.ConditionType = "MachinesBootstrapped"

	// WaitingForMachinesReason (Severity=Info) documents a TalosControlPlane bootstrap is waiting
	// for all control plane nodes to be created.
	WaitingForMachinesReason = "WaitingForMachines"
)
View Source
const (
	// AvailableCondition documents that the first control plane instance has completed Talos boot sequence
	// and so the control plane is available and an API server instance is ready for processing requests.
	AvailableCondition clusterv1.ConditionType = "Available"

	// WaitingForTalosBootReason (Severity=Info) documents a TalosControlPlane object waiting for the first
	// control plane instance to complete Talos boot sequence.
	WaitingForTalosBootReason = "WaitingForTalosBoot"

	// InvalidControlPlaneConfigReason (Severity=Error) documents that controlplane config is invalid and the provider
	// can not proceed with the bootstrap.
	InvalidControlPlaneConfigReason = "InvalidControlPlaneConfig"
)
View Source
const (
	// MachinesSpecUpToDateCondition documents that the spec of the machines controlled by the TalosControlPlane
	// is up to date. When this condition is false, the TalosControlPlane is executing a rolling upgrade.
	MachinesSpecUpToDateCondition clusterv1.ConditionType = "MachinesSpecUpToDate"

	// RollingUpdateInProgressReason (Severity=Warning) documents a TalosControlPlane object executing a
	// rolling upgrade for aligning the machines spec to the desired state.
	RollingUpdateInProgressReason = "RollingUpdateInProgress"
)
View Source
const (
	// ResizedCondition documents a TalosControlPlane that is resizing the set of controlled machines.
	ResizedCondition clusterv1.ConditionType = "Resized"

	// ScalingUpReason (Severity=Info) documents a TalosControlPlane that is increasing the number of replicas.
	ScalingUpReason = "ScalingUp"

	// ScalingDownReason (Severity=Info) documents a TalosControlPlane that is decreasing the number of replicas.
	ScalingDownReason = "ScalingDown"
)
View Source
const (
	// ControlPlaneComponentsHealthyCondition reports the overall status of control plane components
	// implemented as static pods generated by Talos including kube-api-server, kube-controller manager,
	// kube-scheduler and etcd.
	ControlPlaneComponentsHealthyCondition clusterv1.ConditionType = "ControlPlaneComponentsHealthy"

	// ControlPlaneComponentsUnhealthyReason (Severity=Error) documents a control plane component not healthy.
	ControlPlaneComponentsUnhealthyReason = "ControlPlaneComponentsUnhealthy"

	// ControlPlaneComponentsInspectionFailedReason documents a failure in inspecting the control plane component status.
	ControlPlaneComponentsInspectionFailedReason = "ControlPlaneComponentsInspectionFailed"
)
View Source
const (
	// EtcdClusterHealthyCondition documents the overall etcd cluster's health.
	EtcdClusterHealthyCondition clusterv1.ConditionType = "EtcdClusterHealthyCondition"

	// EtcdClusterUnhealthyReason (Severity=Error) is set when the etcd cluster is unhealthy.
	EtcdClusterUnhealthyReason = "EtcdClusterUnhealthy"
)
View Source
const (
	// MachinesCreatedCondition documents that the machines controlled by the TalosControlPlane are created.
	// When this condition is false, it indicates that there was an error when cloning the infrastructure/bootstrap template or
	// when generating the machine object.
	MachinesCreatedCondition clusterv1.ConditionType = "MachinesCreated"

	// InfrastructureTemplateCloningFailedReason (Severity=Error) documents a TalosControlPlane failing to
	// clone the infrastructure template.
	InfrastructureTemplateCloningFailedReason = "InfrastructureTemplateCloningFailed"

	// BootstrapTemplateCloningFailedReason (Severity=Error) documents a TalosControlPlane failing to
	// clone the bootstrap template.
	BootstrapTemplateCloningFailedReason = "BootstrapTemplateCloningFailed"

	// MachineGenerationFailedReason (Severity=Error) documents a TalosControlPlane failing to
	// generate a machine object.
	MachineGenerationFailedReason = "MachineGenerationFailed"
)
View Source
const (
	// MachinesReadyCondition reports an aggregate of current status of the machines controlled by the TalosControlPlane.
	MachinesReadyCondition clusterv1.ConditionType = "MachinesReady"
)
View Source
const (
	TalosControlPlaneFinalizer = "talos.controlplane.cluster.x-k8s.io"
)

Variables

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

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

This section is empty.

Types

type ControlPlaneConfig

type ControlPlaneConfig struct {
	// Deprecated: starting from cacppt v0.4.0 provider doesn't use init configs.
	InitConfig         cabptv1.TalosConfigSpec `json:"init,omitempty"`
	ControlPlaneConfig cabptv1.TalosConfigSpec `json:"controlplane"`
}

func (*ControlPlaneConfig) DeepCopy

func (in *ControlPlaneConfig) DeepCopy() *ControlPlaneConfig

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

func (*ControlPlaneConfig) DeepCopyInto

func (in *ControlPlaneConfig) DeepCopyInto(out *ControlPlaneConfig)

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

type RollingUpdate

type RollingUpdate struct {
	// The maximum number of control planes that can be scheduled above or under the
	// desired number of control planes.
	// Value can be an absolute number 1 or 0.
	// Defaults to 1.
	// Example: when this is set to 1, the control plane can be scaled
	// up immediately when the rolling update starts.
	// +optional
	MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"`
}

RollingUpdate is used to control the desired behavior of rolling update.

func (*RollingUpdate) DeepCopy

func (in *RollingUpdate) DeepCopy() *RollingUpdate

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

func (*RollingUpdate) DeepCopyInto

func (in *RollingUpdate) DeepCopyInto(out *RollingUpdate)

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

type RolloutStrategy

type RolloutStrategy struct {
	// Rolling update config params. Present only if
	// RolloutStrategyType = RollingUpdate.
	// +optional
	RollingUpdate *RollingUpdate `json:"rollingUpdate,omitempty"`

	// Change rollout strategy.
	//
	// Supported strategies:
	//  * "RollingUpdate".
	//  * "OnDelete"
	//
	// Default is RollingUpdate.
	// +optional
	Type RolloutStrategyType `json:"type,omitempty"`
}

RolloutStrategy describes how to replace existing machines with new ones.

func (*RolloutStrategy) DeepCopy

func (in *RolloutStrategy) DeepCopy() *RolloutStrategy

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

func (*RolloutStrategy) DeepCopyInto

func (in *RolloutStrategy) DeepCopyInto(out *RolloutStrategy)

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

type RolloutStrategyType

type RolloutStrategyType string

RolloutStrategyType defines the rollout strategies for a KubeadmControlPlane.

const (
	// RollingUpdateStrategyType replaces the old control planes by new one using rolling update
	// i.e. gradually scale up or down the old control planes and scale up or down the new one.
	RollingUpdateStrategyType RolloutStrategyType = "RollingUpdate"
	// OnDeleteStrategyType doesn't replace the nodes automatically, but if the machine is removed,
	// new one will be created from the new spec.
	OnDeleteStrategyType RolloutStrategyType = "OnDelete"
)

type TalosControlPlane

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

	Spec   TalosControlPlaneSpec   `json:"spec,omitempty"`
	Status TalosControlPlaneStatus `json:"status,omitempty"`
}

TalosControlPlane is the Schema for the taloscontrolplanes API

func (*TalosControlPlane) DeepCopy

func (in *TalosControlPlane) DeepCopy() *TalosControlPlane

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

func (*TalosControlPlane) DeepCopyInto

func (in *TalosControlPlane) DeepCopyInto(out *TalosControlPlane)

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

func (*TalosControlPlane) DeepCopyObject

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

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

func (*TalosControlPlane) Default

func (r *TalosControlPlane) Default()

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

func (*TalosControlPlane) GetConditions

func (r *TalosControlPlane) GetConditions() clusterv1.Conditions

GetConditions returns the set of conditions for this object.

func (*TalosControlPlane) SetConditions

func (r *TalosControlPlane) SetConditions(conditions clusterv1.Conditions)

SetConditions sets the conditions on this object.

func (*TalosControlPlane) SetupWebhookWithManager

func (r *TalosControlPlane) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager implements webhook methods.

func (*TalosControlPlane) ValidateCreate

func (r *TalosControlPlane) ValidateCreate() (admission.Warnings, error)

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

func (*TalosControlPlane) ValidateDelete

func (r *TalosControlPlane) ValidateDelete() (admission.Warnings, error)

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

func (*TalosControlPlane) ValidateUpdate

func (r *TalosControlPlane) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

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

type TalosControlPlaneList

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

TalosControlPlaneList contains a list of TalosControlPlane

func (*TalosControlPlaneList) DeepCopy

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

func (*TalosControlPlaneList) DeepCopyInto

func (in *TalosControlPlaneList) DeepCopyInto(out *TalosControlPlaneList)

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

func (*TalosControlPlaneList) DeepCopyObject

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

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

type TalosControlPlaneSpec

type TalosControlPlaneSpec struct {
	// Number of desired machines. Defaults to 1. When stacked etcd is used only
	// odd numbers are permitted, as per [etcd best practice](https://etcd.io/docs/v3.3.12/faq/#why-an-odd-number-of-cluster-members).
	// This is a pointer to distinguish between explicit zero and not specified.
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`

	// Version defines the desired Kubernetes version.
	// +kubebuilder:validation:MinLength:=2
	// +kubebuilder:validation:Pattern:=^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)([-0-9a-zA-Z_\.+]*)?$
	Version string `json:"version"`

	// InfrastructureTemplate is a required reference to a custom resource
	// offered by an infrastructure provider.
	InfrastructureTemplate corev1.ObjectReference `json:"infrastructureTemplate"`

	// ControlPlaneConfig is a two TalosConfigSpecs
	// to use for initializing and joining machines to the control plane.
	ControlPlaneConfig ControlPlaneConfig `json:"controlPlaneConfig"`

	// The RolloutStrategy to use to replace control plane machines with
	// new ones.
	// +optional
	// +kubebuilder:default={type: "RollingUpdate", rollingUpdate: {maxSurge: 1}}
	RolloutStrategy *RolloutStrategy `json:"rolloutStrategy,omitempty"`
}

TalosControlPlaneSpec defines the desired state of TalosControlPlane

func (*TalosControlPlaneSpec) DeepCopy

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

func (*TalosControlPlaneSpec) DeepCopyInto

func (in *TalosControlPlaneSpec) DeepCopyInto(out *TalosControlPlaneSpec)

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

func (*TalosControlPlaneSpec) GetReplicas added in v0.5.0

func (s *TalosControlPlaneSpec) GetReplicas() int32

GetReplicas reads spec replicas in a safe way. If replicas is nil it will return 0.

type TalosControlPlaneStatus

type TalosControlPlaneStatus struct {
	// Selector is the label selector in string format to avoid introspection
	// by clients, and is used to provide the CRD-based integration for the
	// scale subresource and additional integrations for things like kubectl
	// describe.. The string will be in the same format as the query-param syntax.
	// More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors
	// +optional
	Selector string `json:"selector,omitempty"`

	// Total number of non-terminated machines targeted by this control plane
	// (their labels match the selector).
	// +optional
	Replicas int32 `json:"replicas,omitempty"`

	// Total number of fully running and ready control plane machines.
	// +optional
	ReadyReplicas int32 `json:"readyReplicas,omitempty"`

	// Total number of unavailable machines targeted by this control plane.
	// This is the total number of machines that are still required for
	// the deployment to have 100% available capacity. They may either
	// be machines that are running but not yet ready or machines
	// that still have not been created.
	// +optional
	UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"`

	// Initialized denotes whether or not the control plane has the
	// uploaded talos-config configmap.
	// +optional
	Initialized bool `json:"initialized"`

	// Ready denotes that the TalosControlPlane API Server is ready to
	// receive requests.
	// +optional
	Ready bool `json:"ready"`

	// Bootstrapped denotes whether any nodes received bootstrap request
	// which is required to start etcd and Kubernetes components in Talos.
	// +optional
	Bootstrapped bool `json:"bootstrapped,omitempty"`

	// FailureReason indicates that there is a terminal problem reconciling the
	// state, and will be set to a token value suitable for
	// programmatic interpretation.
	// +optional
	FailureReason *string `json:"failureReason,omitempty"`

	// ErrorMessage indicates that there is a terminal problem reconciling the
	// state, and will be set to a descriptive error message.
	// +optional
	FailureMessage *string `json:"failureMessage,omitempty"`

	// ObservedGeneration is the latest generation observed by the controller.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Conditions defines current service state of the KubeadmControlPlane.
	// +optional
	Conditions clusterv1.Conditions `json:"conditions,omitempty"`

	// version represents the minimum Kubernetes version for the control plane machines
	// in the cluster.
	// +optional
	Version *string `json:"version,omitempty"`
}

TalosControlPlaneStatus defines the observed state of TalosControlPlane

func (*TalosControlPlaneStatus) DeepCopy

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

func (*TalosControlPlaneStatus) DeepCopyInto

func (in *TalosControlPlaneStatus) DeepCopyInto(out *TalosControlPlaneStatus)

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