Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
fix cluster labels patch format.
Browse files Browse the repository at this point in the history
Signed-off-by: morvencao <[email protected]>
  • Loading branch information
morvencao committed Nov 23, 2022
1 parent 3028100 commit 9c6ee0c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/hub/addon/discovery_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,13 @@ func (c *addOnFeatureDiscoveryController) syncAddOn(ctx context.Context, cluster
key := fmt.Sprintf("%s%s", addOnFeaturePrefix, addOnName)
if _, exist := labels[key]; exist {
delete(labels, key)
labels[fmt.Sprintf("%s-", key)] = ""
}
case err != nil:
return err
case !addOn.DeletionTimestamp.IsZero():
key := fmt.Sprintf("%s%s", addOnFeaturePrefix, addOnName)
if _, exist := labels[key]; exist {
delete(labels, key)
labels[fmt.Sprintf("%s-", key)] = ""
}
default:
key := fmt.Sprintf("%s%s", addOnFeaturePrefix, addOn.Name)
Expand Down Expand Up @@ -219,7 +217,6 @@ func (c *addOnFeatureDiscoveryController) syncCluster(ctx context.Context, clust
if !addOn.DeletionTimestamp.IsZero() {
if _, exist := addOnLabels[key]; exist {
delete(addOnLabels, key)
addOnLabels[fmt.Sprintf("%s-", key)] = ""
}
continue
}
Expand All @@ -236,7 +233,6 @@ func (c *addOnFeatureDiscoveryController) syncCluster(ctx context.Context, clust

if _, ok := newAddonLabels[key]; !ok {
delete(addOnLabels, key)
addOnLabels[fmt.Sprintf("%s-", key)] = ""
}
}

Expand Down

0 comments on commit 9c6ee0c

Please sign in to comment.