-
Notifications
You must be signed in to change notification settings - Fork 526
[GEP-28] Allow to configure hostNetwork
, replicas
and tolerations
for controller installations.
#11527
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
Conversation
/cc @rfranzke |
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 :)
/lgtm
Though I'm wondering if we should add unit tests for the changes. I know, I also haven't any when working on the file before 😄
LGTM label has been added. Git tree hash: ef42449e6dc00754e1a8573be8c9490de47b1883
|
I had an offline discussion with @rfranzke concerning this topic. He wanted to take a look and decide then.
Feel free to share your thoughts what you think is the best one in this case. |
Ok, got it. My personal preference would be to extract the to-be-tested logic into a dedicated function that can be covered by unit tests. |
Looking at the changes of this PR, I agree with @timebertt. A unit test seems more reasonable for this scenario - it's a lightweight mutation, and re-instantiating a new manager + controller in an integration test seems a bit extreme (I'm not strictly against it, though). |
/hold I will add a corresponding unit test. |
46a5666
to
14cd422
Compare
After offline discussion with @rfranzke, I updated the pull request including a unit test. PTAL. /unhold |
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 reworking this PR :)
pkg/gardenlet/controller/controllerinstallation/controllerinstallation/reconciler.go
Outdated
Show resolved
Hide resolved
pkg/gardenlet/controller/controllerinstallation/controllerinstallation/reconciler.go
Outdated
Show resolved
Hide resolved
pkg/gardenlet/controller/controllerinstallation/controllerinstallation/reconciler_test.go
Outdated
Show resolved
Hide resolved
pkg/gardenlet/controller/controllerinstallation/controllerinstallation/reconciler_test.go
Outdated
Show resolved
Hide resolved
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 addressing my concerns. The PR generally looks good now.
I only left some testing nits.
pkg/gardenlet/controller/controllerinstallation/controllerinstallation/reconciler_test.go
Outdated
Show resolved
Hide resolved
pkg/gardenlet/controller/controllerinstallation/controllerinstallation/reconciler_test.go
Show resolved
Hide resolved
pkg/gardenlet/controller/controllerinstallation/controllerinstallation/reconciler_test.go
Outdated
Show resolved
Hide resolved
pkg/gardenlet/controller/controllerinstallation/controllerinstallation/reconciler_test.go
Outdated
Show resolved
Hide resolved
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.
Lovely, this looks great now :)
LGTM label has been added. Git tree hash: 65ac7b80fb5ff2465a6be20fef86b53103d834d2
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: timebertt 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 |
/hold until #11593 is merged 😇 |
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.
Sorry for joining the party only late, but since this has to be rebased after #11593 got merged (I guess 🥲), here a few nit suggestions 😇
pkg/gardenlet/controller/controllerinstallation/controllerinstallation/reconciler.go
Outdated
Show resolved
Hide resolved
pkg/gardenlet/controller/controllerinstallation/controllerinstallation/reconciler.go
Outdated
Show resolved
Hide resolved
pkg/gardenlet/controller/controllerinstallation/controllerinstallation/reconciler.go
Outdated
Show resolved
Hide resolved
pkg/gardenlet/controller/controllerinstallation/controllerinstallation/reconciler.go
Outdated
Show resolved
Hide resolved
ports for controller installations. In the autonomous shoot cluster scenario, some controller installations may need to run in the host network. They may also need to be scaled down in a single node scenario or may need to tolerate additional taints during bootstrap. Running multiple controller installations in the host network also requires managing the usable ports so that two controllers do not clash in their port usage. This change adds the one flag to the controller installation reconciler that will trigger the corresponding changes. Notably, the handling of the usable ports is focussed on the `gardenadm` scenario and is explicitly not supposed to be run as a controller.
Removed state from reconciler and reused `utilsnet.SuggestPort(...)` instead.
e68b656
to
be8bdbd
Compare
/unhold as #11593 has been merged. |
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: 58e20e48320245af3421da4e28fa61ee3930f873
|
How to categorize this PR?
/area ipcei
/kind enhancement
What this PR does / why we need it:
Allow to configure
hostNetwork
,replicas
,tolerations
and usable ports for controller installations.In the autonomous shoot cluster scenario, some controller installations may need to run in the host network. They may also need to be scaled down in a single node scenario or may need to tolerate additional taints during bootstrap. Running multiple controller installations in the host network also requires managing the usable ports so that two controllers
do not clash in their port usage.
This change adds the one flag to the controller installation reconciler that will trigger the corresponding changes.
Notably, the handling of the usable ports is focussed on the
gardenadm
scenario and is explicitly not supposed to be run as a controller.Which issue(s) this PR fixes:
Part of #2906
Release note: