controllers

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2023 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ClusterFinalizerName is the finalizer added to clusters to handle deletion.
	ClusterFinalizerName = "clusters.anywhere.eks.amazonaws.com/finalizer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSIamConfigReconciler added in v0.13.0

type AWSIamConfigReconciler interface {
	EnsureCASecret(ctx context.Context, logger logr.Logger, cluster *anywherev1.Cluster) (controller.Result, error)
	Reconcile(ctx context.Context, logger logr.Logger, cluster *anywherev1.Cluster) (controller.Result, error)
	ReconcileDelete(ctx context.Context, logger logr.Logger, cluster *anywherev1.Cluster) error
}

AWSIamConfigReconciler manages aws-iam-authenticator installation and configuration for an eks-a cluster.

type ClusterReconciler

type ClusterReconciler struct {
	// contains filtered or unexported fields
}

ClusterReconciler reconciles a Cluster object.

func NewClusterReconciler

func NewClusterReconciler(client client.Client, registry ProviderClusterReconcilerRegistry, awsIamAuth AWSIamConfigReconciler) *ClusterReconciler

NewClusterReconciler constructs a new ClusterReconciler.

func (*ClusterReconciler) Reconcile

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

Reconcile reconciles a cluster object. +kubebuilder:rbac:groups=anywhere.eks.amazonaws.com,resources=clusters;snowmachineconfigs;snowippools;vspheredatacenterconfigs;vspheremachineconfigs;dockerdatacenterconfigs;bundles;awsiamconfigs,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=anywhere.eks.amazonaws.com,resources=oidcconfigs,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=anywhere.eks.amazonaws.com,resources=awsiamconfigs,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=anywhere.eks.amazonaws.com,resources=clusters/status;snowmachineconfigs/status;snowippools/status;vspheredatacenterconfigs/status;vspheremachineconfigs/status;dockerdatacenterconfigs/status;bundles/status;awsiamconfigs/status,verbs=;get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=anywhere.eks.amazonaws.com,resources=clusters/finalizers;snowmachineconfigs/finalizers;snowippools/finalizers;vspheredatacenterconfigs/finalizers;vspheremachineconfigs/finalizers;dockerdatacenterconfigs/finalizers;bundles/finalizers;awsiamconfigs/finalizers,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=addons.cluster.x-k8s.io,resources=clusterresourcesets,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=cluster.x-k8s.io,resources=*,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=apps,resources=daemonsets,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=test,resources=test,verbs=get;list;watch;create;update;patch;delete;kill +kubebuilder:rbac:groups=distro.eks.amazonaws.com,resources=releases,verbs=get;list;watch +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=awssnowclusters;awssnowmachinetemplates;awssnowippools;vsphereclusters;vspheremachinetemplates;dockerclusters;dockermachinetemplates,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups="",namespace=eksa-system,resources=secrets,verbs=delete;

func (*ClusterReconciler) SetupWithManager

func (r *ClusterReconciler) SetupWithManager(mgr ctrl.Manager, log logr.Logger) error

SetupWithManager sets up the controller with the Manager.

type ClusterReconcilerLegacy

type ClusterReconcilerLegacy struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

ClusterReconcilerLegacy reconciles a Cluster object.

func NewClusterReconcilerLegacy

func NewClusterReconcilerLegacy(client client.Client, log logr.Logger, scheme *runtime.Scheme) *ClusterReconcilerLegacy

func (*ClusterReconcilerLegacy) Reconcile

