bastion

package
v1.96.6 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 24 Imported by: 14

Documentation

Index

Constants

View Source
const (
	// FinalizerName is the bastion controller finalizer.
	FinalizerName = "extensions.gardener.cloud/bastion"
	// ControllerName is the name of the controller
	ControllerName = "bastion"
)

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager, args AddArgs) error

Add creates a new Bastion Controller and adds it to the Manager. and Start it when the Manager is Started.

func DefaultPredicates

func DefaultPredicates(ignoreOperationAnnotation bool) []predicate.Predicate

DefaultPredicates returns the default predicates for a bastion reconciler.

func NewReconciler

func NewReconciler(mgr manager.Manager, actuator Actuator, configValidator ConfigValidator) reconcile.Reconciler

NewReconciler creates a new reconcile.Reconciler that reconciles bastion resources of Gardener's `extensions.gardener.cloud` API group.

Types

type Actuator

type Actuator interface {
	// Reconcile reconciles the Bastion.
	Reconcile(context.Context, logr.Logger, *extensionsv1alpha1.Bastion, *extensionscontroller.Cluster) error
	// Delete deletes the Bastion.
	Delete(context.Context, logr.Logger, *extensionsv1alpha1.Bastion, *extensionscontroller.Cluster) error
	// ForceDelete forcefully deletes the Bastion.
	ForceDelete(context.Context, logr.Logger, *extensionsv1alpha1.Bastion, *extensionscontroller.Cluster) error
}

Actuator acts upon Bastion resources.

type AddArgs

type AddArgs struct {
	// Actuator is a Bastion actuator.
	Actuator Actuator
	// ConfigValidator is a bastion config validator.
	ConfigValidator ConfigValidator
	// ControllerOptions are the controller options used for creating a controller.
	// The options.Reconciler is always overridden with a reconciler created from the
	// given actuator.
	ControllerOptions controller.Options
	// Predicates are the predicates to use.
	// If unset, GenerationChangedPredicate will be used.
	Predicates []predicate.Predicate
	// Type is the type of the resource considered for reconciliation.
	Type string
}

AddArgs are arguments for adding a Bastion controller to a manager.

type ConfigValidator added in v1.51.0

type ConfigValidator interface {
	// Validate validates the provider config of the given bastion and cluster resources used by Bastion.
	// If the returned error list is non-empty, the reconciliation will fail with an error.
	// This error will have the error code ERR_CONFIGURATION_PROBLEM, unless there is at least one error in the list
	// that has its ErrorType field set to field.ErrorTypeInternal.
	Validate(ctx context.Context, bastion *extensionsv1alpha1.Bastion, cluster *extensions.Cluster) field.ErrorList
}

ConfigValidator validates the provider config of bastion resource with the cloud provider.

Jump to

Keyboard shortcuts

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