1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
kyverno/pkg/engine
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
..
anchor Replaces manually written logic with regex for matching anchor elements (#6133) 2023-01-30 12:17:19 +00:00
api refactor: introduce jmespath interface (#6882) 2023-04-13 11:29:40 +00:00
apicall refactor: introduce jmespath interface (#6882) 2023-04-13 11:29:40 +00:00
context refactor: introduce jmespath interface (#6882) 2023-04-13 11:29:40 +00:00
handlers feat: Removal of multiple elements using JSON patch in a foreach loop (#6335) 2023-04-13 17:34:56 +00:00
internal fix: account for cosign default repository (#6849) 2023-04-11 11:19:40 +00:00
jmespath feat: add image_normalize filter (#6911) 2023-04-13 16:13:40 +00:00
jsonutils refactor: move util funcs in sub packages (#5754) 2022-12-22 06:39:54 +00:00
mutate feat: Removal of multiple elements using JSON patch in a foreach loop (#6335) 2023-04-13 17:34:56 +00:00
operator fix: change inrange operator regexs (#5962) 2023-01-16 16:23:36 +01:00
pattern test: add pattern pkg unit tests (#6277) 2023-02-10 14:17:36 +08:00
policycontext refactor: introduce jmespath interface (#6882) 2023-04-13 11:29:40 +00:00
resources refactor: introduce engine handler (#6680) 2023-03-24 16:24:00 +00:00
test refactor: introduce jmespath interface (#6882) 2023-04-13 11:29:40 +00:00
utils fix ns selector (#6887) 2023-04-13 08:17:28 +00:00
validate update k8s.gcr.io to registry.k8s.io (#6340) 2023-02-20 13:40:12 +00:00
variables refactor: introduce jmespath interface (#6882) 2023-04-13 11:29:40 +00:00
wildcards Replaces manually written logic with regex for matching anchor elements (#6133) 2023-01-30 12:17:19 +00:00
attestation_test.go refactor: introduce jmespath interface (#6882) 2023-04-13 11:29:40 +00:00
background.go feat: add subresource support to resource filters (#6780) 2023-04-05 13:51:07 +00:00
engine.go refactor: introduce jmespath interface (#6882) 2023-04-13 11:29:40 +00:00
exceptions.go refactor: engine rule response creation (#6784) 2023-04-05 10:35:38 +00:00
forceMutate.go refactor: engine rule response creation (#6784) 2023-04-05 10:35:38 +00:00
forceMutate_test.go refactor: introduce jmespath interface (#6882) 2023-04-13 11:29:40 +00:00
generation.go refactor: don't process context/preconditions in invokeHandler (#6751) 2023-04-03 12:57:48 +08:00
image_verify.go refactor: policy response (#6877) 2023-04-12 16:20:42 +00:00
image_verify_test.go refactor: introduce jmespath interface (#6882) 2023-04-13 11:29:40 +00:00
metrics.go refactor: engine execution stats (#6792) 2023-04-05 12:27:18 +00:00
mutation.go refactor: policy response (#6877) 2023-04-12 16:20:42 +00:00
mutation_test.go refactor: introduce jmespath interface (#6882) 2023-04-13 11:29:40 +00:00
policy_context.go refactor: don't process context/preconditions in invokeHandler (#6751) 2023-04-03 12:57:48 +08:00
validation.go refactor: policy response (#6877) 2023-04-12 16:20:42 +00:00
validation_test.go refactor: introduce jmespath interface (#6882) 2023-04-13 11:29:40 +00:00