Skip to content
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 support for the shoot.gardener.cloud/use-as-seed annotation #6379

Merged
merged 2 commits into from
Jul 25, 2022

Conversation

ialidzhikov
Copy link
Member

@ialidzhikov ialidzhikov commented Jul 21, 2022

How to categorize this PR?
/area quality
/kind cleanup
/kind api-change

What this PR does / why we need it:
This PR drops the support for the shoot.gardener.cloud/use-as-seed annotation by removing the gardenlet's shooted seed registration (SSR) controller.

Which issue(s) this PR fixes:
Part of #6305

Release note:

The already deprecated `shoot.gardener.cloud/use-as-seed` annotation (since v1.18.0) is no longer supported for creating Shooted Seed clusters. Please check the following [documentation](https://github.com/gardener/gardener/blob/v1.51.0/docs/usage/managed_seed.md#migrating-from-the-use-as-seed-annotation-to-managedseeds) on how to migrate from the `use-as-seed` annotation to `ManagedSeeds`. Before updating to this version of Gardener, make sure that you migrated to `ManagedSeeds` and that you no longer have usages of the `use-as-seed` annotation on the landscape.

@gardener-prow gardener-prow bot added area/quality Output qualification (tests, checks, scans, automation in general, etc.) related kind/cleanup Something that is not needed anymore and can be cleaned up kind/api-change API change with impact on API users cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. labels Jul 21, 2022
@gardener-prow gardener-prow bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 21, 2022
@gardener-prow
Copy link
Contributor

gardener-prow bot commented Jul 21, 2022

@ialidzhikov: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-gardener-apidiff 0be11b0 link false /test pull-gardener-apidiff

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.

@timebertt
Copy link
Member

/assign

Copy link
Member

@timebertt timebertt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice PR, thank you!

I just found one left-over from the migration that is actually not directly related to this PR.
The PR as such
/lgtm

@@ -495,21 +494,6 @@ func validateKubeControllerManagerUpdate(newConfig, oldConfig *core.KubeControll
return allErrs
}

func validateAddonsUpdate(new, old *core.Addons, shootUseAsSeed bool, fldPath *field.Path) field.ErrorList {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just figured out, that there is no similar validation for Shoots referenced by ManagedSeeds.

There is validation that denies enabling the ingress controller on ManagedSeeds if the referenced Shoot already enables the addon:

if spec.Ingress != nil {
if gardencorehelper.NginxIngressEnabled(shoot.Spec.Addons) {
allErrs = append(allErrs, field.Forbidden(fldPath.Child("ingress"), fmt.Sprintf("seed ingress controller cannot be enabled on shoot %s", kutil.ObjectName(shoot))))
}

However, there is no validation for the other direction. I.e., you can update the Shoot to enable the nginx ingress addon, even if the referencing ManagedSeed already enables the addon.

This is only partly related to this PR, but I'm wondering whether we such add such validation.
(Maybe it's not worth the effort though and rather an edge case that doesn't need validation)
Looking for opinions :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, there is no validation for the other direction. I.e., you can update the Shoot to enable the nginx ingress addon, even if the referencing ManagedSeed already enables the addon.

Valid point, it seems that I overlooked this case. For now I can try to preserve the existing logic. Instead of checking for the shootUseAsSeed annotation, I can try to check if the Shoot is ManagedSeed, and if yes -> forbid enabling the nginx-ingress addon from the Shoot spec.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to add this validation as part of the PR that adds the VPA "enforcement" - ref #6388 (WIP for now as I have to test thoroughly and add docs about the new validations that we introduce).

PS. Now going one more time over the discussion, I guess I also need to do the changes in ShootValidation admission plugin because the ManagedSeed admission plugin won't be invoked on changes to the Shoot spec.
TL;DR let's do this as part of #6388. As you shared in today's master we don't have such validation for ManagedSeeds (only for the legacy use-as-seed annotation).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking care! Sounds good to me :)

@gardener-prow gardener-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jul 22, 2022
@timebertt
Copy link
Member

/approve

@gardener-prow
Copy link
Contributor

gardener-prow bot commented Jul 25, 2022

[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 /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 Jul 25, 2022
@gardener-prow gardener-prow bot merged commit 9044fe3 into gardener:master Jul 25, 2022
@ialidzhikov ialidzhikov deleted the cleanup/use-as-seed branch July 25, 2022 06:20
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/quality Output qualification (tests, checks, scans, automation in general, etc.) related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/api-change API change with impact on API users kind/cleanup Something that is not needed anymore and can be cleaned up 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.

None yet

2 participants