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 ¶
Add creates a new Bastion Controller and adds it to the Manager. and Start it when the Manager is Started.
func DefaultPredicates ¶
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.
Click to show internal directories.
Click to hide internal directories.