func (r *ClusterReconcilerLegacy) Reconcile(ctx context.Context, req ctrl.Request) (_ 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 (*ClusterReconcilerLegacy) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type DockerDatacenterReconciler added in v0.13.0

type DockerDatacenterReconciler struct {
	// contains filtered or unexported fields
}

DockerDatacenterReconciler reconciles a DockerDatacenterConfig object.

func NewDockerDatacenterReconciler added in v0.13.0

func NewDockerDatacenterReconciler(client client.Client) *DockerDatacenterReconciler

NewDockerDatacenterReconciler creates a new instance of the DockerDatacenterReconciler struct.

type Factory

type Factory struct {
	// contains filtered or unexported fields
}

func NewFactory

func NewFactory(logger logr.Logger, manager Manager) *Factory

func (*Factory) Build

func (f *Factory) Build(ctx context.Context) (*Reconcilers, error)

func (*Factory) WithClusterReconciler

func (f *Factory) WithClusterReconciler(capiProviders []clusterctlv1.Provider) *Factory

func (*Factory) WithDockerDatacenterReconciler added in v0.13.0

func (f *Factory) WithDockerDatacenterReconciler() *Factory

WithDockerDatacenterReconciler adds the DockerDatacenterReconciler to the controller factory.

func (*Factory) WithProviderClusterReconcilerRegistry

func (f *Factory) WithProviderClusterReconcilerRegistry(capiProviders []clusterctlv1.Provider) *Factory

func (*Factory) WithSnowMachineConfigReconciler

func (f *Factory) WithSnowMachineConfigReconciler() *Factory

func (*Factory) WithTinkerbellDatacenterReconciler added in v0.14.0

func (f *Factory) WithTinkerbellDatacenterReconciler() *Factory

WithTinkerbellDatacenterReconciler adds the TinkerbellDatacenterReconciler to the controller factory.

func (*Factory) WithVSphereDatacenterReconciler

func (f *Factory) WithVSphereDatacenterReconciler() *Factory

type Manager

type Manager = manager.Manager

type ProviderClusterReconcilerRegistry

type ProviderClusterReconcilerRegistry interface {
	Get(datacenterKind string) clusters.ProviderClusterReconciler
}

type Reconcilers

type Reconcilers struct {
	ClusterReconciler              *ClusterReconciler
	DockerDatacenterReconciler     *DockerDatacenterReconciler
	VSphereDatacenterReconciler    *VSphereDatacenterReconciler
	SnowMachineConfigReconciler    *SnowMachineConfigReconciler
	TinkerbellDatacenterReconciler *TinkerbellDatacenterReconciler
}

type SnowMachineConfigReconciler

type SnowMachineConfigReconciler struct {
	// contains filtered or unexported fields
}

SnowMachineConfigReconciler reconciles a SnowMachineConfig object.

func NewSnowMachineConfigReconciler

func NewSnowMachineConfigReconciler(client client.Client, validator Validator) *SnowMachineConfigReconciler

NewSnowMachineConfigReconciler constructs a new SnowMachineConfigReconciler.

func (*SnowMachineConfigReconciler) Reconcile

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

TODO: add here kubebuilder permissions as needed. Reconcile implements the reconcile.Reconciler interface.

func (*SnowMachineConfigReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type TinkerbellDatacenterReconciler added in v0.14.0

type TinkerbellDatacenterReconciler struct {
	// contains filtered or unexported fields
}

TinkerbellDatacenterReconciler reconciles a TinkerbellDatacenterConfig object.

func NewTinkerbellDatacenterReconciler added in v0.14.0

func NewTinkerbellDatacenterReconciler(client client.Client) *TinkerbellDatacenterReconciler

NewTinkerbellDatacenterReconciler creates a new instance of the TinkerbellDatacenterReconciler struct.

func (*TinkerbellDatacenterReconciler) Reconcile added in v0.14.0

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

Reconcile implements the reconcile.Reconciler interface.

func (*TinkerbellDatacenterReconciler) SetupWithManager added in v0.14.0

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

SetupWithManager sets up the controller with the Manager.

type VSphereDatacenterReconciler

type VSphereDatacenterReconciler struct {
	// contains filtered or unexported fields
}

VSphereDatacenterReconciler reconciles a VSphereDatacenterConfig object.

func NewVSphereDatacenterReconciler

func NewVSphereDatacenterReconciler(client client.Client, validator *vsphere.Validator, defaulter *vsphere.Defaulter) *VSphereDatacenterReconciler

NewVSphereDatacenterReconciler constructs a new VSphereDatacenterReconciler.

func (*VSphereDatacenterReconciler) Reconcile

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

TODO: add here kubebuilder permissions as neeeded. Reconcile implements the reconcile.Reconciler interface.

func (*VSphereDatacenterReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type Validator

type Validator interface {
	ValidateEC2SshKeyNameExists(ctx context.Context, m *anywherev1.SnowMachineConfig) error
	ValidateEC2ImageExistsOnDevice(ctx context.Context, m *anywherev1.SnowMachineConfig) error
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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