Skip to content

Conversation

rfranzke
Copy link
Member

due to potential naming conflicts when users also use seed.gardener.cloud/ as prefix for their labels (not ideal, they should actually use a unique prefix (e.g., seed.my.cool.domain.com/), but we cannot prevent it for historic reasons

How to categorize this PR?

/area usability
/kind regression

What this PR does / why we need it:
This PR renames the seed.gardener.cloud/ prefix to name.seed.gardener.cloud/ due to potential naming conflicts when users also useseed.gardener.cloud/ as prefix for their labels (not ideal, they should actually use a unique prefix (e.g., seed.my.cool.domain.com/), but we cannot prevent it for historic reasons.

Which issue(s) this PR fixes:
Follow-up of #11062

Special notes for your reviewer:
/cc @marc1404

Release note:

A bug which prevented usage of labels with `seed.gardener.cloud/` prefix on `Seed`, `ManagedSeed`, `BackupEntry`, and `Shoot` resources has been fixed.
All `Seed`s are now automatically labeled with `name.seed.gardener.cloud/<name>=true` (⚠ no longer `seed.gardener.cloud/<name>=true`) where `<name>` is their own name, and (if applicable) the name of their parent seed in case they are managed seeds. This label can be used as selector for requests.

@gardener-prow gardener-prow bot requested a review from marc1404 February 21, 2025 08:44
@gardener-prow gardener-prow bot added area/usability Usability related kind/regression Bug that hit us already in the past and that is reappearing/requires a proper solution cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. labels Feb 21, 2025
@rfranzke
Copy link
Member Author

/cherry-pick release-v1.113

@rfranzke
Copy link
Member Author

/cherry-pick release-v1.112

@rfranzke
Copy link
Member Author

/cherry-pick release-v1.111

@gardener-ci-robot
Copy link
Contributor

@rfranzke: once the present PR merges, I will cherry-pick it on top of release-v1.113 in a new PR and assign it to you.

In response to this:

/cherry-pick release-v1.113

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.

@gardener-ci-robot
Copy link
Contributor

@rfranzke: once the present PR merges, I will cherry-pick it on top of release-v1.112 in a new PR and assign it to you.

In response to this:

/cherry-pick release-v1.112

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.

@gardener-ci-robot
Copy link
Contributor

@rfranzke: once the present PR merges, I will cherry-pick it on top of release-v1.111 in a new PR and assign it to you.

In response to this:

/cherry-pick release-v1.111

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.

@rfranzke
Copy link
Member Author

/cherry-pick release-v1.110

@gardener-prow gardener-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 21, 2025
@gardener-ci-robot
Copy link
Contributor

@rfranzke: once the present PR merges, I will cherry-pick it on top of release-v1.110 in a new PR and assign it to you.

In response to this:

/cherry-pick release-v1.110

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.

@marc1404 marc1404 changed the title Rename seed.gardener.cloud/ prefix to .name.seed.gardener.cloud/ Rename seed.gardener.cloud/ prefix to name.seed.gardener.cloud/ Feb 21, 2025
@rfranzke rfranzke force-pushed the fix/seed-name-prefix branch 2 times, most recently from 84e5c43 to f17b83d Compare February 21, 2025 09:12
Copy link
Contributor

@plkokanov plkokanov left a comment

Choose a reason for hiding this comment

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

Could you also update the docs https://github.com/gardener/gardener/blob/master/docs/concepts/apiserver-admission-plugins.md#seedmutator with the new label name

And this comment

// MaintainSeedNameLabels maintains the seed.gardener.cloud/<name>=true labels on the given object.

due to potential naming conflicts when users also use
`seed.gardener.cloud/` as prefix for their labels (not ideal, they
should actually use a unique prefix (e.g., `seed.my.cool.domain.com/`),
but we cannot prevent it for historic reasons
@rfranzke rfranzke force-pushed the fix/seed-name-prefix branch from f17b83d to eee6057 Compare February 21, 2025 10:24
Copy link
Member

@marc1404 marc1404 left a comment

Choose a reason for hiding this comment

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

/lgtm

Thank you! 🙏

It works in my local setup after upgrading Gardener Seed, Shoot, ManagedSeed, and BackupEntry have both seed.gardener.cloud/* and name.seed.gardener.cloud/* labels.

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

gardener-prow bot commented Feb 21, 2025

LGTM label has been added.

Git tree hash: a723e4426e04f5fc14d64cc5c67a0cfc8748311c

Copy link
Contributor

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

Copy link
Contributor

gardener-prow bot commented Feb 21, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: plkokanov

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 Feb 21, 2025
@plkokanov
Copy link
Contributor

It works in my local setup after upgrading Gardener Seed, Shoot, ManagedSeed, and BackupEntry have both seed.gardener.cloud/* and name.seed.gardener.cloud/* labels.

Same behaviour also in my local setup with multiple seeds.

@gardener-prow gardener-prow bot merged commit 98696af into gardener:master Feb 21, 2025
18 of 19 checks passed
@gardener-ci-robot
Copy link
Contributor

@rfranzke: new pull request created: #11485

In response to this:

/cherry-pick release-v1.113

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.

@gardener-ci-robot
Copy link
Contributor

@rfranzke: new pull request created: #11486

In response to this:

/cherry-pick release-v1.112

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.

@gardener-ci-robot
Copy link
Contributor

@rfranzke: #11479 failed to apply on top of branch "release-v1.111":

Applying: Rename `seed.gardener.cloud/` prefix to `.name.seed.gardener.cloud/`
Using index info to reconstruct a base tree...
M	cmd/gardenlet/app/app.go
M	pkg/apis/core/v1beta1/constants/types_constants.go
M	pkg/apiserver/registry/core/shoot/strategy_test.go
M	plugin/pkg/managedseed/validator/admission_test.go
A	plugin/pkg/seed/mutator/admission_test.go
M	test/integration/gardenlet/controllerinstallation/controllerinstallation/controllerinstallation_test.go
Falling back to patching base and 3-way merge...
Auto-merging test/integration/gardenlet/controllerinstallation/controllerinstallation/controllerinstallation_test.go
CONFLICT (modify/delete): plugin/pkg/seed/mutator/admission_test.go deleted in HEAD and modified in Rename `seed.gardener.cloud/` prefix to `.name.seed.gardener.cloud/`. Version Rename `seed.gardener.cloud/` prefix to `.name.seed.gardener.cloud/` of plugin/pkg/seed/mutator/admission_test.go left in tree.
Auto-merging plugin/pkg/managedseed/validator/admission_test.go
CONFLICT (content): Merge conflict in plugin/pkg/managedseed/validator/admission_test.go
Auto-merging pkg/apiserver/registry/core/shoot/strategy_test.go
Auto-merging pkg/apis/core/v1beta1/constants/types_constants.go
Auto-merging cmd/gardenlet/app/app.go
CONFLICT (content): Merge conflict in cmd/gardenlet/app/app.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Rename `seed.gardener.cloud/` prefix to `.name.seed.gardener.cloud/`

In response to this:

/cherry-pick release-v1.111

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.

@gardener-ci-robot
Copy link
Contributor

@rfranzke: #11479 failed to apply on top of branch "release-v1.110":

Applying: Rename `seed.gardener.cloud/` prefix to `.name.seed.gardener.cloud/`
Using index info to reconstruct a base tree...
M	cmd/gardenlet/app/app.go
M	pkg/apis/core/v1beta1/constants/types_constants.go
M	pkg/apiserver/registry/core/shoot/strategy_test.go
M	plugin/pkg/managedseed/validator/admission_test.go
A	plugin/pkg/seed/mutator/admission_test.go
M	test/integration/gardenlet/controllerinstallation/controllerinstallation/controllerinstallation_test.go
Falling back to patching base and 3-way merge...
Auto-merging test/integration/gardenlet/controllerinstallation/controllerinstallation/controllerinstallation_test.go
CONFLICT (modify/delete): plugin/pkg/seed/mutator/admission_test.go deleted in HEAD and modified in Rename `seed.gardener.cloud/` prefix to `.name.seed.gardener.cloud/`. Version Rename `seed.gardener.cloud/` prefix to `.name.seed.gardener.cloud/` of plugin/pkg/seed/mutator/admission_test.go left in tree.
Auto-merging plugin/pkg/managedseed/validator/admission_test.go
CONFLICT (content): Merge conflict in plugin/pkg/managedseed/validator/admission_test.go
Auto-merging pkg/apiserver/registry/core/shoot/strategy_test.go
Auto-merging pkg/apis/core/v1beta1/constants/types_constants.go
Auto-merging cmd/gardenlet/app/app.go
CONFLICT (content): Merge conflict in cmd/gardenlet/app/app.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Rename `seed.gardener.cloud/` prefix to `.name.seed.gardener.cloud/`

In response to this:

/cherry-pick release-v1.110

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.

@rfranzke rfranzke deleted the fix/seed-name-prefix branch February 21, 2025 14:54
gardener-prow bot pushed a commit that referenced this pull request Feb 25, 2025
…er.cloud/` prefix to `name.seed.gardener.cloud/` (#11499)

* Rename `seed.gardener.cloud/` prefix to `.name.seed.gardener.cloud/`

due to potential naming conflicts when users also use
`seed.gardener.cloud/` as prefix for their labels (not ideal, they
should actually use a unique prefix (e.g., `seed.my.cool.domain.com/`),
but we cannot prevent it for historic reasons

* Migration code in GCM to re-compute seed labels

* Address PR review feedback

* Do not label managedseeds and seeds

---------

Co-authored-by: rfranzke <rafael.franzke@sap.com>
gardener-prow bot pushed a commit that referenced this pull request Feb 25, 2025
…er.cloud/` prefix to `name.seed.gardener.cloud/` (#11492)

* Rename `seed.gardener.cloud/` prefix to `.name.seed.gardener.cloud/`

due to potential naming conflicts when users also use
`seed.gardener.cloud/` as prefix for their labels (not ideal, they
should actually use a unique prefix (e.g., `seed.my.cool.domain.com/`),
but we cannot prevent it for historic reasons

* Migration code in GCM to re-compute seed labels

* Address PR review feedback

* Do not label managedseeds and seeds

---------

Co-authored-by: rfranzke <rafael.franzke@sap.com>
rfranzke added a commit to rfranzke/gardener that referenced this pull request Mar 31, 2025
rfranzke added a commit to rfranzke/gardener that referenced this pull request Mar 31, 2025
rfranzke added a commit to rfranzke/gardener that referenced this pull request Apr 1, 2025
gardener-prow bot pushed a commit that referenced this pull request Apr 4, 2025
* Cleanup migration logic for e2e upgrade tests

From #11593, released with `v1.115.0`

* Filter {Managed}Seeds in gardenlet on manager.Manager level

#11479, released with `v1.114.0`

* No longer generate empy `Secret` for `reconcile` OSC

#11004, released with `v1.111.0`
axel7born pushed a commit to axel7born/gardener that referenced this pull request Apr 11, 2025
* Cleanup migration logic for e2e upgrade tests

From gardener#11593, released with `v1.115.0`

* Filter {Managed}Seeds in gardenlet on manager.Manager level

gardener#11479, released with `v1.114.0`

* No longer generate empy `Secret` for `reconcile` OSC

gardener#11004, released with `v1.111.0`
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/usability Usability related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/regression Bug that hit us already in the past and that is reappearing/requires a proper solution lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants