worker

package
v1.54.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultAddOptions are the default AddOptions for AddToManager.
	DefaultAddOptions = AddOptions{}
)

Functions

func AddToManager

func AddToManager(ctx context.Context, mgr manager.Manager) error

AddToManager adds a controller with the default Options.

func AddToManagerWithOptions

func AddToManagerWithOptions(ctx context.Context, mgr manager.Manager, opts AddOptions) error

AddToManagerWithOptions adds a controller with the given Options to the given manager. The opts.Reconciler is being set with a newly instantiated actuator.

func EnsureUniformMachineImages added in v1.52.0

func EnsureUniformMachineImages(images []api.MachineImage, definitions []gardencorev1beta1.CapabilityDefinition) []api.MachineImage

EnsureUniformMachineImages ensures that all machine images are in the same format, either with or without Capabilities.

func NewActuator

func NewActuator(mgr manager.Manager, gardenCluster cluster.Cluster) worker.Actuator

NewActuator creates a new Actuator that updates the status of the handled WorkerPoolConfigs.

func NewWorkerDelegate

func NewWorkerDelegate(
	seedClient client.Client,
	scheme *runtime.Scheme,

	seedChartApplier gardener.ChartApplier,

	worker *extensionsv1alpha1.Worker,
	cluster *extensionscontroller.Cluster,
	openstackClient openstackclient.Factory,
) (genericactuator.WorkerDelegate, error)

NewWorkerDelegate creates a new context for a worker reconciliation.

func NormalizeLabelsForMachineClass added in v1.30.0

func NormalizeLabelsForMachineClass(in map[string]string) map[string]string

NormalizeLabelsForMachineClass because metadata in OpenStack resources do not allow for certain characters that present in k8s labels e.g. "/", normalize the label by replacing illegal characters with "-"

Types

type AddOptions

type AddOptions struct {
	// Controller are the controller.Options.
	Controller controller.Options
	// IgnoreOperationAnnotation specifies whether to ignore the operation annotation or not.
	IgnoreOperationAnnotation bool
	// GardenCluster is the garden cluster object.
	GardenCluster cluster.Cluster
	// ExtensionClasses defines the extension classes this extension is responsible for.
	ExtensionClasses []extensionsv1alpha1.ExtensionClass
	// SelfHostedShootCluster indicates whether the extension runs in an self-hosted shoot cluster.
	SelfHostedShootCluster bool
}

AddOptions are options to apply when adding the OpenStack worker controller to the manager.

type WorkerDelegate added in v1.53.0

type WorkerDelegate struct {
	// contains filtered or unexported fields
}

WorkerDelegate is a delegate for the worker actuator that contains all information needed to reconcile a worker.

func (*WorkerDelegate) ClusterTechnicalName added in v1.53.0

func (w *WorkerDelegate) ClusterTechnicalName() string

ClusterTechnicalName returns the technical name of the cluster this worker belongs.

func (*WorkerDelegate) DeployMachineClasses added in v1.53.0

func (w *WorkerDelegate) DeployMachineClasses(ctx context.Context) error

DeployMachineClasses generates and creates the OpenStack specific machine classes.

func (*WorkerDelegate) GenerateMachineDeployments added in v1.53.0

func (w *WorkerDelegate) GenerateMachineDeployments(ctx context.Context) (worker.MachineDeployments, error)

GenerateMachineDeployments generates the configuration for the desired machine deployments.

func (*WorkerDelegate) GetMachineClasses added in v1.53.0

func (w *WorkerDelegate) GetMachineClasses() []map[string]any

GetMachineClasses returns the slice of machine classes contained inside the worker delegate. Introduced for Unit-testing.

func (*WorkerDelegate) MachineClass added in v1.53.0

func (w *WorkerDelegate) MachineClass() client.Object

MachineClass yields a newly initialized machine class object.

func (*WorkerDelegate) MachineClassKind added in v1.53.0

func (w *WorkerDelegate) MachineClassKind() string

MachineClassKind yields the name of the machine class kind used by OpenStack provider.

func (*WorkerDelegate) MachineClassList added in v1.53.0

func (w *WorkerDelegate) MachineClassList() client.ObjectList

MachineClassList yields a newly initialized MachineClassList object.

func (*WorkerDelegate) PostDeleteHook added in v1.53.0

func (w *WorkerDelegate) PostDeleteHook(ctx context.Context) error

PostDeleteHook implements genericactuator.WorkerDelegate.

func (*WorkerDelegate) PostReconcileHook added in v1.53.0

func (w *WorkerDelegate) PostReconcileHook(ctx context.Context) error

PostReconcileHook implements genericactuator.WorkerDelegate.

func (*WorkerDelegate) PreDeleteHook added in v1.53.0

func (w *WorkerDelegate) PreDeleteHook(_ context.Context) error

PreDeleteHook implements genericactuator.WorkerDelegate.

func (*WorkerDelegate) PreReconcileHook added in v1.53.0

func (w *WorkerDelegate) PreReconcileHook(ctx context.Context) error

PreReconcileHook implements genericactuator.WorkerDelegate.

func (*WorkerDelegate) UpdateMachineImagesStatus added in v1.53.0

func (w *WorkerDelegate) UpdateMachineImagesStatus(ctx context.Context) error

UpdateMachineImagesStatus updates the worker provider status with the machine images used in the worker spec.

Jump to

Keyboard shortcuts

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