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 migration controller to controller-runtime #7062

Merged
merged 9 commits into from
Nov 24, 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 migration controller to controller-runtime.
The other two controllers (care, main) are not part of this PR and will follow separately.

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 #6926.
/cc @shafeeqes

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 cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 23, 2022
@rfranzke
Copy link
Member Author

/test pull-gardener-e2e-kind

ref #7064

@shafeeqes
Copy link
Contributor

/assign

pkg/gardenlet/controller/backupentry/add.go Show resolved Hide resolved
docs/concepts/gardenlet.md Outdated Show resolved Hide resolved
pkg/controllerutils/predicate/predicate_test.go Outdated Show resolved Hide resolved
pkg/controllerutils/predicate/predicate_test.go Outdated Show resolved Hide resolved
pkg/utils/gardener/migration_test.go Outdated Show resolved Hide resolved
pkg/utils/gardener/migration_test.go Outdated Show resolved Hide resolved
pkg/utils/gardener/migration_test.go Outdated Show resolved Hide resolved
- Sometimes, we were defaulting the clock when adding to the manager, sometimes we were expecting the caller to set this clock.
- Now it is always defaulted when adding to the manager
- Do not provide full `GardenletConfiguration` but only `BackupEntryMigrationConfiguration` and separate seed name like in other reconcilers
…useable

The `Shoot` migration is more or less the exact same implementation, so we want to reuse this logic there.
@rfranzke
Copy link
Member Author

/test pull-gardener-integration

@rfranzke
Copy link
Member Author

/test pull-gardener-integration

@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.

/lgtm

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Nov 24, 2022
@rfranzke
Copy link
Member Author

/test pull-gardener-e2e-kind

@rfranzke
Copy link
Member Author

/test pull-gardener-e2e-kind

@rfranzke
Copy link
Member Author

/approve

@gardener-prow
Copy link
Contributor

gardener-prow bot commented Nov 24, 2022

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 24, 2022
@gardener-prow
Copy link
Contributor

gardener-prow bot commented Nov 24, 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 c2724ca 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.

@rfranzke
Copy link
Member Author

/test pull-gardener-integration

@gardener-prow gardener-prow bot merged commit dd5bbf5 into gardener:master Nov 24, 2022
@rfranzke rfranzke deleted the refactor/shoot-ctrl branch November 25, 2022 07:02
@rfranzke rfranzke changed the title [gardenlet] Switch Shoot migration controller to controller-runtime [gardenlet] Switch Shoot migration controller to controller-runtime Dec 14, 2022
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

2 participants