Documentation ¶
Index ¶
- Variables
- func AddTasks(annotations map[string]string, tasksToAdd ...string)
- func BackupBucketFilterFunc(ctx context.Context, c client.Client, seedName string, ...) func(obj interface{}) bool
- func BackupEntryFilterFunc(ctx context.Context, c client.Client, seedName string, ...) func(obj interface{}) bool
- func ControllerInstallationFilterFunc(seedName string, seedLister gardencorelisters.SeedLister, ...) func(obj interface{}) bool
- func CreateWorker(ctx context.Context, queue workqueue.RateLimitingInterface, ...)
- func DeprecatedCreateWorker(ctx context.Context, queue workqueue.RateLimitingInterface, ...)
- func DetermineBackupBucketAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error)
- func DetermineBackupEntryAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error)
- func DetermineControllerInstallationAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error)
- func DetermineSecretBindingAssociations(quota *gardencorev1beta1.Quota, ...) ([]string, error)
- func DetermineShootAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error)
- func DetermineShootsAssociatedTo(ctx context.Context, gardenClient client.Reader, obj interface{}) ([]string, error)
- func EnsureFinalizer(ctx context.Context, reader client.Reader, writer client.Writer, ...) error
- func GetTasks(annotations map[string]string) []string
- func HasTask(annotations map[string]string, task string) bool
- func LabelsMatchFor(l map[string]string, labelSelector *metav1.LabelSelector) bool
- func ManagedSeedFilterFunc(ctx context.Context, c client.Client, seedName string, ...) func(obj interface{}) bool
- func PatchAddFinalizers(ctx context.Context, writer client.Writer, obj client.Object, ...) error
- func PatchRemoveFinalizers(ctx context.Context, writer client.Writer, obj client.Object, ...) error
- func ReconcileOncePer24hDuration(objectMeta metav1.ObjectMeta, observedGeneration int64, ...) time.Duration
- func RemoveAllTasks(annotations map[string]string)
- func RemoveFinalizer(ctx context.Context, reader client.Reader, writer client.Writer, ...) error
- func RemoveGardenerOperationAnnotation(ctx context.Context, backoff wait.Backoff, cli client.Client, ...) error
- func RemoveTasks(annotations map[string]string, tasksToRemove ...string)
- func SeedFilterFunc(seedName string, labelSelector *metav1.LabelSelector) func(obj interface{}) bool
- func SeedLabelsMatch(seedLister gardencorelisters.SeedLister, seedName string, ...) bool
- func ShootFilterFunc(seedName string, seedLister gardencorelisters.SeedLister, ...) func(obj interface{}) bool
- func ShootIsManagedByThisGardenlet(shoot *gardencorev1beta1.Shoot, gc *config.GardenletConfiguration, ...) bool
Constants ¶
This section is empty.
Variables ¶
var ( // Now is a function for returning the current time. Now = time.Now // RandomDuration is a function for returning a random duration. RandomDuration = utils.RandomDuration )
Functions ¶
func BackupBucketFilterFunc ¶
func BackupBucketFilterFunc(ctx context.Context, c client.Client, seedName string, labelSelector *metav1.LabelSelector) func(obj interface{}) bool
BackupBucketFilterFunc returns a filtering func for the seeds and the given label selector.
func BackupEntryFilterFunc ¶
func BackupEntryFilterFunc(ctx context.Context, c client.Client, seedName string, labelSelector *metav1.LabelSelector) func(obj interface{}) bool
BackupEntryFilterFunc returns a filtering func for the seeds and the given label selector.
func ControllerInstallationFilterFunc ¶
func ControllerInstallationFilterFunc(seedName string, seedLister gardencorelisters.SeedLister, labelSelector *metav1.LabelSelector) func(obj interface{}) bool
ControllerInstallationFilterFunc returns a filtering func for the seeds and the given label selector.
func CreateWorker ¶
func CreateWorker(ctx context.Context, queue workqueue.RateLimitingInterface, resourceType string, reconciler reconcile.Reconciler, waitGroup *sync.WaitGroup, workerCh chan int, injectFn ...inject.Func)
CreateWorker creates and runs a worker thread that just processes items in the specified queue. The worker will run until stopCh is closed. The worker will be added to the wait group when started and marked done when finished. The given context is injected into the `reconciler` if it implements `inject.Stoppable`. Optionally passed inject functions are called with the `reconciler` but potentially returned errors are disregarded.
func DeprecatedCreateWorker ¶
func DeprecatedCreateWorker(ctx context.Context, queue workqueue.RateLimitingInterface, resourceType string, reconciler func(key string) error, waitGroup *sync.WaitGroup, workerCh chan int)
DeprecatedCreateWorker creates and runs a worker thread that just processes items in the specified queue. The worker will run until stopCh is closed. The worker will be added to the wait group when started and marked done when finished. Deprecated: Use CreateWorker instead.
func DetermineBackupBucketAssociations ¶
func DetermineBackupBucketAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error)
DetermineBackupBucketAssociations determine the BackupBucket resources which are associated to seed with name <seedName>
func DetermineBackupEntryAssociations ¶
func DetermineBackupEntryAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error)
DetermineBackupEntryAssociations determine the BackupEntry resources which are associated to seed with name <seedName>
func DetermineControllerInstallationAssociations ¶
func DetermineControllerInstallationAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error)
DetermineControllerInstallationAssociations determine the ControllerInstallation resources which are associated to seed with name <seedName>
func DetermineSecretBindingAssociations ¶
func DetermineSecretBindingAssociations(quota *gardencorev1beta1.Quota, bindingLister gardencorelisters.SecretBindingLister) ([]string, error)
DetermineSecretBindingAssociations gets a <bindingLister> to determine the SecretBinding resources which are associated to given Quota <obj>.
func DetermineShootAssociations ¶
func DetermineShootAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error)
DetermineShootAssociations determine the Shoot resources which are associated to seed with name <seedName>
func DetermineShootsAssociatedTo ¶
func DetermineShootsAssociatedTo(ctx context.Context, gardenClient client.Reader, obj interface{}) ([]string, error)
DetermineShootsAssociatedTo gets a <shootLister> to determine the Shoots resources which are associated to given <obj> (either a CloudProfile a or a Seed object).
func EnsureFinalizer ¶
func EnsureFinalizer(ctx context.Context, reader client.Reader, writer client.Writer, obj client.Object, finalizer string) error
EnsureFinalizer ensures that a finalizer of the given name is set on the given object with exponential backoff. If the finalizer is not set, it adds it to the list of finalizers and patches the remote object. Use PatchAddFinalizers instead, if the controller is able to tolerate conflict errors caused by stale reads.
func LabelsMatchFor ¶
func LabelsMatchFor(l map[string]string, labelSelector *metav1.LabelSelector) bool
LabelsMatchFor checks whether the given label selector matches for the given set of labels.
func ManagedSeedFilterFunc ¶
func ManagedSeedFilterFunc(ctx context.Context, c client.Client, seedName string, labelSelector *metav1.LabelSelector) func(obj interface{}) bool
ManagedSeedFilterFunc returns a filtering func for ManagedSeeds that checks if the ManagedSeed references a Shoot scheduled on a Seed, for which the gardenlet is responsible..
func PatchAddFinalizers ¶
func PatchAddFinalizers(ctx context.Context, writer client.Writer, obj client.Object, finalizers ...string) error
PatchAddFinalizers adds the given finalizers to the object via a patch request.
func PatchRemoveFinalizers ¶
func PatchRemoveFinalizers(ctx context.Context, writer client.Writer, obj client.Object, finalizers ...string) error
PatchRemoveFinalizers removes the given finalizers from the object via a patch request.
func ReconcileOncePer24hDuration ¶
func ReconcileOncePer24hDuration(objectMeta metav1.ObjectMeta, observedGeneration int64, lastOperation *gardencorev1beta1.LastOperation) time.Duration
ReconcileOncePer24hDuration returns the duration until the next reconciliation should happen while respecting that only one reconciliation should happen per 24h. If the deletion timestamp is set or the generation has changed or the last operation does not indicate success or indicates that the last reconciliation happened more than 24h ago then 0 will be returned.
func RemoveAllTasks ¶
RemoveAllTasks removes the ShootTasks annotation from the passed map.
func RemoveFinalizer ¶
func RemoveFinalizer(ctx context.Context, reader client.Reader, writer client.Writer, obj client.Object, finalizer string) error
RemoveFinalizer ensures that the given finalizer is not present anymore in the given object with exponential backoff. If it is set, it removes it and issues a patch. Use PatchRemoveFinalizers instead, if the controller is able to tolerate conflict errors caused by stale reads.
func RemoveGardenerOperationAnnotation ¶
func RemoveGardenerOperationAnnotation(ctx context.Context, backoff wait.Backoff, cli client.Client, obj client.Object) error
RemoveGardenerOperationAnnotation removes a gardener operation annotation and retries the operation with the given <backoff>.
func RemoveTasks ¶
RemoveTasks removes tasks from the ShootTasks annotation of the passed map.
func SeedFilterFunc ¶
func SeedFilterFunc(seedName string, labelSelector *metav1.LabelSelector) func(obj interface{}) bool
SeedFilterFunc returns a filtering func for the seeds and the given label selector.
func SeedLabelsMatch ¶
func SeedLabelsMatch(seedLister gardencorelisters.SeedLister, seedName string, labelSelector *metav1.LabelSelector) bool
SeedLabelsMatch fetches the given seed via a lister by its name and then checks whether the given label selector matches the seed labels.
func ShootFilterFunc ¶
func ShootFilterFunc(seedName string, seedLister gardencorelisters.SeedLister, labelSelector *metav1.LabelSelector) func(obj interface{}) bool
ShootFilterFunc returns a filtering func for the seeds and the given label selector.
func ShootIsManagedByThisGardenlet ¶
func ShootIsManagedByThisGardenlet(shoot *gardencorev1beta1.Shoot, gc *config.GardenletConfiguration, seedLister gardencorelisters.SeedLister) bool
ShootIsManagedByThisGardenlet checks if the given shoot is managed by this gardenlet by comparing it with the seed name from the GardenletConfiguration or by checking whether the seed labels mathes the seed seoector from the GardenletConfiguration.
Types ¶
This section is empty.