controllers

package
v0.0.0-...-23a8917 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2019 License: Apache-2.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultTokenTTL is the amount of time a bootstrap token (and therefore a KubeadmConfig) will be valid
	DefaultTokenTTL = 15 * time.Minute
)

Functions

This section is empty.

Types

type ClusterSecretsClientFactory

type ClusterSecretsClientFactory struct{}

ClusterSecretsClientFactory support creation of secrets client for clusters

func (ClusterSecretsClientFactory) NewSecretsClient

func (f ClusterSecretsClientFactory) NewSecretsClient(client client.Client, cluster *clusterv1.Cluster) (corev1.SecretInterface, error)

NewSecretsClient returns a new client supporting SecretInterface for the cluster

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
	SecretsClientFactory SecretsClientFactory
	KubeadmInitLock      InitLocker
	Log                  logr.Logger
}

KubeadmConfigReconciler reconciles a KubeadmConfig object

func (*KubeadmConfigReconciler) ClusterToKubeadmConfigs

func (r *KubeadmConfigReconciler) ClusterToKubeadmConfigs(o handler.MapObject) []ctrl.Request

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

func (*KubeadmConfigReconciler) MachineToBootstrapMapFunc

func (r *KubeadmConfigReconciler) MachineToBootstrapMapFunc(o handler.MapObject) []ctrl.Request

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

func (*KubeadmConfigReconciler) Reconcile

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

Reconcile handles KubeadmConfig events

func (*KubeadmConfigReconciler) SetupWithManager

func (r *KubeadmConfigReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the reconciler with the Manager.

type SecretsClientFactory

type SecretsClientFactory interface {
	// NewSecretsClient returns a new client supporting SecretInterface
	NewSecretsClient(client.Client, *clusterv1.Cluster) (typedcorev1.SecretInterface, error)
}

SecretsClientFactory define behaviour for creating a secrets client

Jump to

Keyboard shortcuts

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