Skip to content

Commit

Permalink
Merge pull request #3919 from calvin0327/fixed-karmada-label
Browse files Browse the repository at this point in the history
karmada operator: fixed karmada label beinging overwritten
  • Loading branch information
karmada-bot authored Aug 14, 2023
2 parents 54e900c + fd7299e commit 9f7215a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion operator/pkg/controller/karmada/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ func (ctrl *Controller) ensureKarmada(ctx context.Context, karmada *operatorv1al
// registering our finalizer.
updated := controllerutil.AddFinalizer(karmada, ControllerFinalizerName)
if _, isExist := karmada.Labels[DisableCascadingDeletionLabel]; !isExist {
karmada.SetLabels(labels.Set{DisableCascadingDeletionLabel: "false"})
labelMap := labels.Merge(karmada.GetLabels(), labels.Set{DisableCascadingDeletionLabel: "false"})
karmada.SetLabels(labelMap)
updated = true
}

Expand Down

0 comments on commit 9f7215a

Please sign in to comment.