Documentation ¶
Index ¶
- Constants
- Variables
- func IsShootManagedByThisGardenlet(shoot *gardencorev1beta1.Shoot, gc *config.GardenletConfiguration) bool
- func NewCareReconciler(gardenClient client.Client, seedClientSet kubernetes.Interface, ...) reconcile.Reconciler
- func NewMigrationReconciler(gardenClient client.Client, config *config.GardenletConfiguration) reconcile.Reconciler
- func NewShootReconciler(gardenClient client.Client, seedClientSet kubernetes.Interface, ...) reconcile.Reconciler
- type ConstraintCheck
- type Controller
- type GarbageCollector
- type HealthCheck
- type NewConstraintCheckFunc
- type NewGarbageCollectorFunc
- type NewHealthCheckFunc
- type NewOperationFunc
- type NewWebhookRemediatorFunc
- type WebhookRemediator
Constants ¶
const ControllerName = "shoot"
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 )
Functions ¶
func IsShootManagedByThisGardenlet ¶ added in v1.40.0
func IsShootManagedByThisGardenlet(shoot *gardencorev1beta1.Shoot, gc *config.GardenletConfiguration) bool
IsShootManagedByThisGardenlet checks if the given shoot is managed by this gardenlet by comparing it with the seed name from the GardenletConfiguration.
func NewCareReconciler ¶ added in v1.20.4
func NewCareReconciler( gardenClient client.Client, seedClientSet kubernetes.Interface, shootClientMap clientmap.ClientMap, imageVector imagevector.ImageVector, identity *gardencorev1beta1.Gardener, gardenClusterIdentity string, config *config.GardenletConfiguration, ) reconcile.Reconciler
NewCareReconciler returns an implementation of reconcile.Reconciler which is dedicated to execute care operations on shoots, e.g., health checks or garbage collection.
func NewMigrationReconciler ¶ added in v1.39.0
func NewMigrationReconciler(gardenClient client.Client, config *config.GardenletConfiguration) reconcile.Reconciler
NewMigrationReconciler returns an implementation of reconcile.Reconciler that forces the shoot's restoration to this seed during control plane migration if the preparation for migration in the source seed is not finished after a certain grace period and is considered unlikely to succeed ("bad case" scenario).
func NewShootReconciler ¶ added in v1.35.0
func NewShootReconciler( gardenClient client.Client, seedClientSet kubernetes.Interface, shootClientMap clientmap.ClientMap, recorder record.EventRecorder, imageVector imagevector.ImageVector, identity *gardencorev1beta1.Gardener, gardenClusterIdentity string, config *config.GardenletConfiguration, ) reconcile.Reconciler
NewShootReconciler returns a reconciler that implements the main shoot reconciliation logic, i.e creation, hibernation, migration and deletion.
Types ¶
type ConstraintCheck ¶ added in v1.16.0
type ConstraintCheck interface {
Check(ctx context.Context, constraints []gardencorev1beta1.Condition) []gardencorev1beta1.Condition
}
ConstraintCheck is an interface used to perform constraint checks.
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller controls Shoots.
func NewShootController ¶
func NewShootController( ctx context.Context, log logr.Logger, gardenCluster cluster.Cluster, seedClientSet kubernetes.Interface, shootClientMap clientmap.ClientMap, config *config.GardenletConfiguration, identity *gardencorev1beta1.Gardener, gardenClusterIdentity string, imageVector imagevector.ImageVector, ) ( *Controller, error, )
NewShootController takes a Kubernetes client for the Garden clusters <k8sGardenClient>, a struct holding information about the acting Gardener, a <shootInformer>, and a <recorder> for event recording. It creates a new Gardener controller.
type GarbageCollector ¶ added in v1.16.0
GarbageCollector is an interface used to perform garbage collection.
type HealthCheck ¶ added in v1.16.0
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 ¶ added in v1.16.0
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 ¶ added in v1.16.0
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 ¶ added in v1.16.0
type NewHealthCheckFunc func(op *operation.Operation, init care.ShootClientInit) HealthCheck
NewHealthCheckFunc is a function used to create a new instance for performing health checks.
type NewOperationFunc ¶ added in v1.16.0
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 ¶ added in v1.50.0
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 WebhookRemediator ¶ added in v1.50.0
WebhookRemediator is an interface used to perform webhook remediation.