controllers

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MPL-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Log = klogr.New()

Log is the global logger for the internal package.

Functions

func MatchesControlPlaneConfig added in v0.5.0

func MatchesControlPlaneConfig(talosConfigs map[string]*cabptv1.TalosConfig, tcp *controlplanev1.TalosControlPlane) collections.Func

MatchesControlPlaneConfig returns a filter to find all machines that match a given controlPaneConfig.

func MatchesTemplateClonedFrom

func MatchesTemplateClonedFrom(infraConfigs map[string]*unstructured.Unstructured, tcp *controlplanev1.TalosControlPlane) collections.Func

MatchesTemplateClonedFrom returns a filter to find all machines that match a given TCP infra template.

Types

type ControlPlane

type ControlPlane struct {
	TCP      *controlplanev1.TalosControlPlane
	Cluster  *clusterv1.Cluster
	Machines collections.Machines
	// contains filtered or unexported fields
}

ControlPlane holds business logic around control planes. It should never need to connect to a service, that responsibility lies outside of this struct.

func (*ControlPlane) Logger

func (c *ControlPlane) Logger() logr.Logger

Logger returns a logger with useful context.

func (*ControlPlane) MachineWithDeleteAnnotation

func (c *ControlPlane) MachineWithDeleteAnnotation(machines collections.Machines) collections.Machines

MachineWithDeleteAnnotation returns a machine that has been annotated with DeleteMachineAnnotation key.

func (*ControlPlane) MachinesNeedingRollout

func (c *ControlPlane) MachinesNeedingRollout() collections.Machines

MachinesNeedingRollout return a list of machines that need to be rolled out.

type TalosControlPlaneReconciler

type TalosControlPlaneReconciler struct {
	client.Client
	APIReader client.Reader
	Log       logr.Logger
	Scheme    *runtime.Scheme
	Tracker   *remote.ClusterCacheTracker
}

TalosControlPlaneReconciler reconciles a TalosControlPlane object

func (*TalosControlPlaneReconciler) ClusterToTalosControlPlane

func (r *TalosControlPlaneReconciler) ClusterToTalosControlPlane(_ context.Context, o client.Object) []ctrl.Request

ClusterToTalosControlPlane is a handler.ToRequestsFunc to be used to enqueue requests for reconciliation for TalosControlPlane based on updates to a Cluster.

func (*TalosControlPlaneReconciler) Reconcile

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

func (*TalosControlPlaneReconciler) SetupWithManager

func (r *TalosControlPlaneReconciler) SetupWithManager(mgr ctrl.Manager, options controller.Options) error

Jump to

Keyboard shortcuts

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