Documentation ¶
Index ¶
- Constants
- Variables
- type HealthCheck
- type NewHealthCheckFunc
- type Reconciler
- func (r *Reconciler) AddToManager(ctx context.Context, mgr manager.Manager, ...) error
- func (r *Reconciler) IsSystemComponent() predicate.Predicate
- func (r *Reconciler) MapManagedResourceToSeed(_ context.Context, _ logr.Logger, _ client.Reader, _ client.Object) []reconcile.Request
- func (r *Reconciler) Reconcile(reconcileCtx context.Context, req reconcile.Request) (reconcile.Result, error)
- func (r *Reconciler) SeedPredicate() predicate.Predicate
- type SeedConditions
Constants ¶
const ControllerName = "seed-care"
ControllerName is the name of this controller.
Variables ¶
var ( // NewSeed is used to create a new `operation.Operation` instance. NewSeed = defaultNewSeedObjectFunc // NewHealthCheck is used to create a new Health check instance. NewHealthCheck = defaultNewHealthCheck )
Functions ¶
This section is empty.
Types ¶
type HealthCheck ¶
type HealthCheck interface {
Check(ctx context.Context, condition SeedConditions) []gardencorev1beta1.Condition
}
HealthCheck is an interface used to perform health checks.
func NewHealth ¶ added in v1.79.0
func NewHealth( seed *gardencorev1beta1.Seed, seedClient client.Client, clock clock.Clock, namespace *string, seedIsGarden bool, loggingEnabled bool, conditionThresholds map[gardencorev1beta1.ConditionType]time.Duration, ) HealthCheck
NewHealth creates a new Health instance with the given parameters.
type NewHealthCheckFunc ¶
type NewHealthCheckFunc func(*gardencorev1beta1.Seed, client.Client, clock.Clock, *string, bool, bool, map[gardencorev1beta1.ConditionType]time.Duration) HealthCheck
NewHealthCheckFunc is a function used to create a new instance for performing health checks.
type Reconciler ¶
type Reconciler struct { GardenClient client.Client SeedClient client.Client Config config.SeedCareControllerConfiguration Clock clock.Clock Namespace *string SeedName string LoggingEnabled bool }
Reconciler reconciles Seed resources and executes health check operations.
func (*Reconciler) AddToManager ¶
func (r *Reconciler) AddToManager(ctx context.Context, mgr manager.Manager, gardenCluster, seedCluster cluster.Cluster) error
AddToManager adds Reconciler to the given manager.
func (*Reconciler) IsSystemComponent ¶
func (r *Reconciler) IsSystemComponent() predicate.Predicate
IsSystemComponent returns a predicate which evaluates to true in case the gardener.cloud/role=system-component label is present.
func (*Reconciler) MapManagedResourceToSeed ¶
func (r *Reconciler) MapManagedResourceToSeed(_ context.Context, _ logr.Logger, _ client.Reader, _ client.Object) []reconcile.Request
MapManagedResourceToSeed is a mapper.MapFunc for mapping a ManagedResource to the owning Seed.
func (*Reconciler) Reconcile ¶
func (r *Reconciler) Reconcile(reconcileCtx context.Context, req reconcile.Request) (reconcile.Result, error)
Reconcile reconciles Seed resources and executes health check operations.
func (*Reconciler) SeedPredicate ¶
func (r *Reconciler) SeedPredicate() predicate.Predicate
SeedPredicate is a predicate which returns 'true' for create events, and for update events in case the seed was successfully bootstrapped.
type SeedConditions ¶ added in v1.79.0
type SeedConditions struct {
// contains filtered or unexported fields
}
SeedConditions contains all seed related conditions of the seed status subresource.
func NewSeedConditions ¶ added in v1.79.0
func NewSeedConditions(clock clock.Clock, status gardencorev1beta1.SeedStatus) SeedConditions
NewSeedConditions returns a new instance of SeedConditions. All conditions are retrieved from the given 'status' or newly initialized.
func (SeedConditions) ConditionTypes ¶ added in v1.79.0
func (s SeedConditions) ConditionTypes() []gardencorev1beta1.ConditionType
ConditionTypes returns all seed condition types.
func (SeedConditions) ConvertToSlice ¶ added in v1.79.0
func (s SeedConditions) ConvertToSlice() []gardencorev1beta1.Condition
ConvertToSlice returns the seed conditions as a slice.