Apply ownerref eventhough other field is ignored (#847)

Signed-off-by: Jian Qiu <jqiu@redhat.com>
This commit is contained in:
Jian Qiu
2025-02-25 02:16:45 +00:00
committed by GitHub
parent b0f863cd27
commit 741bf1c60f
+3 -1
View File
@@ -103,7 +103,9 @@ func (c *ServerSideApply) Apply(
// skip the apply operation when the hash of the existing resource matches the required hash
existingHash := existing.GetAnnotations()[workapiv1.ManifestConfigSpecHashAnnotationKey]
if requiredHash == existingHash {
return existing, nil
// still needs to apply ownerref since it might be changed due to deleteoption update.
err := helper.ApplyOwnerReferences(ctx, c.client, gvr, existing, owner)
return existing, err
}
}
}