controllers

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2025 License: Apache-2.0 Imports: 50 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// DefaultRequeueTime is the default requeue time for the controller.
	DefaultRequeueTime = 20 * time.Second
)

Variables

This section is empty.

Functions

func ControlPlaneMachineLabelsForCluster added in v0.14.0

func ControlPlaneMachineLabelsForCluster(rcp *controlplanev1.RKE2ControlPlane, clusterName string) map[string]string

ControlPlaneMachineLabelsForCluster returns a set of labels to add to a control plane machine for this specific cluster.

Types

type RKE2ControlPlaneReconciler

type RKE2ControlPlaneReconciler struct {
	Log logr.Logger
	client.Client
	Scheme *runtime.Scheme

	SecretCachingClient client.Client

	// WatchFilterValue is the label value used to filter events prior to reconciliation.
	WatchFilterValue string
	// contains filtered or unexported fields
}

RKE2ControlPlaneReconciler reconciles a RKE2ControlPlane object.

func (*RKE2ControlPlaneReconciler) ClusterToRKE2ControlPlane

func (r *RKE2ControlPlaneReconciler) ClusterToRKE2ControlPlane(ctx context.Context) handler.MapFunc

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

func (*RKE2ControlPlaneReconciler) GetWorkloadCluster added in v0.5.0

func (r *RKE2ControlPlaneReconciler) GetWorkloadCluster(ctx context.Context, controlPlane *rke2.ControlPlane) (rke2.WorkloadCluster, error)

GetWorkloadCluster builds a cluster object. The cluster comes with an etcd client generator to connect to any etcd pod living on a managed machine.

func (*RKE2ControlPlaneReconciler) Reconcile

func (r *RKE2ControlPlaneReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, reterr 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.

func (*RKE2ControlPlaneReconciler) SetupWithManager

func (r *RKE2ControlPlaneReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, clientQPS float32, clientBurst, concurrency int) error

SetupWithManager sets up the controller with the Manager.

func (*RKE2ControlPlaneReconciler) UpdateExternalObject added in v0.14.0

func (r *RKE2ControlPlaneReconciler) UpdateExternalObject(
	ctx context.Context,
	obj client.Object,
	rcp *controlplanev1.RKE2ControlPlane,
	cluster *clusterv1.Cluster,
) error

UpdateExternalObject updates the external object with the labels and annotations from RKE2ControlPlane.

func (*RKE2ControlPlaneReconciler) UpdateMachine added in v0.14.0

UpdateMachine updates an existing Machine object for the control plane.

Jump to

Keyboard shortcuts

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