controllers

package
v0.4.10 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: Apache-2.0 Imports: 50 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(kClient client.Client, log logr.Logger) handler.ToRequestsFunc

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

func AzureClusterToAzureMachinePoolsMapper added in v0.4.6

func AzureClusterToAzureMachinePoolsMapper(c client.Client, scheme *runtime.Scheme, log logr.Logger) (handler.Mapper, 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 AzureManagedClusterToAzureManagedControlPlaneMapper added in v0.4.6

func AzureManagedClusterToAzureManagedControlPlaneMapper(c client.Client, log logr.Logger) (handler.Mapper, 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(c client.Client, scheme *runtime.Scheme, log logr.Logger) (handler.Mapper, 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 IsAgentPoolVMSSNotFoundError added in v0.4.7

func IsAgentPoolVMSSNotFoundError(err error) bool

IsAgentPoolVMSSNotFoundError returns true if the error is a AgentPoolVMSSNotFoundError

func MachinePoolToInfrastructureMapFunc added in v0.4.6

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

MachinePoolToInfrastructureMapFunc returns a handler.ToRequestsFunc 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 AzureMachinePoolReconciler

type AzureMachinePoolReconciler struct {
	client.Client
	Log              logr.Logger
	Scheme           *runtime.Scheme
	Recorder         record.EventRecorder
	ReconcileTimeout time.Duration
}

AzureMachinePoolReconciler reconciles a AzureMachinePool object

func (*AzureMachinePoolReconciler) Annotation

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

Annotation fetches the specific machine annotation.

func (*AzureMachinePoolReconciler) AnnotationJSON

func (r *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 (r *AzureMachinePoolReconciler) Reconcile(req ctrl.Request) (_ ctrl.Result, reterr error)

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

func (*AzureMachinePoolReconciler) SetupWithManager

func (r *AzureMachinePoolReconciler) SetupWithManager(mgr ctrl.Manager, options controller.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
}

AzureManagedClusterReconciler reconciles a AzureManagedCluster object

func (*AzureManagedClusterReconciler) Reconcile added in v0.4.4

func (r *AzureManagedClusterReconciler) Reconcile(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(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
}

AzureManagedControlPlaneReconciler reconciles a AzureManagedControlPlane object

func (*AzureManagedControlPlaneReconciler) Reconcile added in v0.4.4

func (r *AzureManagedControlPlaneReconciler) Reconcile(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(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
}

AzureManagedMachinePoolReconciler reconciles a AzureManagedMachinePool object

func (*AzureManagedMachinePoolReconciler) Reconcile added in v0.4.4

func (r *AzureManagedMachinePoolReconciler) Reconcile(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(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.

Jump to

Keyboard shortcuts

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