controllers

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 60 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AzureClusterToAzureMachinePoolsFunc added in v0.4.8

func AzureClusterToAzureMachinePoolsFunc(ctx context.Context, c client.Client, log logr.Logger) handler.MapFunc

AzureClusterToAzureMachinePoolsFunc is a handler.MapFunc to be used to enqueue requests for reconciliation of AzureMachinePools.

func AzureClusterToAzureMachinePoolsMapper added in v0.4.6

func AzureClusterToAzureMachinePoolsMapper(ctx context.Context, c client.Client, scheme *runtime.Scheme, log logr.Logger) (handler.MapFunc, error)

AzureClusterToAzureMachinePoolsMapper creates a mapping handler to transform AzureClusters into AzureMachinePools. The transform requires AzureCluster to map to the owning Cluster, then from the Cluster, collect the MachinePools belonging to the cluster, then finally projecting the infrastructure reference to the AzureMachinePool.

func AzureMachinePoolMachineMapper added in v0.5.0

func AzureMachinePoolMachineMapper(scheme *runtime.Scheme, log logr.Logger) handler.MapFunc

AzureMachinePoolMachineMapper creates a mapping handler to transform AzureMachinePoolMachine to AzureMachinePools.

func AzureMachinePoolToAzureMachinePoolMachines added in v0.5.0

func AzureMachinePoolToAzureMachinePoolMachines(ctx context.Context, c client.Client, log logr.Logger) handler.MapFunc

AzureMachinePoolToAzureMachinePoolMachines maps an AzureMachinePool to its child AzureMachinePoolMachines through Cluster and MachinePool labels.

func AzureManagedControlPlaneToAzureMachinePoolsMapper added in v1.12.0

func AzureManagedControlPlaneToAzureMachinePoolsMapper(ctx context.Context, c client.Client, scheme *runtime.Scheme, log logr.Logger) (handler.MapFunc, error)

AzureManagedControlPlaneToAzureMachinePoolsMapper creates a mapping handler to transform AzureManagedControlPlanes into AzureMachinePools. The transform requires AzureManagedControlPlane to map to the owning Cluster, then from the Cluster, collect the MachinePools belonging to the cluster, then finally projecting the infrastructure reference to the AzureMachinePool.

func KubeadmConfigToInfrastructureMapFunc added in v1.7.3

func KubeadmConfigToInfrastructureMapFunc(ctx context.Context, c client.Client, log logr.Logger) handler.MapFunc

KubeadmConfigToInfrastructureMapFunc returns a handler.ToRequestsFunc that watches for KubeadmConfig events and returns.

func MachinePoolMachineHasStateOrVersionChange added in v0.5.0

func MachinePoolMachineHasStateOrVersionChange(logger logr.Logger) predicate.Funcs

MachinePoolMachineHasStateOrVersionChange predicates any events based on changes to the AzureMachinePoolMachine status relevant for the AzureMachinePool controller.

func MachinePoolModelHasChanged added in v0.5.0

func MachinePoolModelHasChanged(logger logr.Logger) predicate.Funcs

MachinePoolModelHasChanged predicates any events based on changes to the AzureMachinePool model.

func MachinePoolToInfrastructureMapFunc added in v0.4.6

func MachinePoolToInfrastructureMapFunc(gvk schema.GroupVersionKind, log logr.Logger) handler.MapFunc

MachinePoolToInfrastructureMapFunc returns a handler.MapFunc that watches for MachinePool events and returns reconciliation requests for an infrastructure provider object.

Types

type AgentPoolAdoptReconciler added in v1.15.0

type AgentPoolAdoptReconciler struct {
	client.Client
}

AgentPoolAdoptReconciler adopts ASO ManagedClustersAgentPool resources into a CAPI Cluster.

func (*AgentPoolAdoptReconciler) Reconcile added in v1.15.0

func (r *AgentPoolAdoptReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, resultErr error)

Reconcile reconciles an AzureASOManagedCluster.

func (*AgentPoolAdoptReconciler) SetupWithManager added in v1.15.0

