controllers

package
v0.4.5-rc4 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudStackAGReconciliationRunner

type CloudStackAGReconciliationRunner struct {
	csCtrlrUtils.ReconciliationRunner
	ReconciliationSubject *infrav1.CloudStackAffinityGroup
}

CloudStackAGReconciliationRunner is a ReconciliationRunner with extensions specific to CloudStack affinity group reconciliation.

func NewCSAGReconciliationRunner

func NewCSAGReconciliationRunner() *CloudStackAGReconciliationRunner

Initialize a new CloudStackAffinityGroup reconciliation runner with concrete types and initialized member fields.

func (*CloudStackAGReconciliationRunner) Reconcile

func (*CloudStackAGReconciliationRunner) ReconcileDelete

func (r *CloudStackAGReconciliationRunner) ReconcileDelete() (ctrl.Result, error)

type CloudStackAffinityGroupReconciler

type CloudStackAffinityGroupReconciler struct {
	csCtrlrUtils.ReconcilerBase
}

CloudStackAGReconciler is the base reconciler to adapt to k8s.

func (*CloudStackAffinityGroupReconciler) Reconcile

func (reconciler *CloudStackAffinityGroupReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*CloudStackAffinityGroupReconciler) SetupWithManager

func (reconciler *CloudStackAffinityGroupReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type CloudStackClusterReconciler

type CloudStackClusterReconciler struct {
	csCtrlrUtils.ReconcilerBase
}

CloudStackClusterReconciler is the k8s controller manager's interface to reconcile a CloudStackCluster. This is primarily to adapt to k8s.

func (*CloudStackClusterReconciler) Reconcile

func (reconciler *CloudStackClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (retRes ctrl.Result, retErr error)

Reconcile is the method k8s will call upon a reconciliation request.

func (*CloudStackClusterReconciler) SetupWithManager

func (reconciler *CloudStackClusterReconciler) SetupWithManager(mgr ctrl.Manager) error

Called in main, this registers the cluster reconciler to the CAPI controller manager.

type CloudStackClusterReconciliationRunner

type CloudStackClusterReconciliationRunner struct {
	csCtrlrUtils.ReconciliationRunner
	Zones                 *infrav1.CloudStackZoneList
	ReconciliationSubject *infrav1.CloudStackCluster
}

CloudStackClusterReconciliationRunner is a ReconciliationRunner with extensions specific to CloudStackClusters. The runner does the actual reconciliation.

func NewCSClusterReconciliationRunner

func NewCSClusterReconciliationRunner() *CloudStackClusterReconciliationRunner

Initialize a new CloudStackCluster reconciliation runner with concrete types and initialized member fields.

func (*CloudStackClusterReconciliationRunner) Reconcile

func (r *CloudStackClusterReconciliationRunner) Reconcile() (res ctrl.Result, reterr error)

Reconcile actually reconciles the CloudStackCluster.

func (*CloudStackClusterReconciliationRunner) ReconcileDelete

func (r *CloudStackClusterReconciliationRunner) ReconcileDelete() (ctrl.Result, error)

ReconcileDelete cleans up resources used by the cluster and finally removes the CloudStackCluster's finalizers.

func (*CloudStackClusterReconciliationRunner) SetFailureDomains

func (r *CloudStackClusterReconciliationRunner) SetFailureDomains() (ctrl.Result, error)

SetFailureDomains sets failure domains to be used for CAPI machine placement.

func (*CloudStackClusterReconciliationRunner) SetReady

SetReady adds a finalizer and sets the cluster status to ready.

func (*CloudStackClusterReconciliationRunner) VerifyZoneCRDs

func (r *CloudStackClusterReconciliationRunner) VerifyZoneCRDs() (ctrl.Result, error)

CheckZoneDetails verifies the Zone CRDs found match against those requested.

type CloudStackIsoNetReconciler

type CloudStackIsoNetReconciler struct {
	csCtrlrUtils.ReconcilerBase
}

CloudStackIsoNetReconciler reconciles a CloudStackZone object

func (*CloudStackIsoNetReconciler) Reconcile

func (reconciler *CloudStackIsoNetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, retErr error)

func (*CloudStackIsoNetReconciler) SetupWithManager

func (reconciler *CloudStackIsoNetReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type CloudStackIsoNetReconciliationRunner

type CloudStackIsoNetReconciliationRunner struct {
	csCtrlrUtils.ReconciliationRunner
	Zone                  *infrav1.CloudStackZone
	ReconciliationSubject *infrav1.CloudStackIsolatedNetwork
}

CloudStackZoneReconciliationRunner is a ReconciliationRunner with extensions specific to CloudStack isolated network reconciliation.

func NewCSIsoNetReconciliationRunner

func NewCSIsoNetReconciliationRunner() *CloudStackIsoNetReconciliationRunner

Initialize a new CloudStackIsoNet reconciliation runner with concrete types and initialized member fields.

func (*CloudStackIsoNetReconciliationRunner) Reconcile

func (r *CloudStackIsoNetReconciliationRunner) Reconcile() (retRes ctrl.Result, retErr error)

func (*CloudStackIsoNetReconciliationRunner) ReconcileDelete

func (r *CloudStackIsoNetReconciliationRunner) ReconcileDelete() (retRes ctrl.Result, retErr error)

type CloudStackMachineReconciler

type CloudStackMachineReconciler struct {
	utils.ReconcilerBase
}

CloudStackMachineReconciler reconciles a CloudStackMachine object

func (*CloudStackMachineReconciler) Reconcile

func (reconciler *CloudStackMachineReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res 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 (*CloudStackMachineReconciler) SetupWithManager

func (reconciler *CloudStackMachineReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager registers the machine reconciler to the CAPI controller manager.

type CloudStackMachineReconciliationRunner

type CloudStackMachineReconciliationRunner struct {
	utils.ReconciliationRunner
	ReconciliationSubject *infrav1.CloudStackMachine
	CAPIMachine           *capiv1.Machine
	StateChecker          *infrav1.CloudStackMachineStateChecker
	Zones                 *infrav1.CloudStackZoneList
	FailureDomain         *infrav1.CloudStackZone
	IsoNet                *infrav1.CloudStackIsolatedNetwork
	AffinityGroup         *infrav1.CloudStackAffinityGroup
}

CloudStackMachineReconciliationRunner is a ReconciliationRunner with extensions specific to CloudStack machine reconciliation.

func NewCSMachineReconciliationRunner

func NewCSMachineReconciliationRunner() *CloudStackMachineReconciliationRunner

Initialize a new CloudStackMachine reconciliation runner with concrete types and initialized member fields.

func (*CloudStackMachineReconciliationRunner) AddToLBIfNeeded

func (r *CloudStackMachineReconciliationRunner) AddToLBIfNeeded() (retRes ctrl.Result, reterr error)

AddToLBIfNeeded adds instance to load balancer if it is a control plane in an isolated network.

func (*CloudStackMachineReconciliationRunner) ConsiderAffinity

func (r *CloudStackMachineReconciliationRunner) ConsiderAffinity() (ctrl.Result, error)

ConsiderAffinity sets machine affinity if needed. It also creates or gets an affinity group CRD if required and checks it for readiness.

func (*CloudStackMachineReconciliationRunner) GetOrCreateMachineStateChecker

func (r *CloudStackMachineReconciliationRunner) GetOrCreateMachineStateChecker() (retRes ctrl.Result, reterr error)

GetOrCreateMachineStateChecker creates or gets CloudStackMachineStateChecker object.

func (*CloudStackMachineReconciliationRunner) GetOrCreateVMInstance

func (r *CloudStackMachineReconciliationRunner) GetOrCreateVMInstance() (retRes ctrl.Result, reterr error)

GetOrCreateVMInstance creates or gets a VM instance. Implicitly it also fetches its bootstrap secret in order to create said instance.

func (*CloudStackMachineReconciliationRunner) Reconcile

func (r *CloudStackMachineReconciliationRunner) Reconcile() (retRes ctrl.Result, reterr error)

func (*CloudStackMachineReconciliationRunner) ReconcileDelete

func (r *CloudStackMachineReconciliationRunner) ReconcileDelete() (retRes ctrl.Result, reterr error)

func (*CloudStackMachineReconciliationRunner) RequeueIfInstanceNotRunning

func (r *CloudStackMachineReconciliationRunner) RequeueIfInstanceNotRunning() (retRes ctrl.Result, reterr error)

ConfirmVMStatus checks the Instance's status for running state and requeues otherwise.

func (*CloudStackMachineReconciliationRunner) SetFailureDomainOnCSMachine

func (r *CloudStackMachineReconciliationRunner) SetFailureDomainOnCSMachine() (retRes ctrl.Result, reterr error)

SetFailureDomainOnCSMachine sets the failure domain the machine should launch in.

type CloudStackMachineStateCheckerReconciler

type CloudStackMachineStateCheckerReconciler struct {
	csCtrlrUtils.ReconcilerBase
}

CloudStackMachineStateCheckerReconciler reconciles a CloudStackMachineStateChecker object

func (*CloudStackMachineStateCheckerReconciler) Reconcile

func (*CloudStackMachineStateCheckerReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type CloudStackMachineStateCheckerReconciliationRunner

type CloudStackMachineStateCheckerReconciliationRunner struct {
	csCtrlrUtils.ReconciliationRunner
	MachineStateCheckers  *infrav1.CloudStackMachineStateCheckerList
	ReconciliationSubject *infrav1.CloudStackMachineStateChecker
	CAPIMachine           *capiv1.Machine
	CSMachine             *infrav1.CloudStackMachine
}

CloudStackMachineStateCheckerReconciliationRunner is a ReconciliationRunner with extensions specific to CloudStack machine state checker reconciliation.

func NewCSMachineStateCheckerReconciliationRunner

func NewCSMachineStateCheckerReconciliationRunner() *CloudStackMachineStateCheckerReconciliationRunner

Initialize a new CloudStackMachineStateChecker reconciliation runner with concrete types and initialized member fields.

func (*CloudStackMachineStateCheckerReconciliationRunner) Reconcile

func (*CloudStackMachineStateCheckerReconciliationRunner) ReconcileDelete

type CloudStackZoneReconciler

type CloudStackZoneReconciler struct {
	csCtrlrUtils.ReconcilerBase
}

CloudStackZoneReconciler reconciles a CloudStackZone object

func (*CloudStackZoneReconciler) Reconcile

func (reconciler *CloudStackZoneReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, retErr error)

Reconciler Reconcile adapts the runner to the runner to what k8s expects.

func (*CloudStackZoneReconciler) SetupWithManager

func (reconciler *CloudStackZoneReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type CloudStackZoneReconciliationRunner

type CloudStackZoneReconciliationRunner struct {
	csCtrlrUtils.ReconciliationRunner
	Zones                 *infrav1.CloudStackZoneList
	ReconciliationSubject *infrav1.CloudStackZone
	IsoNet                *infrav1.CloudStackIsolatedNetwork
}

CloudStackZoneReconciliationRunner is a ReconciliationRunner with extensions specific to CloudStack zone reconciliation.

func NewCSZoneReconciliationRunner

func NewCSZoneReconciliationRunner() *CloudStackZoneReconciliationRunner

Initialize a new CloudStackZone reconciliation runner with concrete types and initialized member fields.

func (*CloudStackZoneReconciliationRunner) Reconcile

func (r *CloudStackZoneReconciliationRunner) Reconcile() (retRes ctrl.Result, reterr error)

Reconcile attempts to move the state of CRs to the requested state.

func (*CloudStackZoneReconciliationRunner) ReconcileDelete

func (r *CloudStackZoneReconciliationRunner) ReconcileDelete() (retRes ctrl.Result, reterr error)

The CloudStackZone only fetches information, and in some cases creates CloudStackIsolatedNetwork CRDs. Deletion does not require cleanup, but should not occur until any owned CRDs are deleted.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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