-
Notifications
You must be signed in to change notification settings - Fork 525
[GEP-28] gardenadm discover
#12570
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
[GEP-28] gardenadm discover
#12570
Conversation
Skipping CI for Draft Pull Request. |
/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.
Thanks for looking into the simplifying the autonomous shoot cluster experience when connected to a Gardener landscape. The reuse of the graph framework makes the resource graph calculation a lot less duplicative than it would be otherwise.
needed for audit policy in shoot spec (for example)
1c4b1a8
to
aa6320e
Compare
- path to shoot manifest file is the first (and only) argument - `-d, --config-dir` (optional) for providing a path to a directory where the configuration should be downloaded to. if not provided, the directory of the shoot manifest is used - `-k, --kubeconfig` (optional) for providing a kubeconfig to the garden cluster from where the configuration should be downloaded
- prevent spam in `gardenadm discover` - for the usage in `gardener-admission-controller`, we never really needed to look at these logs in the past 4-5 years, so I guess we are good moving them to debug level
aa6320e
to
b6f3e01
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.
/lgtm
/approve
LGTM label has been added. Git tree hash: 1a3e9687bec5bae5f0209075e1563d6510ff9cc9
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ScheererJ 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 |
* AutonomousBotanist also handles `ConfigMap`s needed for audit policy in shoot spec (for example) * Prepare options - path to shoot manifest file is the first (and only) argument - `-d, --config-dir` (optional) for providing a path to a directory where the configuration should be downloaded to. if not provided, the directory of the shoot manifest is used - `-k, --kubeconfig` (optional) for providing a kubeconfig to the garden cluster from where the configuration should be downloaded * Default kubeconfig path option * Prefactor: Move `graph` package to `pkg/utils` * VertexTypes can create a new `client.Object` * Export some types from the `graph` package * Move graph logs to `V(1)` - prevent spam in `gardenadm discover` - for the usage in `gardener-admission-controller`, we never really needed to look at these logs in the past 4-5 years, so I guess we are good moving them to debug level * Read shoot manifest and create client * `gardenadm discover` * Unit tests * Address PR review feedback
How to categorize this PR?
/area ipcei
/kind enhancement
What this PR does / why we need it:
This PR implements
gardenadm discover
. The goal of this command is to connect to an existing Gardener system (ideally, the one where the to-be-created autonomous shoot cluster is registered with later), and download the required configuration files (CloudProfile
,ControllerRegistration
, etc.).It takes a path to a file containing a
Shoot
manifest and uses thegraph
package (currently only used bygardener-admission-controller
's seed authorizer webhook) in order to determine the dependent resources.Those are then downloaded and exported into dedicated files. Missing resources are ignored.
Which issue(s) this PR fixes:
Part of #2906
Special notes for your reviewer:
/cc @ScheererJ @timebertt
PR is still in draft because unit tests are missing - submitted for early feedback :)
Release note: