Documentation ¶
Index ¶
- Constants
- Variables
- type ConstraintCheck
- type GarbageCollector
- type HealthCheck
- type NewConstraintCheckFunc
- type NewGarbageCollectorFunc
- type NewHealthCheckFunc
- type NewOperationFunc
- type NewWebhookRemediatorFunc
- type Reconciler
- func (r *Reconciler) AddToManager(mgr manager.Manager, gardenCluster cluster.Cluster) error
- func (r *Reconciler) EventHandler() handler.EventHandler
- func (r *Reconciler) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error)
- func (r *Reconciler) ShootPredicate() predicate.Predicate
- type WebhookRemediator
Constants ¶
const ControllerName = "shoot-care"
ControllerName is the name of this controller.
Variables ¶
var ( // NewOperation is used to create a new `operation.Operation` instance. NewOperation = defaultNewOperationFunc // NewHealthCheck is used to create a new Health check instance. NewHealthCheck = defaultNewHealthCheck // NewConstraintCheck is used to create a new Constraint check instance. NewConstraintCheck = defaultNewConstraintCheck // NewGarbageCollector is used to create a new garbage collection instance. NewGarbageCollector = defaultNewGarbageCollector // NewWebhookRemediator is used to create a new webhook remediation instance. NewWebhookRemediator = defaultNewWebhookRemediator )
var RandomDurationWithMetaDuration = utils.RandomDurationWithMetaDuration
RandomDurationWithMetaDuration is an alias for utils.RandomDurationWithMetaDuration.
Functions ¶
This section is empty.
Types ¶
type ConstraintCheck ¶
type ConstraintCheck interface {
Check(ctx context.Context, constraints []gardencorev1beta1.Condition) []gardencorev1beta1.Condition
}
ConstraintCheck is an interface used to perform constraint checks.
type GarbageCollector ¶
GarbageCollector is an interface used to perform garbage collection.
type HealthCheck ¶
type HealthCheck interface {
Check(ctx context.Context, thresholdMapping map[gardencorev1beta1.ConditionType]time.Duration, threshold *metav1.Duration, conditions []gardencorev1beta1.Condition) []gardencorev1beta1.Condition
}
HealthCheck is an interface used to perform health checks.
type NewConstraintCheckFunc ¶
type NewConstraintCheckFunc func(clock clock.Clock, op *operation.Operation, init care.ShootClientInit) ConstraintCheck
NewConstraintCheckFunc is a function used to create a new instance for performing constraint checks.
type NewGarbageCollectorFunc ¶
type NewGarbageCollectorFunc func(op *operation.Operation, init care.ShootClientInit) GarbageCollector
NewGarbageCollectorFunc is a function used to create a new instance to perform garbage collection.
type NewHealthCheckFunc ¶
type NewHealthCheckFunc func(op *operation.Operation, init care.ShootClientInit, clock clock.Clock) HealthCheck
NewHealthCheckFunc is a function used to create a new instance for performing health checks.
type NewOperationFunc ¶
type NewOperationFunc func( ctx context.Context, log logr.Logger, gardenClient client.Client, seedClientSet kubernetes.Interface, shootClientMap clientmap.ClientMap, config *config.GardenletConfiguration, gardenerInfo *gardencorev1beta1.Gardener, gardenClusterIdentity string, secrets map[string]*corev1.Secret, imageVector imagevector.ImageVector, shoot *gardencorev1beta1.Shoot, ) ( *operation.Operation, error, )
NewOperationFunc is a function used to create a new `operation.Operation` instance.
type NewWebhookRemediatorFunc ¶
type NewWebhookRemediatorFunc func(op *operation.Operation, init care.ShootClientInit) WebhookRemediator
NewWebhookRemediatorFunc is a function used to create a new instance to perform webhook remediation.
type Reconciler ¶
type Reconciler struct { GardenClient client.Client SeedClientSet kubernetes.Interface ShootClientMap clientmap.ClientMap Config config.GardenletConfiguration Clock clock.Clock ImageVector imagevector.ImageVector Identity *gardencorev1beta1.Gardener GardenClusterIdentity string SeedName string // contains filtered or unexported fields }
Reconciler reconciles Shoot resources and executes care operations, e.g. health checks or garbage collection.
func (*Reconciler) AddToManager ¶
AddToManager adds Reconciler to the given manager.
func (*Reconciler) EventHandler ¶
func (r *Reconciler) EventHandler() handler.EventHandler
EventHandler returns a handler for Shoot events.
func (*Reconciler) Reconcile ¶
func (r *Reconciler) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error)
Reconcile executes care operations, e.g. health checks or garbage collection.
func (*Reconciler) ShootPredicate ¶
func (r *Reconciler) ShootPredicate() predicate.Predicate
ShootPredicate is a predicate which returns 'true' for create events, and for update events in case the shoot was successfully reconciled.
type WebhookRemediator ¶
WebhookRemediator is an interface used to perform webhook remediation.