diff --git a/pkg/util/helper/work.go b/pkg/util/helper/work.go index ed83e7db1714..9af79a4ceaf8 100644 --- a/pkg/util/helper/work.go +++ b/pkg/util/helper/work.go @@ -80,8 +80,8 @@ func CreateOrUpdateWork(client client.Client, workMeta metav1.ObjectMeta, resour // TODO: Delete following one line in release-1.9 delete(runtimeObject.Labels, workv1alpha2.WorkUIDLabel) 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()}) }