Documentation ¶
Index ¶
- Variables
- func AddToManager(ctx context.Context, mgr manager.Manager) error
- func AddToManagerWithOptions(ctx context.Context, mgr manager.Manager, opts AddOptions) error
- func CleanupTerraformerResources(ctx context.Context, tf terraformer.Terraformer) error
- func GetFlowAnnotationValue(o v1.Object) bool
- func NewActuator(mgr manager.Manager, disableProjectedTokenMount bool) infrastructure.Actuator
- func NewConfigValidator(mgr manager.Manager, awsClientFactory awsclient.Factory, logger logr.Logger) infrastructure.ConfigValidator
- func OnDelete(infra *extensionsv1alpha1.Infrastructure, _ *extensions.Cluster) (bool, error)
- func OnReconcile(infra *extensionsv1alpha1.Infrastructure, _ *extensions.Cluster) (bool, error)
- type AddOptions
- type FlowReconciler
- func (f *FlowReconciler) Delete(ctx context.Context, infra *extensionsv1alpha1.Infrastructure, ...) error
- func (f *FlowReconciler) Reconcile(ctx context.Context, infra *extensionsv1alpha1.Infrastructure, ...) error
- func (f *FlowReconciler) Restore(ctx context.Context, infra *extensionsv1alpha1.Infrastructure, ...) error
- type Reconciler
- type ReconcilerFactory
- type ReconcilerFactoryImpl
- type SelectorFunc
- type TerraformReconciler
- func (t *TerraformReconciler) Delete(ctx context.Context, infra *extensionsv1alpha1.Infrastructure, ...) error
- func (t *TerraformReconciler) Reconcile(ctx context.Context, infra *extensionsv1alpha1.Infrastructure, ...) error
- func (t *TerraformReconciler) Restore(ctx context.Context, infra *extensionsv1alpha1.Infrastructure, ...) error
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultAddOptions are the default AddOptions for AddToManager. DefaultAddOptions = AddOptions{} )
var OnRestore = OnDelete
OnRestore decides the reconciler used on migration.
Functions ¶
func AddToManager ¶
AddToManager adds a controller with the default Options.
func AddToManagerWithOptions ¶
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
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
func OnDelete(infra *extensionsv1alpha1.Infrastructure, _ *extensions.Cluster) (bool, error)
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 // ExtensionClass defines the extension class this extension is responsible for. ExtensionClass extensionsv1alpha1.ExtensionClass }
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
func (f *FlowReconciler) Delete(ctx context.Context, infra *extensionsv1alpha1.Infrastructure, c *controller.Cluster) error
Delete deletes the infrastructure resource using the flow reconciler.
func (*FlowReconciler) Reconcile ¶ added in v1.57.0
func (f *FlowReconciler) Reconcile(ctx context.Context, infra *extensionsv1alpha1.Infrastructure, c *controller.Cluster) error
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
func (f *FlowReconciler) Restore(ctx context.Context, infra *extensionsv1alpha1.Infrastructure, cluster *controller.Cluster) error
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
type SelectorFunc func(*extensionsv1alpha1.Infrastructure, *extensions.Cluster) (bool, error)
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
func (t *TerraformReconciler) Delete(ctx context.Context, infra *extensionsv1alpha1.Infrastructure, c *extensions.Cluster) error
Delete deletes the infrastructure using Terraformer.
func (*TerraformReconciler) Reconcile ¶ added in v1.57.0
func (t *TerraformReconciler) Reconcile(ctx context.Context, infra *extensionsv1alpha1.Infrastructure, cluster *controller.Cluster) error
Reconcile reconciles infrastructure using Terraformer.
func (*TerraformReconciler) Restore ¶ added in v1.57.0
func (t *TerraformReconciler) Restore(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.