-
Notifications
You must be signed in to change notification settings - Fork 496
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
Drop internal version of gardenlet.config.gardener.cloud
API
#11101
Drop internal version of gardenlet.config.gardener.cloud
API
#11101
Conversation
57c03c2
to
85a7fd6
Compare
/retest |
85a7fd6
to
52d5c8c
Compare
Rebased the PR to resolve conflicts. |
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
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! Can you keep in mind #11232 when changing the helper functions?
The gardenlet config validation calls the validation for the `SeedTemplate` on the core API's internal version. Hence, we add a helper that allows us convert the external `SeedTemplate` in the external gardenlet config API to the internal core representation where the validation is implemented.
Some code previously converted an external gardenlet config to the internal representation (e.g., `ManagedSeed{,Set}` validation, `ManagedSeed` admission, gardenlet deployer). These occurrences are adapted now to handle the external gardenlet config directly and convert only the included `SeedTemplate` to the internal version if needed (e.g., for validation, defaulting).
The operator config API reuses the `ETCDConfig` type from the gardenlet config API. gardener-operator passes these config values when instantiating the etcd and etcd-druid components. This commit switches the internal operator config API version to also use the external version of the gardenlet `ETCDConfig` type. With this, we spare the temporary conversion in gardener-operator until we drop the internal version of the operator config API. The overall goal is to tackle both components in dedicated PRs to keep them reviewable.
52d5c8c
to
cb2cebe
Compare
Thanks for the review @ary1992. I addressed your suggestions in a new commit. |
I suggest moving forward with this PR first and performing the necessary changes to the helper files in #11232. |
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!
/lgtm
/approve
LGTM label has been added. Git tree hash: 12fc3ad4eccf74572573bb293941c78fe9a8de7e
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ary1992 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-sigs/prow repository. I understand the commands that are listed here. |
/retest-required |
…ner#11101) * Prefactor: remove indirection of token requestor controllers * Move API validation The gardenlet config validation calls the validation for the `SeedTemplate` on the core API's internal version. Hence, we add a helper that allows us convert the external `SeedTemplate` in the external gardenlet config API to the internal core representation where the validation is implemented. * Move API helper * Drop internal API version * Adapt conversion Some code previously converted an external gardenlet config to the internal representation (e.g., `ManagedSeed{,Set}` validation, `ManagedSeed` admission, gardenlet deployer). These occurrences are adapted now to handle the external gardenlet config directly and convert only the included `SeedTemplate` to the internal version if needed (e.g., for validation, defaulting). * Adapt entrypoint * Adapt imports * Adapt operator config API The operator config API reuses the `ETCDConfig` type from the gardenlet config API. gardener-operator passes these config values when instantiating the etcd and etcd-druid components. This commit switches the internal operator config API version to also use the external version of the gardenlet `ETCDConfig` type. With this, we spare the temporary conversion in gardener-operator until we drop the internal version of the operator config API. The overall goal is to tackle both components in dedicated PRs to keep them reviewable. * Update skaffold dependencies * Address review suggestions
How to categorize this PR?
/area dev-productivity
/kind cleanup
What this PR does / why we need it:
This PR drops the internal version of the
gardenlet.config.gardener.cloud
API.Which issue(s) this PR fixes:
Part of #11043
Special notes for your reviewer:
This PR is probably the trickiest one to review of the overall refactoring story.
This is due to the cross-references of types and validation between 3 API groups:
Because of this, I needed to move some conversion logic of these APIs around, which makes the PR more complex to review.
The individual commits might not be entirely correct on their own (might not compile), as it was difficult to separate individual steps.
I separated the changes into individual commits by focusing on what should be reviewed with more focus than other parts (e.g., changing conversion logic vs bulk edits of imports).
Release note: