Documentation ¶
Index ¶
- Variables
- func AddTasks(annotations map[string]string, tasksToAdd ...string)
- func BackupBucketFilterFunc(seedName string) func(obj interface{}) bool
- func BackupEntryFilterFunc(seedName string) func(obj interface{}) bool
- func BackupEntryIsManagedByThisGardenlet(backupEntry *gardencorev1beta1.BackupEntry, gc *config.GardenletConfiguration) bool
- func BastionFilterFunc(seedName string) func(obj interface{}) bool
- func BastionIsManagedByThisGardenlet(bastion *operationsv1alpha1.Bastion, gc *config.GardenletConfiguration) bool
- func ControllerInstallationFilterFunc(seedName string) func(obj interface{}) bool
- func CreateOrGetAndMergePatch(ctx context.Context, c client.Client, obj client.Object, ...) (controllerutil.OperationResult, error)
- func CreateOrGetAndStrategicMergePatch(ctx context.Context, c client.Client, obj client.Object, ...) (controllerutil.OperationResult, error)
- func CreateWorker(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 DetermineBastionAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error)
- func DetermineControllerInstallationAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error)
- func DetermineSecretBindingAssociations(ctx context.Context, c client.Client, 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 GetAndCreateOrMergePatch(ctx context.Context, c client.Client, obj client.Object, ...) (controllerutil.OperationResult, error)
- func GetAndCreateOrStrategicMergePatch(ctx context.Context, c client.Client, obj client.Object, ...) (controllerutil.OperationResult, error)
- func GetTasks(annotations map[string]string) []string
- func HasTask(annotations map[string]string, task string) bool
- func ManagedSeedFilterFunc(ctx context.Context, c client.Reader, 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 RemoveAllFinalizers(ctx context.Context, reader client.Reader, writer client.Writer, ...) error
- func RemoveAllTasks(annotations map[string]string)
- func RemoveFinalizer(ctx context.Context, reader client.Reader, writer client.Writer, ...) error
- func RemoveTasks(annotations map[string]string, tasksToRemove ...string)
- func SeedFilterFunc(seedName string) func(obj interface{}) bool
- func SeedOfManagedSeedFilterFunc(ctx context.Context, c client.Reader, seedName string) func(obj interface{}) bool
- func ShootFilterFunc(seedName string) func(obj interface{}) bool
- func ShootIsManagedByThisGardenlet(shoot *gardencorev1beta1.Shoot, gc *config.GardenletConfiguration) bool
- func StrategicMergePatchAddFinalizers(ctx context.Context, writer client.Writer, obj client.Object, ...) error
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 ¶
BackupBucketFilterFunc returns a filtering func for the seeds.
func BackupEntryFilterFunc ¶
BackupEntryFilterFunc returns a filtering func for the seeds.
func BackupEntryIsManagedByThisGardenlet ¶ added in v1.22.0
func BackupEntryIsManagedByThisGardenlet(backupEntry *gardencorev1beta1.BackupEntry, gc *config.GardenletConfiguration) bool
BackupEntryIsManagedByThisGardenlet checks if the given BackupEntry is managed by this gardenlet by comparing it with the seed name from the GardenletConfiguration.
func BastionFilterFunc ¶ added in v1.23.0
BastionFilterFunc returns a filtering func for the seeds.
func BastionIsManagedByThisGardenlet ¶ added in v1.25.0
func BastionIsManagedByThisGardenlet(bastion *operationsv1alpha1.Bastion, gc *config.GardenletConfiguration) bool
BastionIsManagedByThisGardenlet checks if the given Bastion is managed by this gardenlet by comparing it with the seed name from the GardenletConfiguration.
func ControllerInstallationFilterFunc ¶
ControllerInstallationFilterFunc returns a filtering func for the seeds.
func CreateOrGetAndMergePatch ¶ added in v1.25.0
func CreateOrGetAndMergePatch(ctx context.Context, c client.Client, obj client.Object, f controllerutil.MutateFn) (controllerutil.OperationResult, error)
CreateOrGetAndMergePatch creates or gets and patches (using a merge patch) the given object in the Kubernetes cluster.
The MutateFn is called regardless of creating or patching an object.
It returns the executed operation and an error.
func CreateOrGetAndStrategicMergePatch ¶ added in v1.25.0
func CreateOrGetAndStrategicMergePatch(ctx context.Context, c client.Client, obj client.Object, f controllerutil.MutateFn) (controllerutil.OperationResult, error)
CreateOrGetAndStrategicMergePatch creates or gets and patches (using a strategic merge patch) the given object in the Kubernetes cluster.
The MutateFn is called regardless of creating or patching an object.
It returns the executed operation and an error.
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 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 DetermineBastionAssociations ¶ added in v1.23.0
func DetermineBastionAssociations(ctx context.Context, c client.Client, seedName string) ([]string, error)
DetermineBastionAssociations determine the Bastion 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(ctx context.Context, c client.Client, quota *gardencorev1beta1.Quota) ([]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, Seed, Secretbinding a or a ExposureClass 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 GetAndCreateOrMergePatch ¶ added in v1.23.0
func GetAndCreateOrMergePatch(ctx context.Context, c client.Client, obj client.Object, f controllerutil.MutateFn) (controllerutil.OperationResult, error)
GetAndCreateOrMergePatch is similar to controllerutil.CreateOrPatch, but does not care about the object's status section. It reads the object from the client, reconciles the desired state with the existing state using the given MutateFn and creates or patches the object (using a merge patch) accordingly.
The MutateFn is called regardless of creating or updating an object.
It returns the executed operation and an error.
func GetAndCreateOrStrategicMergePatch ¶ added in v1.23.0
func GetAndCreateOrStrategicMergePatch(ctx context.Context, c client.Client, obj client.Object, f controllerutil.MutateFn) (controllerutil.OperationResult, error)
GetAndCreateOrStrategicMergePatch is similar to controllerutil.CreateOrPatch, but does not care about the object's status section. It reads the object from the client, reconciles the desired state with the existing state using the given MutateFn and creates or patches the object (using a strategic merge patch) accordingly.
The MutateFn is called regardless of creating or updating an object.
It returns the executed operation and an error.
func ManagedSeedFilterFunc ¶ added in v1.18.0
func ManagedSeedFilterFunc(ctx context.Context, c client.Reader, seedName string) 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 ¶ added in v1.18.0
func PatchAddFinalizers(ctx context.Context, writer client.Writer, obj client.Object, finalizers ...string) error
PatchAddFinalizers adds the given finalizers to the object via a merge patch request with optimistic locking.
func PatchRemoveFinalizers ¶ added in v1.12.0
func PatchRemoveFinalizers(ctx context.Context, writer client.Writer, obj client.Object, finalizers ...string) error
PatchRemoveFinalizers removes the given finalizers from the object via a merge patch request with optimistic locking.
func ReconcileOncePer24hDuration ¶ added in v1.10.2
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 RemoveAllFinalizers ¶ added in v1.27.0
func RemoveAllFinalizers(ctx context.Context, reader client.Reader, writer client.Writer, obj client.Object) error
RemoveAllFinalizers ensures that the given object has no finalizers with exponential backoff. If any finalizers are set, it removes them and issues a patch.
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 RemoveTasks ¶ added in v1.3.1
RemoveTasks removes tasks from the ShootTasks annotation of the passed map.
func SeedFilterFunc ¶
SeedFilterFunc returns a filtering func for the seeds.
func SeedOfManagedSeedFilterFunc ¶ added in v1.25.0
func SeedOfManagedSeedFilterFunc(ctx context.Context, c client.Reader, seedName string) func(obj interface{}) bool
SeedOfManagedSeedFilterFunc returns a filtering func for Seeds that checks if the Seed is owned by a ManagedSeed that references a Shoot scheduled on a Seed, for which the gardenlet is responsible.
func ShootFilterFunc ¶
ShootFilterFunc returns a filtering func for the seeds.
func ShootIsManagedByThisGardenlet ¶ added in v1.15.0
func ShootIsManagedByThisGardenlet(shoot *gardencorev1beta1.Shoot, gc *config.GardenletConfiguration) bool
ShootIsManagedByThisGardenlet checks if the given shoot is managed by this gardenlet by comparing it with the seed name from the GardenletConfiguration.
func StrategicMergePatchAddFinalizers ¶ added in v1.33.0
func StrategicMergePatchAddFinalizers(ctx context.Context, writer client.Writer, obj client.Object, finalizers ...string) error
StrategicMergePatchAddFinalizers adds the given finalizers to the object via a strategic merge patch request (without optimistic locking). Note: we can't do the same for removing finalizers, because removing the last finalizer results in the following patch:
{"metadata":{"finalizers":null}}
which is not safe to issue without optimistic locking. Also, $deleteFromPrimitiveList is not idempotent, see https://github.com/kubernetes/kubernetes/issues/105146.
Types ¶
This section is empty.