func (r *AgentPoolAdoptReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type AzureASOManagedClusterReconciler added in v1.15.0

type AzureASOManagedClusterReconciler struct {
	client.Client
	WatchFilterValue string
	// contains filtered or unexported fields
}

AzureASOManagedClusterReconciler reconciles a AzureASOManagedCluster object.

func (*AzureASOManagedClusterReconciler) Reconcile added in v1.15.0

func (r *AzureASOManagedClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, resultErr error)

Reconcile reconciles an AzureASOManagedCluster.

func (*AzureASOManagedClusterReconciler) SetupWithManager added in v1.15.0

func (r *AzureASOManagedClusterReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type AzureASOManagedControlPlaneReconciler added in v1.15.0

type AzureASOManagedControlPlaneReconciler struct {
	client.Client
	WatchFilterValue string
	// contains filtered or unexported fields
}

AzureASOManagedControlPlaneReconciler reconciles a AzureASOManagedControlPlane object.

func (*AzureASOManagedControlPlaneReconciler) Reconcile added in v1.15.0

func (r *AzureASOManagedControlPlaneReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, resultErr error)

Reconcile reconciles an AzureASOManagedControlPlane.

func (*AzureASOManagedControlPlaneReconciler) SetupWithManager added in v1.15.0

SetupWithManager sets up the controller with the Manager.

type AzureASOManagedMachinePoolReconciler added in v1.15.0

type AzureASOManagedMachinePoolReconciler struct {
	client.Client
	WatchFilterValue string
	Tracker          ClusterTracker
	// contains filtered or unexported fields
}

AzureASOManagedMachinePoolReconciler reconciles a AzureASOManagedMachinePool object.

func (*AzureASOManagedMachinePoolReconciler) Reconcile added in v1.15.0

func (r *AzureASOManagedMachinePoolReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, resultErr error)

Reconcile reconciles an AzureASOManagedMachinePool.

func (*AzureASOManagedMachinePoolReconciler) SetupWithManager added in v1.15.0

func (r *AzureASOManagedMachinePoolReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type AzureMachinePoolMachineController added in v0.5.0

type AzureMachinePoolMachineController struct {
	client.Client
	Scheme           *runtime.Scheme
	Recorder         record.EventRecorder
	Timeouts         reconciler.Timeouts
	WatchFilterValue string
	// contains filtered or unexported fields
}

AzureMachinePoolMachineController handles Kubernetes change events for AzureMachinePoolMachine resources.

func NewAzureMachinePoolMachineController added in v0.5.0

func NewAzureMachinePoolMachineController(c client.Client, recorder record.EventRecorder, timeouts reconciler.Timeouts, watchFilterValue string) *AzureMachinePoolMachineController

NewAzureMachinePoolMachineController creates a new AzureMachinePoolMachineController to handle updates to Azure Machine Pool Machines.

func (*AzureMachinePoolMachineController) Reconcile added in v0.5.0

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

Reconcile idempotently gets, creates, and updates a machine pool.

func (*AzureMachinePoolMachineController) SetupWithManager added in v0.5.0

func (ampmr *AzureMachinePoolMachineController) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options infracontroller.Options) error

SetupWithManager initializes this controller with a manager.

type AzureMachinePoolReconciler

type AzureMachinePoolReconciler struct {
	client.Client
	Scheme           *runtime.Scheme
	Recorder         record.EventRecorder
	Timeouts         reconciler.Timeouts
	WatchFilterValue string
	// contains filtered or unexported fields
}

AzureMachinePoolReconciler reconciles an AzureMachinePool object.

func NewAzureMachinePoolReconciler added in v0.4.11

func NewAzureMachinePoolReconciler(client client.Client, recorder record.EventRecorder, timeouts reconciler.Timeouts, watchFilterValue string) *AzureMachinePoolReconciler

NewAzureMachinePoolReconciler returns a new AzureMachinePoolReconciler instance.

func (*AzureMachinePoolReconciler) Annotation

func (ampr *AzureMachinePoolReconciler) Annotation(rw annotationReaderWriter, annotation string) string

Annotation fetches the specific machine annotation.

func (*AzureMachinePoolReconciler) AnnotationJSON

func (ampr *AzureMachinePoolReconciler) AnnotationJSON(rw annotationReaderWriter, annotation string) (map[string]interface{}, error)

AnnotationJSON returns a map[string]interface from a JSON annotation. This method gets the given `annotation` from an `annotationReaderWriter` and unmarshalls it from a JSON string into a `map[string]interface{}`.

func (*AzureMachinePoolReconciler) Reconcile

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

Reconcile idempotently gets, creates, and updates a machine pool.

func (*AzureMachinePoolReconciler) SetupWithManager

func (ampr *AzureMachinePoolReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options infracontroller.Options) error

SetupWithManager initializes this controller with a manager.

type ClusterTracker added in v1.15.0

type ClusterTracker interface {
	GetClient(context.Context, types.NamespacedName) (client.Client, error)
}

ClusterTracker wraps a CAPI remote.ClusterCacheTracker.

type ManagedClusterAdoptReconciler added in v1.15.0

type ManagedClusterAdoptReconciler struct {
	client.Client
}

ManagedClusterAdoptReconciler adopts ASO ManagedCluster resources into a CAPI Cluster.

func (*ManagedClusterAdoptReconciler) Reconcile added in v1.15.0

func (r *ManagedClusterAdoptReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, resultErr error)

Reconcile reconciles an AzureASOManagedCluster.

func (*ManagedClusterAdoptReconciler) SetupWithManager added in v1.15.0

func (r *ManagedClusterAdoptReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type ResourceReconciler added in v1.15.0

type ResourceReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

ResourceReconciler reconciles a set of arbitrary ASO resources.

func (*ResourceReconciler) Delete added in v1.15.0

func (r *ResourceReconciler) Delete(ctx context.Context) error

Delete deletes the specified resources.

func (*ResourceReconciler) Pause added in v1.15.0

func (r *ResourceReconciler) Pause(ctx context.Context) error

Pause pauses reconciliation of the specified resources.

func (*ResourceReconciler) Reconcile added in v1.15.0

func (r *ResourceReconciler) Reconcile(ctx context.Context) error

Reconcile creates or updates the specified resources.

Directories

Path Synopsis
Run go generate to regenerate this mock.
Run go generate to regenerate this mock.

Jump to

Keyboard shortcuts

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