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

Cleanup duplicated watches in gardenlet (2) #4510

Merged
merged 8 commits into from
Aug 18, 2021

Conversation

timebertt
Copy link
Member

@timebertt timebertt commented Aug 13, 2021

How to categorize this PR?

/area scalability
/kind cleanup

What this PR does / why we need it:

This PR cleans up usages of the generated informers (client-go style) in gardenlet's Shoot controller.
It replaces them with informers from the controller-runtime cache to prevent duplicated watches if the CachedRuntimeClients feature gate is enabled.
To ease the transition, the PR also refactors the seed registration controller to the reconcile.Reconciler interface.

Now, the use of generated informers and listers is completely eliminated in gardenlet.
Hence, it should now be safer to turn on the CachedRuntimeClients feature gate again.

(similar to #4503, #3658 ff., #3746 ff.)

Which issue(s) this PR fixes:
Part of #2822, #4251

Special notes for your reviewer:

Performed some additional cleanups like in #4503 along the way (mainly related to logging and fake clients in unit tests).

/squash

Release note:


@gardener-robot gardener-robot added area/scalability Scalability related kind/cleanup Something that is not needed anymore and can be cleaned up merge/squash size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 13, 2021
@timebertt
Copy link
Member Author

Rebased, now that #4503 is merged.
/ready
/invite @rfranzke

@gardener-robot gardener-robot marked this pull request as ready for review August 17, 2021 06:59
@gardener-robot gardener-robot requested a review from a team as a code owner August 17, 2021 06:59
@rfranzke
Copy link
Member

/assign

Copy link
Member

@rfranzke rfranzke left a comment

Choose a reason for hiding this comment

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

/lgtm

Very nice, thanks again! I especially like the last commit - that's a huge milestone. Thanks for keeping on track and pursuing this! :)

@rfranzke rfranzke merged commit 0320bb0 into gardener:master Aug 18, 2021
@timebertt timebertt deleted the cleanup/duplicated-watches-2 branch December 17, 2021 12:43
krgostev pushed a commit to krgostev/gardener that referenced this pull request Apr 21, 2022
* Use c-r informer for Seeds in Shoot controller

* Cleanup garden.ReadGardenSecrets after dropping seed lister

* Eliminate informers, listers in pkg/operation

* Eliminate informers, listers in shoot care controller

* Eliminate informers, lister in seed registration controller

Also:
- refactor to reconcile.Reconciler
- consistently use logger with object name field
- simplify unit tests, switch to fake client

* Cleanup some more logging stuff in shoot care controller

* Use c-r informer for Shoots in Shoot controller

* Completely eliminate generated informers, listers in gardenlet
krgostev pushed a commit to krgostev/gardener that referenced this pull request Jul 5, 2022
* Use c-r informer for Seeds in Shoot controller

* Cleanup garden.ReadGardenSecrets after dropping seed lister

* Eliminate informers, listers in pkg/operation

* Eliminate informers, listers in shoot care controller

* Eliminate informers, lister in seed registration controller

Also:
- refactor to reconcile.Reconciler
- consistently use logger with object name field
- simplify unit tests, switch to fake client

* Cleanup some more logging stuff in shoot care controller

* Use c-r informer for Shoots in Shoot controller

* Completely eliminate generated informers, listers in gardenlet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/scalability Scalability related kind/cleanup Something that is not needed anymore and can be cleaned up size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants