Skip to content

Conversation

rfranzke
Copy link
Member

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 the graph package (currently only used by gardener-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:

NONE

Copy link
Contributor

gardener-prow bot commented Jul 18, 2025

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 requested review from ScheererJ and timebertt July 18, 2025 13:29
@gardener-prow gardener-prow bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. area/ipcei IPCEI (Important Project of Common European Interest) kind/enhancement Enhancement, improvement, extension cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. labels Jul 18, 2025
@gardener-prow gardener-prow bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 18, 2025
@ScheererJ
Copy link
Member

/assign

Copy link
Member

@ScheererJ ScheererJ left a 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.

@gardener-prow gardener-prow bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 22, 2025
needed for audit policy in shoot spec (for example)
@gardener-prow gardener-prow bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 7, 2025
@rfranzke rfranzke marked this pull request as ready for review August 7, 2025 06:35
@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 Aug 7, 2025
@rfranzke rfranzke requested a review from ScheererJ August 7, 2025 06:35
rfranzke added 10 commits August 7, 2025 08:44
- 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
Copy link
Member

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

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Aug 18, 2025
Copy link
Contributor

gardener-prow bot commented Aug 18, 2025

LGTM label has been added.

Git tree hash: 1a3e9687bec5bae5f0209075e1563d6510ff9cc9

Copy link
Contributor

gardener-prow bot commented Aug 18, 2025

[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 /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 Aug 18, 2025
@gardener-prow gardener-prow bot merged commit 759f2e8 into gardener:master Aug 18, 2025
19 checks passed
@rfranzke rfranzke deleted the gep28/discover branch August 18, 2025 13:29
Duciwuci pushed a commit to stackitcloud/gardener that referenced this pull request Sep 1, 2025
* 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
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/ipcei IPCEI (Important Project of Common European Interest) 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.

2 participants