mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-29 19:05:27 +00:00
set resourceVersion before update (#5906)
Signed-off-by: ShutingZhao <shuting@nirmata.com> Signed-off-by: ShutingZhao <shuting@nirmata.com>
This commit is contained in:
parent
9033f35e29
commit
de2fcc8b7b
1 changed files with 1 additions and 1 deletions
|
@ -128,7 +128,7 @@ func (c *MutateExistingController) ProcessUR(ur *kyvernov1beta1.UpdateRequest) e
|
|||
}
|
||||
|
||||
if r.Status == response.RuleStatusPass {
|
||||
patchedNew.SetResourceVersion("")
|
||||
patchedNew.SetResourceVersion(patched.GetResourceVersion())
|
||||
var updateErr error
|
||||
if patchedTargetSubresourceName == "status" {
|
||||
_, updateErr = c.client.UpdateStatusResource(context.TODO(), patchedNew.GetAPIVersion(), patchedNew.GetKind(), patchedNew.GetNamespace(), patchedNew.Object, false)
|
||||
|
|
Loading…
Add table
Reference in a new issue