controllers

package
v1.6.0-beta.0 Latest Latest
Warning

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

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

Documentation

Overview

Package controllers implements the Kubeadm controllers.

Index

Constants

View Source
const (
	// DefaultTokenTTL is the default TTL used for tokens.
	DefaultTokenTTL = 15 * time.Minute
)

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 KubeadmConfigReconciler

type KubeadmConfigReconciler struct {
	Client              client.Client
	SecretCachingClient client.Client
	Tracker             *remote.ClusterCacheTracker
	KubeadmInitLock     InitLocker

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

	// TokenTTL is the amount of time a bootstrap token (and therefore a KubeadmConfig) will be valid.
	TokenTTL time.Duration
}

KubeadmConfigReconciler reconciles a KubeadmConfig object.

func (*KubeadmConfigReconciler) ClusterToKubeadmConfigs

func (r *KubeadmConfigReconciler) ClusterToKubeadmConfigs(ctx context.Context, o client.Object) []ctrl.Request

ClusterToKubeadmConfigs is a handler.ToRequestsFunc to be used to enqueue requests for reconciliation of KubeadmConfigs.

func (*KubeadmConfigReconciler) MachinePoolToBootstrapMapFunc

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

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

func (*KubeadmConfigReconciler) MachineToBootstrapMapFunc

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

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

func (*KubeadmConfigReconciler) Reconcile

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

Reconcile handles KubeadmConfig events.

func (*KubeadmConfigReconciler) SetupWithManager

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

SetupWithManager sets up the reconciler with the Manager.

type Scope

type Scope struct {
	logr.Logger
	Config      *bootstrapv1.KubeadmConfig
	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