1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/pkg/engine/mutate/patch
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
..
buffer.go chore: enable ifshort linter (#3945) 2022-05-17 18:55:13 +00:00
patches.go refactor: engine rule response creation (#6784) 2023-04-05 10:35:38 +00:00
patchesUtils.go feat: Removal of multiple elements using JSON patch in a foreach loop (#6335) 2023-04-13 17:34:56 +00:00
patchesUtils_test.go feat: Removal of multiple elements using JSON patch in a foreach loop (#6335) 2023-04-13 17:34:56 +00:00
patchJSON6902.go refactor: engine rule response creation (#6784) 2023-04-05 10:35:38 +00:00
patchJSON6902_test.go refactor: engine rule response creation (#6784) 2023-04-05 10:35:38 +00:00
strategicMergePatch.go refactor: engine rule response creation (#6784) 2023-04-05 10:35:38 +00:00
strategicMergePatch_test.go refactor: improve engine logger management (#6280) 2023-02-09 15:15:51 +00:00
strategicPreprocessing.go Remove dependency on github.com/pkg/errors (#6165) 2023-02-01 14:38:04 +08:00
strategicPreprocessing_test.go refactor: improve engine logger management (#6280) 2023-02-09 15:15:51 +00:00