Documentation ¶
Index ¶
- Constants
- Variables
- type GardenConditions
- type HealthCheck
- type NewHealthCheckFunc
- type Reconciler
- func (r *Reconciler) AddToManager(ctx context.Context, mgr manager.Manager, gardenClientMap clientmap.ClientMap) error
- func (r *Reconciler) MapManagedResourceToGarden(ctx context.Context, log logr.Logger, _ client.Reader, _ client.Object) []reconcile.Request
- func (r *Reconciler) Reconcile(reconcileCtx context.Context, req reconcile.Request) (reconcile.Result, error)
Constants ¶
const ControllerName = "garden-care"
ControllerName is the name of this controller.
Variables ¶
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 ¶
type NewHealthCheckFunc func(*operatorv1alpha1.Garden, client.Client, kubernetes.Interface, clock.Clock, map[gardencorev1beta1.ConditionType]time.Duration, string) HealthCheck
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.