controller

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TalosPlatformKey = "PLATFORM"
	// TalosModeContainer is the mode for Talos running in a container
	TalosModeContainer = "container"
	// TalosModeMetal is the mode for Talos running on bare metal
	TalosModeMetal = "metal"

	// MachineType
	TalosMachineTypeControlPlane = "controlplane"
	TalosMachineTypeWorker       = "worker"

	// ReconcileModeAnnotation is the annotation key for the reconcile mode
	ReconcileModeAnnotation = "talos.alperen.cloud/reconcile-mode"
	// ReconcileMode is the mode of the reconciliation it could be Normal, WatchOnly, EnsureExists, Disable, DryRun (to be implemented)
	ReconcileModeNormal  = "reconcile"
	ReconcileModeDisable = "disable"
	ReconcileModeDryRun  = "dryrun" // TODO: Implement DryRun mode
)
View Source
const (
	TalosImage = "ghcr.io/siderolabs/talos"
)

Variables

This section is empty.

Functions

func BuildK8sUpgradeJobSpec added in v0.2.3

func BuildK8sUpgradeJobSpec(tcp *talosv1alpha1.TalosControlPlane, image, serviceAccount string) batchv1.JobSpec

func BuildServiceSpec

func BuildServiceSpec(name string, i *int32) corev1.ServiceSpec

func BuildStsSpec

func BuildStsSpec(name string, replicas int32, version string, machineType string, extraEnvs []corev1.EnvVar, storageClassName *string) appsv1.StatefulSetSpec

func BuildUserDataEnvVar

func BuildUserDataEnvVar(configRef *corev1.ConfigMapKeySelector, name string, machineType string) []corev1.EnvVar

Types

type TalosClusterReconciler

type TalosClusterReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

TalosClusterReconciler reconciles a TalosCluster object

func (*TalosClusterReconciler) Reconcile

func (r *TalosClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.19.1/pkg/reconcile

func (*TalosClusterReconciler) SetupWithManager

func (r *TalosClusterReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type TalosControlPlaneReconciler

type TalosControlPlaneReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

TalosControlPlaneReconciler reconciles a TalosControlPlane object

func (*TalosControlPlaneReconciler) BootstrapCluster

func (*TalosControlPlaneReconciler) CheckControlPlaneReady

func (r *TalosControlPlaneReconciler) CheckControlPlaneReady(ctx context.Context, tcp *talosv1alpha1.TalosControlPlane) (bool, error)

func (*TalosControlPlaneReconciler) GenerateConfig

func (*TalosControlPlaneReconciler) GetConfigMapData added in v0.2.5

func (*TalosControlPlaneReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.19.1/pkg/reconcile

func (*TalosControlPlaneReconciler) SecretBundle

func (*TalosControlPlaneReconciler) SetConfig

func (*TalosControlPlaneReconciler) SetupWithManager

func (r *TalosControlPlaneReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*TalosControlPlaneReconciler) WriteControlPlaneConfig

func (r *TalosControlPlaneReconciler) WriteControlPlaneConfig(ctx context.Context, tcp *talosv1alpha1.TalosControlPlane, cpConfig *[]byte) error

func (*TalosControlPlaneReconciler) WriteKubeconfig

func (*TalosControlPlaneReconciler) WriteTalosConfig

type TalosMachineReconciler

type TalosMachineReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

TalosMachineReconciler reconciles a TalosMachine object

func (*TalosMachineReconciler) CheckMachineReady

func (*TalosMachineReconciler) GetBundleConfig

func (*TalosMachineReconciler) GetConfigMapData added in v0.2.5

func (r *TalosMachineReconciler) GetConfigMapData(ctx context.Context, tm *talosv1alpha1.TalosMachine) (*string, error)

func (*TalosMachineReconciler) GetControlPlaneRef

func (*TalosMachineReconciler) Reconcile

func (r *TalosMachineReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.19.1/pkg/reconcile

func (*TalosMachineReconciler) SetupWithManager

func (r *TalosMachineReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*TalosMachineReconciler) UpgradeOrApplyConfig

func (r *TalosMachineReconciler) UpgradeOrApplyConfig(ctx context.Context, tm *talosv1alpha1.TalosMachine, bc *talos.BundleConfig, config *[]byte) error

type TalosWorkerReconciler

type TalosWorkerReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

TalosWorkerReconciler reconciles a TalosWorker object

func (*TalosWorkerReconciler) CheckWorkerMachinesReady

func (r *TalosWorkerReconciler) CheckWorkerMachinesReady(ctx context.Context, tw *talosv1alpha1.TalosWorker) (bool, error)

func (*TalosWorkerReconciler) GenerateConfig

func (*TalosWorkerReconciler) GetControlPlaneRef

func (*TalosWorkerReconciler) Reconcile

func (r *TalosWorkerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.19.1/pkg/reconcile

func (*TalosWorkerReconciler) SetConfig

func (*TalosWorkerReconciler) SetupWithManager

func (r *TalosWorkerReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*TalosWorkerReconciler) WriteWorkerConfig

func (r *TalosWorkerReconciler) WriteWorkerConfig(ctx context.Context, tw *talosv1alpha1.TalosWorker, wkConfig *[]byte) error

Jump to

Keyboard shortcuts

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