diff --git a/pkg/util/helper/work.go b/pkg/util/helper/work.go index 2ba899ef5..7266d2e31 100644 --- a/pkg/util/helper/work.go +++ b/pkg/util/helper/work.go @@ -78,8 +78,8 @@ func CreateOrUpdateWork(client client.Client, workMeta metav1.ObjectMeta, resour } runtimeObject.Spec = work.Spec - runtimeObject.Labels = work.Labels - runtimeObject.Annotations = work.Annotations + runtimeObject.Labels = util.DedupeAndMergeLabels(runtimeObject.Labels, work.Labels) + runtimeObject.Annotations = util.DedupeAndMergeAnnotations(runtimeObject.Annotations, work.Annotations) if util.GetLabelValue(runtimeObject.Labels, workv1alpha2.WorkPermanentIDLabel) == "" { runtimeObject.Labels = util.DedupeAndMergeLabels(runtimeObject.Labels, map[string]string{workv1alpha2.WorkPermanentIDLabel: uuid.New().String()}) }