-
Notifications
You must be signed in to change notification settings - Fork 451
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
Drop support for the shoot.gardener.cloud/use-as-seed
annotation
#6379
Conversation
@ialidzhikov: 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. |
/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.
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 { |
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.
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:
gardener/plugin/pkg/managedseed/validator/admission.go
Lines 282 to 285 in 2e3d605
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 :)
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.
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.
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.
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).
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.
Thank you for taking care! Sounds good to me :)
/approve |
[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 |
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: