-
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 ManagedSeed
controller to controller-runtime
#7108
[gardenlet] Switch ManagedSeed
controller to controller-runtime
#7108
Conversation
Skipping CI for Draft Pull Request. |
ManagedSeed
controller to controller-runtime
ae1bbe4
to
6a9fbd3
Compare
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 for the PR, had a quick look and left some comments.
test/integration/gardenlet/managedseed/managedseed_suite_test.go
Outdated
Show resolved
Hide resolved
test/integration/gardenlet/managedseed/managedseed_suite_test.go
Outdated
Show resolved
Hide resolved
test/integration/gardenlet/managedseed/managedseed_suite_test.go
Outdated
Show resolved
Hide resolved
b31cb53
to
f89b68d
Compare
/test all |
f89b68d
to
2853fd2
Compare
/test all |
With this changes garden namespace validation can be disabled by disabling the ManagedSeed plugin for integrations test. In the next commit namespace will be passed as an argument to controller.
This is done for assigning a unique garden namespace in case if integration test.
- enqueue with jitter delay logic from managed seed controller is moved to controllerutils. - in the later commit jitter delay logic is removed from controller and instead EnqueueWithJitterDelay function is used.
…to controller and not a generic function
80fc489
to
c101c4b
Compare
test/integration/gardenlet/managedseed/managedseed_suite_test.go
Outdated
Show resolved
Hide resolved
ManagedSeed
controller to controller-runtimeManagedSeed
controller to controller-runtime
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.
Nice stuff. Just a few minor things
- Added `ShootClientMap` and `ImageVector` to the Reconciler struct. - Removed `RateLimiter` from Reconciler struct as it is not needed here. - Renamed `SeedOfManagedSeedFilterPredicate` to `SeedOfManagedSeedPredicate` - Renamed `ManagedSeedFilterPredicate` to `ManagedSeedPredicate` - GardenletConfiguration is passed in Reconciler struct instead of `ManagedSeedControllerConfiguration`
50d6a38
to
6c299cf
Compare
/test pull-gardener-unit |
@ary1992: 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. |
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.
/lgtm
LGTM label has been added. Git tree hash: 260ebba6aa7c9f623a71dbb18f3f84ee80131289
|
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.
/lgtm
[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 |
…ardener#7108) * Move garden namespace validation of ManagedSeed to ManagedSeed plugins With this changes garden namespace validation can be disabled by disabling the ManagedSeed plugin for integrations test. In the next commit namespace will be passed as an argument to controller. * Pass garden namespace and chart path as an argument to controller This is done for assigning a unique garden namespace in case if integration test. * Adapt configurable garden namespace in gardenlet charts * Integration test * Move EnqueueWithJitterDelay function to controllerutils - enqueue with jitter delay logic from managed seed controller is moved to controllerutils. - in the later commit jitter delay logic is removed from controller and instead EnqueueWithJitterDelay function is used. * Switch ManagedSeed controller to native controller-runtime * Adapt unit and integration tests * Improve integration test [Delete case] * Address PR review feedback * Address PR review feedback * Fix e2e test * Introduce garden namespace for garden and garden namespace for shoot in the controller - this is done to allow passing created namespace for shoot and garden instead of using hardcoded garden namespace for integration test. * Move EnqueueWithJitterDelay function to controller as it is specific to controller and not a generic function * Fix integration test * Remove ControlledResourceEventHandler as it no longer used anywhere * Address PR review feedback * Address PR review feedback - Added `ShootClientMap` and `ImageVector` to the Reconciler struct. - Removed `RateLimiter` from Reconciler struct as it is not needed here. - Renamed `SeedOfManagedSeedFilterPredicate` to `SeedOfManagedSeedPredicate` - Renamed `ManagedSeedFilterPredicate` to `ManagedSeedPredicate` - GardenletConfiguration is passed in Reconciler struct instead of `ManagedSeedControllerConfiguration` * Rename file and minor Nit
How to categorize this PR?
/area dev-productivity scalability
/kind enhancement
What this PR does / why we need it:
Refactor the
ManagedSeed
controller to controller-runtime.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
Release note: