-
Notifications
You must be signed in to change notification settings - Fork 527
Inject extension garden access into ControllerInstallations
#8204
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
Inject extension garden access into ControllerInstallations
#8204
Conversation
/assign |
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.
Sweet, nice PR, well structured!
...ation/gardenlet/controllerinstallation/controllerinstallation/controllerinstallation_test.go
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
Thanks for your review @rfranzke. I address all suggestions, PTAL :) |
/retest-required |
Thanks, looks good now except for the failing unit test 👀 |
With the previous commits, `InjectGenericKubeconfig` also injects into init containers which makes vali unit tests fail. Instead of working around it in the test, we adapt the component to only inject the kubeconfig into the `kube-rbac-proxy` container. The other containers shouldn't need it.
Yep, already on it. Found that it was a side-effect of injecting the generic kubeconfig also into init containers :) |
/lgtm |
LGTM label has been added. Git tree hash: 0b83c716f886dd39b04034e5d4f96dfee4cbae75
|
[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. |
…er#8204) * Extend docs for feature * Prefactor: allow executing controllerinstallation test against existing test env * Create generic garden kubeconfig in extension namespace * Prefactor: make `ShootAccessSecret` utility reusable for garden access secrets * Create garden access secret in extension namespace * Prefactor: make utility for injecting generic kubeconfig reusable * Inject garden access into `ControllerInstallation` objects * provider-local: verify garden access * provider-local: add `NetworkPolicy` for talking to garden cluster * Apply docs suggestions * Drop abstract section * Address review suggestions * vali: only inject generic kubeconfig where needed With the previous commits, `InjectGenericKubeconfig` also injects into init containers which makes vali unit tests fail. Instead of working around it in the test, we adapt the component to only inject the kubeconfig into the `kube-rbac-proxy` container. The other containers shouldn't need it.
…er#8204) * Extend docs for feature * Prefactor: allow executing controllerinstallation test against existing test env * Create generic garden kubeconfig in extension namespace * Prefactor: make `ShootAccessSecret` utility reusable for garden access secrets * Create garden access secret in extension namespace * Prefactor: make utility for injecting generic kubeconfig reusable * Inject garden access into `ControllerInstallation` objects * provider-local: verify garden access * provider-local: add `NetworkPolicy` for talking to garden cluster * Apply docs suggestions * Drop abstract section * Address review suggestions * vali: only inject generic kubeconfig where needed With the previous commits, `InjectGenericKubeconfig` also injects into init containers which makes vali unit tests fail. Instead of working around it in the test, we adapt the component to only inject the kubeconfig into the `kube-rbac-proxy` container. The other containers shouldn't need it.
How to categorize this PR?
/area security usability
/kind enhancement
What this PR does / why we need it:
This PR builds upon #8032 to equip extensions with access to the garden cluster.
For this, we
ControllerInstallation
Extensions don't have any permissions in the garden cluster right now, only those in
gardener.cloud:system:read-global-resources
. TheServiceAccounts
still need to be handled inSeed{Authorizer,Restriction}
.Which issue(s) this PR fixes:
Part of #8001
Special notes for your reviewer:
/cc @rfranzke
Based on https://github.com/gardener-community/hackathon/blob/main/2023-05_Leverkusen/README.md#-garden-cluster-access-for-extensions-in-seed-clusters / https://github.com/rfranzke/gardener/tree/hackathon/extensions-garden-access
Release note: