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

[gardenlet] Switch Shoot care controller to controller-runtime #7206

Merged
merged 9 commits into from
Dec 18, 2022

Conversation

rfranzke
Copy link
Member

How to categorize this PR?

/area dev-productivity scalability
/kind enhancement

What this PR does / why we need it:
Refactor the Shoot care controller to controller-runtime.
The other two controllers (migration, main) were already refactored separately (ref #7062 and #7082).

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

Special notes for your reviewer:
Generally, we want to follow this cookbook while refactoring existing controllers:

  • Add documentation
  • Add integration test based on envtest (if not already present)
  • Switch controller to controller-runtime

This PR is very similar to parts of #6836.
/cc @shafeeqes @ary1992

Release note:

NONE

@gardener-prow gardener-prow bot added area/dev-productivity Developer productivity related (how to improve development) area/scalability Scalability related kind/enhancement Enhancement, improvement, extension labels Dec 14, 2022
@gardener-prow gardener-prow bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. labels Dec 14, 2022
@shafeeqes shafeeqes self-assigned this Dec 14, 2022
@rfranzke
Copy link
Member Author

/test pull-gardener-e2e-kind

Copy link
Contributor

@shafeeqes shafeeqes left a comment

Choose a reason for hiding this comment

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

Very nice PR, Thanks!
Just one minor nit, otherwise lgtm.

docs/concepts/gardenlet.md Outdated Show resolved Hide resolved
@ary1992
Copy link
Contributor

ary1992 commented Dec 15, 2022

/assign

@shafeeqes
Copy link
Contributor

/lgtm

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Dec 15, 2022
@gardener-prow
Copy link
Contributor

gardener-prow bot commented Dec 15, 2022

LGTM label has been added.

Git tree hash: 9e9fdbde23974c2acf0db76b3a8806e777100b61

Copy link
Contributor

@ary1992 ary1992 left a comment

Choose a reason for hiding this comment

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

Nice PR!
Few minor nits.

docs/concepts/gardenlet.md Outdated Show resolved Hide resolved
pkg/gardenlet/controller/shoot/care/add.go Outdated Show resolved Hide resolved
@gardener-prow gardener-prow bot added cla: no Indicates the PR's author has not signed the cla-assistant.io CLA. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. and removed lgtm Indicates that a PR is ready to be merged. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. cla: no Indicates the PR's author has not signed the cla-assistant.io CLA. labels Dec 15, 2022
@ary1992
Copy link
Contributor

ary1992 commented Dec 15, 2022

/lgtm

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Dec 15, 2022
@gardener-prow
Copy link
Contributor

gardener-prow bot commented Dec 15, 2022

LGTM label has been added.

Git tree hash: 913e0f27c0f50c531189d9bbcb05a8b414c33699

@gardener-prow gardener-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 16, 2022
@rfranzke
Copy link
Member Author

/hold
let's merge #7108 first

@gardener-prow gardener-prow bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Dec 16, 2022
@rfranzke
Copy link
Member Author

@shafeeqes @ary1992 I've pushed a new commit that includes some final cleanups of the legacy controller factory now that the Shoot care controller is the last one that gets refactored 🎉 PTAL :)

@gardener-prow gardener-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Dec 16, 2022
@gardener-prow gardener-prow bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 16, 2022
@shafeeqes
Copy link
Contributor

Awesome! Let's go 🚀
/lgtm
/approve
/unhold

@gardener-prow gardener-prow bot added lgtm Indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Dec 18, 2022
@gardener-prow
Copy link
Contributor

gardener-prow bot commented Dec 18, 2022

LGTM label has been added.

Git tree hash: 4feef6b805788a4d689f7639ba0ac94b2c124d25

@gardener-prow
Copy link
Contributor

gardener-prow bot commented Dec 18, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: shafeeqes

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow
Copy link
Contributor

gardener-prow bot commented Dec 18, 2022

@rfranzke: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-gardener-apidiff eb37167 link false /test pull-gardener-apidiff

Full PR test history. Your PR dashboard. Command help for this repository.
Please help us cut down on flakes by linking this test failure to an open flake report or filing a new flake report if you can't find an existing one. Also see our testing guideline for how to avoid and hunt flakes.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@shafeeqes
Copy link
Contributor

/test pull-gardener-e2e-kind

@gardener-prow gardener-prow bot merged commit 1d9b534 into gardener:master Dec 18, 2022
@rfranzke rfranzke deleted the refactor/shoot-care branch December 19, 2022 07:29
seshachalam-yv pushed a commit to seshachalam-yv/gardener that referenced this pull request Dec 26, 2022
…ardener#7206)

* Add integration test

* Drop legacy custom listers

Now that we use a cached controller-runtime client (since a long while, actually), we don't need these custom cached listers anymore.

* Add documentation

* Switch care reconciler to native controller-runtime controller

* Cleanup no longer needed code

* Move shoot status updater to bootstrapping phase

* Address PR review feedback

* Address PR review feedback

* Final cleanups now that last controller was refactored
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/dev-productivity Developer productivity related (how to improve development) area/scalability Scalability related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/enhancement Enhancement, improvement, extension lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants