diff --git a/pkg/engine/mutate/patch/patchesUtils.go b/pkg/engine/mutate/patch/patchesUtils.go index 7c7c1c87ff..05491e3a91 100644 --- a/pkg/engine/mutate/patch/patchesUtils.go +++ b/pkg/engine/mutate/patch/patchesUtils.go @@ -140,6 +140,7 @@ func ignorePatch(path string) bool { !strings.Contains(path, "/metadata/annotations") && !strings.Contains(path, "/metadata/labels") && !strings.Contains(path, "/metadata/ownerReferences") && + !strings.Contains(path, "/metadata/generateName") && !strings.Contains(path, "/metadata/finalizers") { return true } diff --git a/pkg/engine/mutate/patch/patchesUtils_test.go b/pkg/engine/mutate/patch/patchesUtils_test.go index 759d397c70..ae7fd0c0da 100644 --- a/pkg/engine/mutate/patch/patchesUtils_test.go +++ b/pkg/engine/mutate/patch/patchesUtils_test.go @@ -177,6 +177,10 @@ func Test_ignorePath(t *testing.T) { path: "/metadata/finalizers", ignore: false, }, + { + path: "/metadata/generateName", + ignore: false, + }, { path: "/metadata/creationTimestamp", ignore: true,