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 Bastion controller to controller-runtime #6839

Merged
merged 12 commits into from
Nov 15, 2022

Conversation

ary1992
Copy link
Contributor

@ary1992 ary1992 commented Oct 17, 2022

How to categorize this PR?

/area dev-productivity scalability
/kind enhancement

What this PR does / why we need it:
Refactor the Bastion 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:

NONE

@gardener-prow gardener-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 17, 2022
@gardener-prow
Copy link
Contributor

gardener-prow bot commented Oct 17, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@gardener-prow gardener-prow bot added area/dev-productivity Developer productivity related (how to improve development) area/scalability Scalability related labels Oct 17, 2022
@gardener-prow gardener-prow bot added kind/enhancement Enhancement, improvement, extension needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 17, 2022
@ary1992
Copy link
Contributor Author

ary1992 commented Oct 17, 2022

/test all

@rfranzke
Copy link
Member

/assign
/rebase

@gardener-prow gardener-prow bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 17, 2022
@ary1992
Copy link
Contributor Author

ary1992 commented Oct 17, 2022

/test all

@rfranzke rfranzke changed the title Switch Bastion controller to controller-runtime [gardenlet] Switch Bastion controller to controller-runtime Oct 17, 2022
@timebertt
Copy link
Member

Now, that we have the controller-runtime manager with both caches for garden and seed cluster, we could easily set up watches for the extensions/v1alpha1.Bastion object in the seed.
This way, we could get rid of the dirty wait loops, flows, etc in the reconcilers and instead do it the "kubernetes-native way", i.e. enqueue the Bastion on relevant update events to the owned object.

This was also one motivation behind doing this refactoring in the first place.
@ary1992 can perform the suggested change?

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.

docs/concepts/gardenlet.md Outdated Show resolved Hide resolved
docs/concepts/gardenlet.md Outdated Show resolved Hide resolved
docs/concepts/gardenlet.md Outdated Show resolved Hide resolved
docs/concepts/gardenlet.md Outdated Show resolved Hide resolved
test/integration/gardenlet/bastion/bastion_suite_test.go Outdated Show resolved Hide resolved
pkg/gardenlet/controller/bastion/bastion_suite_test.go Outdated Show resolved Hide resolved
pkg/gardenlet/controller/bastion/reconciler.go Outdated Show resolved Hide resolved
pkg/gardenlet/controller/bastion/reconciler.go Outdated Show resolved Hide resolved
pkg/gardenlet/controller/bastion/reconciler.go Outdated Show resolved Hide resolved
test/integration/gardenlet/bastion/bastion_suite_test.go Outdated Show resolved Hide resolved
@ary1992 ary1992 force-pushed the refactor/bastion branch 3 times, most recently from 0c8a08e to 8c601ee Compare October 22, 2022 09:29
@ary1992
Copy link
Contributor Author

ary1992 commented Oct 22, 2022

/test all

@gardener gardener deleted a comment from gardener-prow bot Oct 22, 2022
@ary1992 ary1992 marked this pull request as ready for review October 25, 2022 03:46
@gardener-prow gardener-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 25, 2022
@rfranzke
Copy link
Member

@acumino WDYT about adding this to the v1.60 release milestone?

@shafeeqes shafeeqes force-pushed the refactor/bastion branch 2 times, most recently from fb14b0a to f449262 Compare November 15, 2022 09:48
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
/approve

Thanks @ary1992 and @shafeeqes

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

gardener-prow bot commented Nov 15, 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 15, 2022
@gardener-prow gardener-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 15, 2022
@acumino
Copy link
Member

acumino commented Nov 15, 2022

/milestone v1.60

@gardener-prow gardener-prow bot added this to the v1.60 milestone Nov 15, 2022
@shafeeqes
Copy link
Contributor

/lgtm

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Nov 15, 2022
@gardener-prow gardener-prow bot merged commit 14790f4 into gardener:master Nov 15, 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

5 participants