Merge pull request #4997 from XiShanYongYe-Chang/remove-unused-id-label

remove unused id label in the dependencise distributor
This commit is contained in:
karmada-bot 2024-05-30 11:22:29 +08:00 committed by GitHub
commit 9c85fbddf9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 6 deletions

View File

@ -63,10 +63,6 @@ import (
// well-know labels
const (
// dependedIDLabelKey is added to the attached binding, it describes the
// resource id of the independent binding which the attached binding depends on.
dependedIDLabelKey = "resourcebinding.karmada.io/depended-id"
// dependedByLabelKeyPrefix is added to the attached binding, it is the
// prefix of the label key which specifying the current attached binding
// referred by which independent binding.
@ -687,8 +683,6 @@ func buildAttachedBinding(independentBinding *workv1alpha2.ResourceBinding, obje
Clusters: independentBinding.Spec.Clusters,
})
bindingID := util.GetLabelValue(independentBinding.Labels, workv1alpha2.ResourceBindingPermanentIDLabel)
dependedLabels = util.DedupeAndMergeLabels(dependedLabels, map[string]string{dependedIDLabelKey: bindingID})
return &workv1alpha2.ResourceBinding{
ObjectMeta: metav1.ObjectMeta{
Name: names.GenerateBindingName(object.GetKind(), object.GetName()),