controllers

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Package controllers contains k3s config controllers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InitLocker

type InitLocker interface {
	Lock(ctx context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) bool
	Unlock(ctx context.Context, cluster *clusterv1.Cluster) bool
}

InitLocker is a lock that is used around kubeadm init.

type K3sConfigReconciler

type K3sConfigReconciler struct {
	client.Client
	K3sInitLock InitLocker

	// WatchFilterValue is the label value used to filter events prior to reconciliation.
	WatchFilterValue string
}

K3sConfigReconciler reconciles a K3sConfig object

func (*K3sConfigReconciler) ClusterToK3sConfigs

func (r *K3sConfigReconciler) ClusterToK3sConfigs(o client.Object) []ctrl.Request

ClusterToK3sConfigs is a handler.ToRequestsFunc to be used to enqueue requests for reconciliation of K3sConfig.

func (*K3sConfigReconciler) MachinePoolToBootstrapMapFunc

func (r *K3sConfigReconciler) MachinePoolToBootstrapMapFunc(o client.Object) []ctrl.Request

MachinePoolToBootstrapMapFunc is a handler.ToRequestsFunc to be used to enqueue request for reconciliation of K3sConfig.

func (*K3sConfigReconciler) MachineToBootstrapMapFunc

func (r *K3sConfigReconciler) MachineToBootstrapMapFunc(o client.Object) []ctrl.Request

MachineToBootstrapMapFunc is a handler.ToRequestsFunc to be used to enqueue request for reconciliation of K3sConfig.

func (*K3sConfigReconciler) Reconcile

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

Reconcile handles K3sConfig events.

func (*K3sConfigReconciler) SetupWithManager

func (r *K3sConfigReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error

SetupWithManager sets up the controller with the Manager.

type Scope

type Scope struct {
	logr.Logger
	Config      *infrabootstrapv1.K3sConfig
	ConfigOwner *bsutil.ConfigOwner
	Cluster     *clusterv1.Cluster
}

Scope is a scoped struct used during reconciliation.

Jump to

Keyboard shortcuts

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