1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
kyverno/pkg/engine/mutate
Ashwin P f2fc0d13a8
feat: Removal of multiple elements using JSON patch in a foreach loop (#6335)
* handle mismatch of indices for removal operation while using foreach in mutate rule

Signed-off-by: Ashwin901 <ashwinprasanna9@gmail.com>

* Refactor elementIsRemoved function to pass 'gofumpt' check

Signed-off-by: Ashwin901 <ashwinprasanna9@gmail.com>

* traverse elements array in reverse order to handle removal of multiple elements

Signed-off-by: Ashwin901 <ashwinprasanna9@gmail.com>

* handle failing test case by changing assertion order

Signed-off-by: Ashwin901 <ashwinprasanna9@gmail.com>

* add kuttl tests

Signed-off-by: Ashwin901 <ashwinprasanna9@gmail.com>

* remove cleanup file from kuttl test

Signed-off-by: Ashwin901 <ashwinprasanna9@gmail.com>

* sort patches at the end

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix policy

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* fix

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

* move tests

Signed-off-by: ShutingZhao <shuting@nirmata.com>

---------

Signed-off-by: Ashwin901 <ashwinprasanna9@gmail.com>
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: ShutingZhao <shuting@nirmata.com>
2023-04-13 17:34:56 +00:00
..
patch feat: Removal of multiple elements using JSON patch in a foreach loop (#6335) 2023-04-13 17:34:56 +00:00
mutation.go refactor: engine rule response creation (#6784) 2023-04-05 10:35:38 +00:00
mutation_test.go refactor: introduce jmespath interface (#6882) 2023-04-13 11:29:40 +00:00