diff --git a/pkg/work/spoke/controllers/manifestcontroller/manifestwork_controller.go b/pkg/work/spoke/controllers/manifestcontroller/manifestwork_controller.go index 5eb842ad0..b7cda5d6e 100644 --- a/pkg/work/spoke/controllers/manifestcontroller/manifestwork_controller.go +++ b/pkg/work/spoke/controllers/manifestcontroller/manifestwork_controller.go @@ -296,6 +296,12 @@ func (m *ManifestWorkController) applyOneManifest( return result } + // ignore the required object UID to avoid UID precondition failed error + if len(required.GetUID()) != 0 { + klog.Warningf("Ignore the UID %s for the manifest index %d", required.GetUID(), index) + required.SetUID("") + } + resMeta, gvr, err := helper.BuildResourceMeta(index, required, m.restMapper) result.resourceMeta = resMeta if err != nil {