From 341f6348f5496b29705d4ab364e0b7caefd34f25 Mon Sep 17 00:00:00 2001 From: Arnob kumar saha Date: Wed, 9 Oct 2024 15:37:57 +0600 Subject: [PATCH] Currectly compare generation; Always assign Signed-off-by: Arnob kumar saha --- client/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/client.go b/client/client.go index b0f04587d..519c087df 100644 --- a/client/client.go +++ b/client/client.go @@ -116,10 +116,10 @@ func CreateOrPatch(ctx context.Context, c client.Client, obj client.Object, tran } vt := kutil.VerbUnchanged - if obj.GetGeneration() != mod.GetGeneration() { + if cur.GetGeneration() != mod.GetGeneration() { vt = kutil.VerbPatched - assign(obj, mod) } + assign(obj, mod) return vt, nil }