Help us shape the future of Go! Take the 2026 Go Developer Survey

genericactuator

package
v1.153.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 37 Imported by: 19

Documentation

Index

Constants

View Source
const MaxConcurrentMachineTasks = 50

MaxConcurrentMachineTasks defines the maximum number of machine-related tasks that can run concurrently. A value of 50 was chosen because using more parallel tasks brings a marginal speed increase and risks running into client-side rate limits which could slow down the operations. Once client-side rate limits are dropped this number can be re-evaluated. See also https://github.com/kubernetes-sigs/controller-runtime/pull/3119 for the removal of client-side rate limits in controller-runtime.

Variables

This section is empty.

Functions

func NewActuator

func NewActuator(mgr manager.Manager, gardenCluster cluster.Cluster, delegateFactory DelegateFactory, errorCodeCheckFunc healthcheck.ErrorCodeCheckFunc) worker.Actuator

NewActuator creates a new Actuator that reconciles Worker resources of Gardener's `extensions.gardener.cloud` API group. It provides a default implementation that allows easier integration of providers. If machine-controller-manager should not be managed then only the delegateFactory must be provided.

func ReadMachineConfiguration added in v1.8.0

func ReadMachineConfiguration(pool extensionsv1alpha1.WorkerPool) *machinev1alpha1.MachineConfiguration

ReadMachineConfiguration reads the configuration from worker-pool and returns the corresponding configuration of machine-deployment.

func RestoreWithoutReconcile added in v1.72.0

func RestoreWithoutReconcile(
	ctx context.Context,
	log logr.Logger,
	gardenReader client.Reader,
	seedClient client.Client,
	delegateFactory DelegateFactory,
	worker *extensionsv1alpha1.Worker,
	cluster *extensionscontroller.Cluster,
) error

RestoreWithoutReconcile restores the worker state without calling 'Reconcile'.

Types

type DelegateFactory

type DelegateFactory interface {
	// WorkerDelegate returns a worker delegate interface that is used for the Worker reconciliation
	// based on this generic actuator.
	WorkerDelegate(context.Context, *extensionsv1alpha1.Worker, *extensionscontroller.Cluster) (WorkerDelegate, error)
}

DelegateFactory acts upon Worker resources.

type WorkerDelegate

type WorkerDelegate interface {
	// DeployMachineClasses generates and creates the provider specific machine classes.
	DeployMachineClasses(context.Context) error

	// GenerateMachineDeployments generates the configuration for the desired machine deployments.
	GenerateMachineDeployments(context.Context) (worker.MachineDeployments, error)

	// UpdateMachineImagesStatus will store a list of machine images used by the
	// machines associated with this Worker resource in its provider status.
	// The controller can look up its provider-specific machine image information
	// in case the required version has been removed from the `CloudProfile`.
	UpdateMachineImagesStatus(context.Context) error

	// PreReconcileHook is a hook called at the beginning of the worker reconciliation flow.
	PreReconcileHook(context.Context) error
	// PostReconcileHook is a hook called at the end of the worker reconciliation flow.
	PostReconcileHook(context.Context) error
	// PreDeleteHook is a hook called at the beginning of the worker deletion flow.
	PreDeleteHook(context.Context) error
	// PostDeleteHook is a hook called at the end of the worker deletion flow.
	PostDeleteHook(context.Context) error
}

WorkerDelegate is used for the Worker reconciliation.

Jump to

Keyboard shortcuts

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