1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

fix generateName mutation (#5146)

This commit is contained in:
Vyankatesh Kudtarkar 2022-11-07 19:50:50 +05:30 committed by GitHub
parent a6e866fe1f
commit c639c6d681
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -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
}

View file

@ -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,