Skip to content

Commit

Permalink
karmada operator: fixed karmada label beinging overwritten
Browse files Browse the repository at this point in the history
Signed-off-by: calvin <wen.chen@daocloud.io>
  • Loading branch information
calvin committed Aug 9, 2023
1 parent 13935e0 commit fd7299e
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 fd7299e

Please sign in to comment.