genericactuator

package
v1.60.7 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 38 Imported by: 18

Documentation

Index

Constants

View Source
const (
	// McmShootResourceName is the name of the managed resource that contains the Machine Controller Manager
	McmShootResourceName = "extension-worker-mcm-shoot"

	// McmDeploymentName is the name of the deployment that spawn machine-cotroll-manager pods
	McmDeploymentName = "machine-controller-manager"
)
View Source
const GardenPurposeMachineClass = "machineclass"

GardenPurposeMachineClass is a constant for the 'machineclass' value in a label.

Variables

This section is empty.

Functions

func NewActuator

func NewActuator(
	delegateFactory DelegateFactory,
	mcmName string,
	mcmSeedChart,
	mcmShootChart chart.Interface,
	imageVector imagevector.ImageVector,
	chartRendererFactory extensionscontroller.ChartRendererFactory,
) 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.

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.

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 ReplicaCount

type ReplicaCount func() int32

ReplicaCount determines the number of replicas.

type WorkerCredentialsDelegate added in v1.15.0

type WorkerCredentialsDelegate interface {
	// GetMachineControllerManagerCloudCredentials should return the IaaS credentials
	// with the secret keys used by the machine-controller-manager.
	GetMachineControllerManagerCloudCredentials(context.Context) (map[string][]byte, error)
}

WorkerCredentialsDelegate is an interface that can optionally be implemented to be used during the Worker reconciliation to keep all machine class secrets up to date. DEPRECATED: extensions should instead provide credentials only (!) via the machine class field .spec.credentialsSecretRef referencing the Worker's secret reference (spec.SecretRef). This way all machine classes reference the same secret - there is no need anymore to update all machine class secrets. please see [here](https://github.com/gardener/machine-controller-manager/pull/578) for more details

type WorkerDelegate

type WorkerDelegate interface {
	// GetMachineControllerManagerChartValues should return the chart and the values for the machine-controller-manager
	// deployment.
	GetMachineControllerManagerChartValues(context.Context) (map[string]interface{}, error)
	// GetMachineControllerManagerShootChartValues should return the values to render the chart containing resources
	// that are required by the machine-controller-manager inside the shoot cluster itself.
	GetMachineControllerManagerShootChartValues(context.Context) (map[string]interface{}, error)

	// MachineClassKind yields the name of the provider specific machine class.
	MachineClassKind() string
	// MachineClass yields a newly initialized machine class object.
	MachineClass() client.Object
	// MachineClassList yields a newly initialized machine class list object.
	MachineClassList() client.ObjectList
	// 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

	// DeployMachineDependencies is a hook to create external machine dependencies.
	// Deprecated: Use PreReconcileHook() instead.
	// TODO(dkistner): Remove in a future release.
	DeployMachineDependencies(context.Context) error

	// CleanupMachineDependencies is a hook to cleanup external machine dependencies.
	// Deprecated: Use PostReconcileHook() and PostDeleteHook() instead.
	// TODO(dkistner): Remove in a future release.
	CleanupMachineDependencies(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