Documentation ¶
Index ¶
- Constants
- Variables
- type Conditions
- type Reconciler
- func (r *Reconciler) AddToManager(ctx context.Context, mgr manager.Manager, gardenClientMap clientmap.ClientMap) error
- func (r *Reconciler) MapObjectKindToExtensions(objectKind string, newObjectListFunc func() client.ObjectList) mapper.MapFunc
- func (r *Reconciler) MapToAllExtensions(ctx context.Context, log logr.Logger, reader client.Reader, _ client.Object) []reconcile.Request
- func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
Constants ¶
const ( // ConditionReconcileFailed is the condition type for when the virtual cluster resources fail to be reconciled. ConditionReconcileFailed = "ReconcileFailed" // ConditionDeleteFailed is the condition type for when the virtual cluster resources fail to be deleted. ConditionDeleteFailed = "DeleteFailed" // ConditionNoGardenFound is the condition type for when no Garden resource exists. ConditionNoGardenFound = "NoGardenFound" // ConditionReconcileSuccess is the condition type for when the virtual cluster resources successfully reconcile. ConditionReconcileSuccess = "ReconcileSuccessful" // ConditionDeleteSuccessful is the condition type for when the virtual cluster resources successfully delete. ConditionDeleteSuccessful = "DeleteSuccessful" )
const ControllerName = "extension"
ControllerName is the name of this controller.
Variables ¶
var RequeueGardenResourceNotReady = 10 * time.Second
RequeueGardenResourceNotReady is the time after which an extension will be requeued, if the Garden resource was not ready during its reconciliation. Exposed for testing.
Functions ¶
This section is empty.
Types ¶
type Conditions ¶
type Conditions struct {
// contains filtered or unexported fields
}
Conditions contains all conditions of the extension status subresource.
func NewConditions ¶
func NewConditions(clock clock.Clock, status operatorv1alpha1.ExtensionStatus) Conditions
NewConditions returns a new instance of Conditions. All conditions are retrieved from the given 'status' or newly initialized.
func (Conditions) ConditionTypes ¶
func (c Conditions) ConditionTypes() []gardencorev1beta1.ConditionType
ConditionTypes returns all garden condition types.
func (Conditions) ConvertToSlice ¶
func (c Conditions) ConvertToSlice() []gardencorev1beta1.Condition
ConvertToSlice returns the garden conditions as a slice.
type Reconciler ¶
type Reconciler struct { // 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 RuntimeClientSet kubernetes.Interface Config config.OperatorConfiguration Clock clock.Clock Recorder record.EventRecorder GardenNamespace string HelmRegistry oci.Interface // contains filtered or unexported fields }
Reconciler reconciles Extensions.
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) MapObjectKindToExtensions ¶ added in v1.105.0
func (r *Reconciler) MapObjectKindToExtensions(objectKind string, newObjectListFunc func() client.ObjectList) mapper.MapFunc
MapObjectKindToExtensions returns a mapper function for the given extension kind that lists all existing extension resources of the given kind and stores the respective types in the `kindToRequiredTypes` map. Afterwards, it enqueue all Extensions for the runtime cluster that responsible for the given kind.