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:
parent
a6e866fe1f
commit
c639c6d681
2 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue