care

package
v1.107.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const ControllerName = "garden-care"

ControllerName is the name of this controller.

Variables

View Source
var (
	// NewHealthCheck is used to create a new Health check instance.
	NewHealthCheck = defaultNewHealthCheck
)

Functions

This section is empty.

Types

type GardenConditions added in v1.79.0

type GardenConditions struct {
	// contains filtered or unexported fields
}

GardenConditions contains all conditions of the garden status subresource.

func NewGardenConditions added in v1.79.0

func NewGardenConditions(clock clock.Clock, status operatorv1alpha1.GardenStatus) GardenConditions

NewGardenConditions returns a new instance of GardenConditions. All conditions are retrieved from the given 'status' or newly initialized.

func (GardenConditions) ConditionTypes added in v1.79.0

func (g GardenConditions) ConditionTypes() []gardencorev1beta1.ConditionType

ConditionTypes returns all garden condition types.

func (GardenConditions) ConvertToSlice added in v1.79.0

func (g GardenConditions) ConvertToSlice() []gardencorev1beta1.Condition

ConvertToSlice returns the garden conditions as a slice.

type HealthCheck

type HealthCheck interface {
	Check(ctx context.Context, conditions GardenConditions) []gardencorev1beta1.Condition
}

HealthCheck is an interface used to perform health checks.

func NewHealth added in v1.79.0

func NewHealth(
	garden *operatorv1alpha1.Garden,
	runtimeClient client.Client,
	gardenClientSet kubernetes.Interface,
	clock clock.Clock,
	conditionThresholds map[gardencorev1beta1.ConditionType]time.Duration,
	gardenNamespace string,
) HealthCheck

NewHealth creates a new Health instance with the given parameters.

type NewHealthCheckFunc

NewHealthCheckFunc is a function used to create a new instance for performing health checks.

type Reconciler

type Reconciler struct {
	RuntimeClient   client.Client
	Config          config.OperatorConfiguration
	Clock           clock.Clock
	GardenNamespace string
	// GardenClientMap is the ClientMap used to communicate with the virtual garden cluster. It should be set by AddToManager function but the field is still public for usage in tests.
	GardenClientMap clientmap.ClientMap
	// contains filtered or unexported fields
}

Reconciler reconciles garden resources and executes health check operations.

func (*Reconciler) AddToManager

func (r *Reconciler) AddToManager(ctx context.Context, mgr manager.Manager, gardenClientMap clientmap.ClientMap) error

AddToManager adds Reconciler to the given manager.

func (*Reconciler) MapManagedResourceToGarden

func (r *Reconciler) MapManagedResourceToGarden(ctx context.Context, log logr.Logger, _ client.Reader, _ client.Object) []reconcile.Request

MapManagedResourceToGarden is a mapper.MapFunc for mapping a ManagedResource to the owning Garden.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(reconcileCtx context.Context, req reconcile.Request) (reconcile.Result, error)

Reconcile reconciles Garden resources and executes health check operations.

Jump to

Keyboard shortcuts

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