ignore the manifest uid (#242)

Signed-off-by: Wei Liu <liuweixa@redhat.com>
This commit is contained in:
Wei Liu
2023-08-01 17:53:10 +08:00
committed by GitHub
parent fb347bd08e
commit 720ae29b27

View File

@@ -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 {