-
Notifications
You must be signed in to change notification settings - Fork 463
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
main controller to controller-runtime
#7082
[gardenlet] Switch Shoot
main controller to controller-runtime
#7082
Conversation
- Precisely determine responsibility for next reconciliation - Move central logic from `reconciler_migrate.go` to `reconciler.go` - Move common preparation work (Cluster resource sync, operation initialization, early exits, ...) to the `prepareOperation` function Greetings to all reviewers: Do not even try to review this. Otherwise, lay down to the floor, and ..., good luck.
Skipping CI for Draft Pull Request. |
/test all |
/assign |
Previously, this was done to prevent duplicated reconciliations. With predicate.GenerationChangedPredicate, this is no longer necessary as we only enqueue when metadata.generation changes.
/test all |
While testing locally, I found the following problem: gardenlet is unable to record events on shoots:
Looking into it now. |
This PR is ready. I have performed several manual tests for the special cases mentioned in the docs and fixed a few things accordingly. |
Should pass now, #7064 is fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the PR.
Had a combined look with @oliver-goetz and @ary1992.
Looks good in general. Just left some questions.
/assign @oliver-goetz @ary1992 @shafeeqes
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment, I can fix it myself and then let's get this in. Thanks for making this ready @timebertt!
/test pull-gardener-integration |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rfranzke 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 |
@timebertt: The following test failed, say
Full PR test history. Your PR dashboard. Command help for this repository. 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. |
/test pull-gardener-integration |
Shoot
main controller to controller-runtime Shoot
main controller to controller-runtime
How to categorize this PR?
/area dev-productivity scalability
/kind enhancement
What this PR does / why we need it:
Refactor the
Shoot
main controller to controller-runtime.Co-Authored-By @rfranzke
Which issue(s) this PR fixes:
Part of #4251
Special notes for your reviewer:
This PR comes with a few behavioral changes:
status.UID
is always written when the operation starts, previously this was only done on the start of a reconciliation (i.e., not on deletion or migration)✅ In draft, until I have performed some manual tests for the special cases of shoot reconciliation (see docs)
@rfranzke and I are working on a follow-up PR for refactoring the corresponding logic of these special cases to make it more readable and testable.
Generally, we want to follow this cookbook while refactoring existing controllers:
Integration tests are skipped for this controller, as they can't be achieved with low effort while still providing meaningful benefits.
Release note: