Documentation
¶
Index ¶
- Constants
- func BuildK8sUpgradeJobSpec(tcp *talosv1alpha1.TalosControlPlane, image, serviceAccount string) batchv1.JobSpec
- func BuildServiceSpec(name string, i *int32) corev1.ServiceSpec
- func BuildStsSpec(name string, replicas int32, version string, machineType string, ...) appsv1.StatefulSetSpec
- func BuildUserDataEnvVar(configRef *corev1.ConfigMapKeySelector, name string, machineType string) []corev1.EnvVar
- type TalosClusterReconciler
- type TalosControlPlaneReconciler
- func (r *TalosControlPlaneReconciler) BootstrapCluster(ctx context.Context, tcp *talosv1alpha1.TalosControlPlane) error
- func (r *TalosControlPlaneReconciler) CheckControlPlaneReady(ctx context.Context, tcp *talosv1alpha1.TalosControlPlane) (bool, error)
- func (r *TalosControlPlaneReconciler) GenerateConfig(ctx context.Context, tcp *talosv1alpha1.TalosControlPlane) error
- func (r *TalosControlPlaneReconciler) GetConfigMapData(ctx context.Context, tcp *talosv1alpha1.TalosControlPlane) (*string, error)
- func (r *TalosControlPlaneReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *TalosControlPlaneReconciler) SecretBundle(ctx context.Context, tcp *talosv1alpha1.TalosControlPlane) (*talos.SecretBundle, error)
- func (r *TalosControlPlaneReconciler) SetConfig(ctx context.Context, tcp *talosv1alpha1.TalosControlPlane) (*talos.BundleConfig, error)
- func (r *TalosControlPlaneReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *TalosControlPlaneReconciler) WriteControlPlaneConfig(ctx context.Context, tcp *talosv1alpha1.TalosControlPlane, cpConfig *[]byte) error
- func (r *TalosControlPlaneReconciler) WriteKubeconfig(ctx context.Context, tcp *talosv1alpha1.TalosControlPlane) error
- func (r *TalosControlPlaneReconciler) WriteTalosConfig(ctx context.Context, tcp *talosv1alpha1.TalosControlPlane) error
- type TalosMachineReconciler
- func (r *TalosMachineReconciler) CheckMachineReady(ctx context.Context, tm *talosv1alpha1.TalosMachine) (ctrl.Result, error)
- func (r *TalosMachineReconciler) GetBundleConfig(ctx context.Context, tm *talosv1alpha1.TalosMachine) (*talos.BundleConfig, error)
- func (r *TalosMachineReconciler) GetConfigMapData(ctx context.Context, tm *talosv1alpha1.TalosMachine) (*string, error)
- func (r *TalosMachineReconciler) GetControlPlaneRef(ctx context.Context, tm *talosv1alpha1.TalosMachine) (*talosv1alpha1.TalosControlPlane, error)
- func (r *TalosMachineReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *TalosMachineReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *TalosMachineReconciler) UpgradeOrApplyConfig(ctx context.Context, tm *talosv1alpha1.TalosMachine, bc *talos.BundleConfig, ...) error
- type TalosWorkerReconciler
- func (r *TalosWorkerReconciler) CheckWorkerMachinesReady(ctx context.Context, tw *talosv1alpha1.TalosWorker) (bool, error)
- func (r *TalosWorkerReconciler) GenerateConfig(ctx context.Context, tw *talosv1alpha1.TalosWorker) error
- func (r *TalosWorkerReconciler) GetControlPlaneRef(ctx context.Context, tw *talosv1alpha1.TalosWorker) (tcp *talosv1alpha1.TalosControlPlane, err error)
- func (r *TalosWorkerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *TalosWorkerReconciler) SetConfig(ctx context.Context, tw *talosv1alpha1.TalosWorker) (*talos.BundleConfig, error)
- func (r *TalosWorkerReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *TalosWorkerReconciler) WriteWorkerConfig(ctx context.Context, tw *talosv1alpha1.TalosWorker, wkConfig *[]byte) error
Constants ¶
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 )
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 BuildUserDataEnvVar ¶
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 (r *TalosControlPlaneReconciler) BootstrapCluster(ctx context.Context, tcp *talosv1alpha1.TalosControlPlane) error
func (*TalosControlPlaneReconciler) CheckControlPlaneReady ¶
func (r *TalosControlPlaneReconciler) CheckControlPlaneReady(ctx context.Context, tcp *talosv1alpha1.TalosControlPlane) (bool, error)
func (*TalosControlPlaneReconciler) GenerateConfig ¶
func (r *TalosControlPlaneReconciler) GenerateConfig(ctx context.Context, tcp *talosv1alpha1.TalosControlPlane) error
func (*TalosControlPlaneReconciler) GetConfigMapData ¶ added in v0.2.5
func (r *TalosControlPlaneReconciler) GetConfigMapData(ctx context.Context, tcp *talosv1alpha1.TalosControlPlane) (*string, error)
func (*TalosControlPlaneReconciler) Reconcile ¶
func (r *TalosControlPlaneReconciler) 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 (*TalosControlPlaneReconciler) SecretBundle ¶
func (r *TalosControlPlaneReconciler) SecretBundle(ctx context.Context, tcp *talosv1alpha1.TalosControlPlane) (*talos.SecretBundle, error)
func (*TalosControlPlaneReconciler) SetConfig ¶
func (r *TalosControlPlaneReconciler) SetConfig(ctx context.Context, tcp *talosv1alpha1.TalosControlPlane) (*talos.BundleConfig, error)
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 (r *TalosControlPlaneReconciler) WriteKubeconfig(ctx context.Context, tcp *talosv1alpha1.TalosControlPlane) error
func (*TalosControlPlaneReconciler) WriteTalosConfig ¶
func (r *TalosControlPlaneReconciler) WriteTalosConfig(ctx context.Context, tcp *talosv1alpha1.TalosControlPlane) error
type TalosMachineReconciler ¶
type TalosMachineReconciler struct { client.Client Scheme *runtime.Scheme Recorder record.EventRecorder }
TalosMachineReconciler reconciles a TalosMachine object
func (*TalosMachineReconciler) CheckMachineReady ¶
func (r *TalosMachineReconciler) CheckMachineReady(ctx context.Context, tm *talosv1alpha1.TalosMachine) (ctrl.Result, error)
func (*TalosMachineReconciler) GetBundleConfig ¶
func (r *TalosMachineReconciler) GetBundleConfig(ctx context.Context, tm *talosv1alpha1.TalosMachine) (*talos.BundleConfig, error)
func (*TalosMachineReconciler) GetConfigMapData ¶ added in v0.2.5
func (r *TalosMachineReconciler) GetConfigMapData(ctx context.Context, tm *talosv1alpha1.TalosMachine) (*string, error)
func (*TalosMachineReconciler) GetControlPlaneRef ¶
func (r *TalosMachineReconciler) GetControlPlaneRef(ctx context.Context, tm *talosv1alpha1.TalosMachine) (*talosv1alpha1.TalosControlPlane, error)
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 (r *TalosWorkerReconciler) GenerateConfig(ctx context.Context, tw *talosv1alpha1.TalosWorker) error
func (*TalosWorkerReconciler) GetControlPlaneRef ¶
func (r *TalosWorkerReconciler) GetControlPlaneRef(ctx context.Context, tw *talosv1alpha1.TalosWorker) (tcp *talosv1alpha1.TalosControlPlane, err error)
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 (r *TalosWorkerReconciler) SetConfig(ctx context.Context, tw *talosv1alpha1.TalosWorker) (*talos.BundleConfig, error)
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