care

package
v1.72.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const ControllerName = "shoot-care"

ControllerName is the name of this controller.

Variables

View Source
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
)
View Source
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

type GarbageCollector interface {
	Collect(ctx context.Context)
}

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

func (r *Reconciler) AddToManager(mgr manager.Manager, gardenCluster cluster.Cluster) error

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

type WebhookRemediator interface {
	Remediate(ctx context.Context) error
}

WebhookRemediator is an interface used to perform webhook remediation.

Jump to

Keyboard shortcuts

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