Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use DirectClient in BB/BE reconciler #2568

Merged
merged 1 commit into from
Jul 7, 2020

Conversation

timebertt
Copy link
Member

How to categorize this PR?

/area quality
/kind bug
/priority normal

What this PR does / why we need it:
If the CachedRuntimeClients feature gate is enabled, the backup entry/bucket reconciler in the gardenlet might not execute any reconciliation the first time the backup bucket/entry is deployed.
That's because we are using an Informer created by the SharedInformerFactory here for receiving watch events, but we are actually using a cached runtime client for retrieving the object in the reconciler which uses a separate watch. This in turn means, that the cached runtime client might not have received the add event for a backup bucket/entry, while the Informer already has received an event and enqueued the object for reconciliation. The cached runtime client the gets a NotFound error and the reconciler exits early.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:
In general, we should always use the same informers for registering event handlers which we also use in our controllers to retrieve the object in the beginning of the reconciliation. For example an Informer from the SharedInformerFactory and the respective Lister or an Informer from the controller-runtime cache and the cached runtime client.
I will do this refactoring in a separate PR, as it requires to not invalidate the Garden ClientSet in any case (also for version changes) which I will have to tackle first.
/cc @timuthy

Release note:

A bug has been fixed, that caused that newly created `BackupBuckets`/`BackupEntries` where not reconciled by the `gardenlet` immediately when the `CachedRuntimeClients` feature gate was enabled.

@timebertt timebertt requested a review from a team as a code owner July 7, 2020 14:39
@gardener-robot gardener-robot added area/quality Output qualification (tests, checks, scans, automation in general, etc.) related kind/bug Bug priority/normal labels Jul 7, 2020
@timebertt
Copy link
Member Author

Probably we should cherry-pick this to release-v1.7.

Copy link
Contributor

@timuthy timuthy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@timuthy timuthy merged commit 78ef584 into gardener:master Jul 7, 2020
@timebertt timebertt deleted the fix/backup-client branch July 8, 2020 12:21
@gardener-robot gardener-robot added priority/3 Priority (lower number equals higher priority) and removed priority/3 Priority (lower number equals higher priority) labels Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/quality Output qualification (tests, checks, scans, automation in general, etc.) related kind/bug Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants