controllers

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 56 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, kClient 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, kClient client.Client, log logr.Logger) handler.MapFunc

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

func AzureManagedClusterToAzureManagedControlPlaneMapper added in v0.4.6

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

AzureManagedClusterToAzureManagedControlPlaneMapper creates a mapping handler to transform AzureManagedClusters into AzureManagedControlPlane. The transform requires AzureManagedCluster to map to the owning Cluster, then from the Cluster, collect the control plane infrastructure reference.

func AzureManagedClusterToAzureManagedMachinePoolsMapper added in v0.4.6

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

AzureManagedClusterToAzureManagedMachinePoolsMapper creates a mapping handler to transform AzureManagedClusters into AzureManagedMachinePools. The transform requires AzureManagedCluster 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 AzureManagedMachinePools.

func AzureManagedControlPlaneToAzureManagedClusterMapper added in v0.5.0

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

AzureManagedControlPlaneToAzureManagedClusterMapper creates a mapping handler to transform AzureManagedClusters into AzureManagedControlPlane. The transform requires AzureManagedCluster to map to the owning Cluster, then from the Cluster, collect the control plane infrastructure reference.

func AzureManagedControlPlaneToAzureManagedMachinePoolsMapper added in v0.5.0

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

AzureManagedControlPlaneToAzureManagedMachinePoolsMapper creates a mapping handler to transform AzureManagedControlPlanes into AzureManagedMachinePools. 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 AzureManagedMachinePools.

func IsAgentPoolVMSSNotFoundError added in v0.4.7

func IsAgentPoolVMSSNotFoundError(err error) bool

IsAgentPoolVMSSNotFoundError returns true if the error is an AgentPoolVMSSNotFoundError.

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 MachinePoolToAzureManagedControlPlaneMapFunc added in v0.5.0

func MachinePoolToAzureManagedControlPlaneMapFunc(ctx context.Context, c client.Client, gvk schema.GroupVersionKind, log logr.Logger) handler.MapFunc

MachinePoolToAzureManagedControlPlaneMapFunc returns a handler.MapFunc that watches for MachinePool events and returns reconciliation requests for a control plane object.

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 AgentPoolVMSSNotFoundError added in v0.4.7

type AgentPoolVMSSNotFoundError struct {
	NodeResourceGroup string
	PoolName          string
}

AgentPoolVMSSNotFoundError represents a reconcile error when the VMSS for an agent pool can't be found.

func NewAgentPoolVMSSNotFoundError added in v0.4.7

func NewAgentPoolVMSSNotFoundError(nodeResourceGroup, poolName string) *AgentPoolVMSSNotFoundError

NewAgentPoolVMSSNotFoundError creates a new AgentPoolVMSSNotFoundError.

func (*AgentPoolVMSSNotFoundError) Error added in v0.4.7

func (*AgentPoolVMSSNotFoundError) Is added in v0.4.7

func (a *AgentPoolVMSSNotFoundError) Is(target error) bool

Is returns true if the target error is an `AgentPoolVMSSNotFoundError`.

type AzureMachinePoolMachineController added in v0.5.0

type AzureMachinePoolMachineController struct {
	client.Client
	Log              logr.Logger
	Scheme           *runtime.Scheme
	Recorder         record.EventRecorder
	ReconcileTimeout time.Duration
	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, log logr.Logger, recorder record.EventRecorder, reconcileTimeout time.Duration, 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
	Log              logr.Logger
	Scheme           *runtime.Scheme
	Recorder         record.EventRecorder
	ReconcileTimeout time.Duration
	WatchFilterValue string
	// contains filtered or unexported fields
}

AzureMachinePoolReconciler reconciles an AzureMachinePool object.

func NewAzureMachinePoolReconciler added in v0.4.11

func NewAzureMachinePoolReconciler(client client.Client, log logr.Logger, recorder record.EventRecorder, reconcileTimeout time.Duration, 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 AzureManagedClusterReconciler added in v0.4.4

type AzureManagedClusterReconciler struct {
	client.Client
	Log              logr.Logger
	Recorder         record.EventRecorder
	ReconcileTimeout time.Duration
	WatchFilterValue string
}

AzureManagedClusterReconciler reconciles an AzureManagedCluster object.

func (*AzureManagedClusterReconciler) Reconcile added in v0.4.4

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

Reconcile idempotently gets, creates, and updates a managed cluster.

func (*AzureManagedClusterReconciler) SetupWithManager added in v0.4.4

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

SetupWithManager initializes this controller with a manager.

type AzureManagedControlPlaneReconciler added in v0.4.4

type AzureManagedControlPlaneReconciler struct {
	client.Client
	Log              logr.Logger
	Recorder         record.EventRecorder
	ReconcileTimeout time.Duration
	WatchFilterValue string
}

AzureManagedControlPlaneReconciler reconciles an AzureManagedControlPlane object.

func (*AzureManagedControlPlaneReconciler) Reconcile added in v0.4.4

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

Reconcile idempotently gets, creates, and updates a managed control plane.

func (*AzureManagedControlPlaneReconciler) SetupWithManager added in v0.4.4

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

SetupWithManager initializes this controller with a manager.

type AzureManagedMachinePoolReconciler added in v0.4.4

type AzureManagedMachinePoolReconciler struct {
	client.Client
	Log              logr.Logger
	Recorder         record.EventRecorder
	ReconcileTimeout time.Duration
	WatchFilterValue string
	// contains filtered or unexported fields
}

AzureManagedMachinePoolReconciler reconciles an AzureManagedMachinePool object.

func NewAzureManagedMachinePoolReconciler added in v0.4.11

func NewAzureManagedMachinePoolReconciler(client client.Client, log logr.Logger, recorder record.EventRecorder, reconcileTimeout time.Duration, watchFilterValue string) *AzureManagedMachinePoolReconciler

NewAzureManagedMachinePoolReconciler returns a new AzureManagedMachinePoolReconciler instance.

func (*AzureManagedMachinePoolReconciler) Reconcile added in v0.4.4

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

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

func (*AzureManagedMachinePoolReconciler) SetupWithManager added in v0.4.4

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

SetupWithManager initializes this controller with a manager.

type NodeLister added in v0.4.4

type NodeLister interface {
	ListInstances(context.Context, string, string) ([]compute.VirtualMachineScaleSetVM, error)
	List(context.Context, string) ([]compute.VirtualMachineScaleSet, error)
}

NodeLister is a service interface for returning generic lists.

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