mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
reset resource version on update (#5157)
Signed-off-by: ShutingZhao <shuting@nirmata.com> Signed-off-by: ShutingZhao <shuting@nirmata.com>
This commit is contained in:
parent
c3740d1c5b
commit
fe7ea67f47
1 changed files with 1 additions and 0 deletions
|
@ -118,6 +118,7 @@ func (c *MutateExistingController) ProcessUR(ur *kyvernov1beta1.UpdateRequest) e
|
|||
}
|
||||
|
||||
if r.Status == response.RuleStatusPass {
|
||||
patchedNew.SetResourceVersion("")
|
||||
_, updateErr := c.client.UpdateResource(patchedNew.GetAPIVersion(), patchedNew.GetKind(), patchedNew.GetNamespace(), patchedNew.Object, false)
|
||||
if updateErr != nil {
|
||||
errs = append(errs, updateErr)
|
||||
|
|
Loading…
Add table
Reference in a new issue