controller

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Overview

Package controller contains the HarvesterCluster controller logic.

Package controller contains the HarvesterMachine controller logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterScope

type ClusterScope struct {
	Cluster          *clusterv1.Cluster
	HarvesterCluster *infrav1.HarvesterCluster
	Logger           logr.Logger
	Ctx              context.Context
	HarvesterClient  lbclient.Interface
	ReconcileClient  client.Client
}

ClusterScope is a struct that contains the necessary data needed for a HarvesterCluster controller.

type HarvesterClusterReconciler

type HarvesterClusterReconciler struct {
	client.Client

	Scheme *runtime.Scheme
}

HarvesterClusterReconciler reconciles a HarvesterCluster object.

func (*HarvesterClusterReconciler) Reconcile

Reconcile reads that state of the cluster for a HarvesterCluster object and makes changes based on the state read.

func (*HarvesterClusterReconciler) ReconcileDelete

func (r *HarvesterClusterReconciler) ReconcileDelete(scope *ClusterScope) (ctrl.Result, error)

ReconcileDelete is the part of the Reconcialiation that deletes a HarvesterCluster and everything which depends on it.

func (*HarvesterClusterReconciler) ReconcileNormal

func (r *HarvesterClusterReconciler) ReconcileNormal(scope *ClusterScope) (res ctrl.Result, err error)

ReconcileNormal is the reconciliation function when not deleting the HarvesterCluster instance.

func (*HarvesterClusterReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type HarvesterMachineReconciler

type HarvesterMachineReconciler struct {
	client.Client

	Scheme *runtime.Scheme
}

HarvesterMachineReconciler reconciles a HarvesterMachine object.

func (*HarvesterMachineReconciler) Reconcile

func (r *HarvesterMachineReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, rerr error)

Reconcile reconciles the HarvesterMachine object.

func (*HarvesterMachineReconciler) ReconcileDelete

func (r *HarvesterMachineReconciler) ReconcileDelete(hvScope Scope) (res ctrl.Result, rerr error)

ReconcileDelete deletes a HarvesterMachine with all its dependencies.

func (*HarvesterMachineReconciler) ReconcileNormal

func (r *HarvesterMachineReconciler) ReconcileNormal(hvScope *Scope) (res reconcile.Result, rerr error)

ReconcileNormal reconciles the HarvesterMachine object.

func (*HarvesterMachineReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type Scope

type Scope struct {
	Ctx              context.Context
	Cluster          *clusterv1.Cluster
	Machine          *clusterv1.Machine
	HarvesterCluster *infrav1.HarvesterCluster
	HarvesterMachine *infrav1.HarvesterMachine
	HarvesterClient  *harvclient.Clientset
	ReconcilerClient client.Client
	Logger           *logr.Logger
}

Scope stores context data for the reconciler.

Jump to

Keyboard shortcuts

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