infrastructure

package
v1.57.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

OnRestore decides the reconciler used on migration.

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 CleanupTerraformerResources added in v1.57.0

func CleanupTerraformerResources(ctx context.Context, tf terraformer.Terraformer) error

CleanupTerraformerResources deletes terraformer artifacts (config, state, secrets).

func GetFlowAnnotationValue added in v1.57.0

func GetFlowAnnotationValue(o v1.Object) bool

GetFlowAnnotationValue returns the boolean value of the expected flow annotation. Returns false if the annotation was not found, if it couldn't be converted to bool, or had a "false" value.

func NewActuator

func NewActuator(mgr manager.Manager, disableProjectedTokenMount bool) infrastructure.Actuator

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

func NewConfigValidator added in v1.29.0

func NewConfigValidator(mgr manager.Manager, awsClientFactory awsclient.Factory, logger logr.Logger) infrastructure.ConfigValidator

NewConfigValidator creates a new ConfigValidator.

func OnDelete added in v1.57.0

OnDelete returns true if the operation should use the Flow deletion for the given cluster.

func OnReconcile added in v1.57.0

func OnReconcile(infra *extensionsv1alpha1.Infrastructure, _ *extensions.Cluster) (bool, error)

OnReconcile returns true if the operation should use the Flow for the given cluster.

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
	// DisableProjectedTokenMount specifies whether the projected token mount shall be disabled for the terraformer.
	// Used for testing only.
	DisableProjectedTokenMount bool
}

AddOptions are options to apply when adding the AWS infrastructure controller to the manager.

type FlowReconciler added in v1.57.0

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

FlowReconciler an implementation of an infrastructure reconciler using native SDKs.

func (*FlowReconciler) Delete added in v1.57.0

Delete deletes the infrastructure resource using the flow reconciler.

func (*FlowReconciler) Reconcile added in v1.57.0

Reconcile reconciles the infrastructure and updates the Infrastructure status (state of the world), the state (input for the next loops) or reports any errors that occurred.

func (*FlowReconciler) Restore added in v1.57.0

Restore implements the restoration of an infrastructure resource during the control plane migration.

type Reconciler added in v1.57.0

type Reconciler interface {
	// Reconcile manages infrastructure resources according to desired spec.
	Reconcile(ctx context.Context, infra *extensionsv1alpha1.Infrastructure, cluster *controller.Cluster) error
	// Delete removes any created infrastructure resource on the provider.
	Delete(ctx context.Context, infra *extensionsv1alpha1.Infrastructure, cluster *controller.Cluster) error
	// Restore restores the infrastructure after a control plane migration. Effectively it performs a recovery of data from the infrastructure.status.state and
	// proceeds to reconcile.
	Restore(ctx context.Context, infra *extensionsv1alpha1.Infrastructure, cluster *controller.Cluster) error
}

Reconciler is an interface for the infrastructure reconciliation.

func NewFlowReconciler added in v1.57.0

func NewFlowReconciler(client client.Client, restConfig *rest.Config, log logr.Logger, projToken bool) Reconciler

NewFlowReconciler creates a new flow reconciler.

type ReconcilerFactory added in v1.57.0

type ReconcilerFactory interface {
	Build(useFlow bool) (Reconciler, error)
}

ReconcilerFactory can construct the different infrastructure reconciler implementations.

type ReconcilerFactoryImpl added in v1.57.0

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

ReconcilerFactoryImpl is an implementation of a ReconcilerFactory

func (ReconcilerFactoryImpl) Build added in v1.57.0

func (f ReconcilerFactoryImpl) Build(useFlow bool) (Reconciler, error)

Build builds the Reconciler according to the arguments.

type SelectorFunc added in v1.57.0

SelectorFunc decides the reconciler used.

type TerraformReconciler added in v1.57.0

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

TerraformReconciler can manage infrastructure resources using Terraformer.

func NewTerraformReconciler added in v1.57.0

func NewTerraformReconciler(client k8sClient.Client, restConfig *rest.Config, log logr.Logger, disableProjectedTokenMount bool) *TerraformReconciler

NewTerraformReconciler returns a new instance of TerraformReconciler.

func (*TerraformReconciler) Delete added in v1.57.0

Delete deletes the infrastructure using Terraformer.

func (*TerraformReconciler) Reconcile added in v1.57.0

Reconcile reconciles infrastructure using Terraformer.

func (*TerraformReconciler) Restore added in v1.57.0

Restore restores the infrastructure after a control plane migration. Effectively it performs a recovery of data from the infrastructure.status.state and proceeds to reconcile.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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