controllers

package
v1.14.3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 44 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 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.

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