1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/pkg/engine
Jim Bugwadia a9fef256c7
updates for foreach and mutate (#2891)
* updates for foreach and mutate

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* allow tests to pass on Windows

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* fix tests

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* fix linter check

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* add elementIndex variable

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* fmt

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* fix jsonResult usage

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* add mutate validation and fix error in validate.foreach

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* format

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* update message

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* do not skip validation for all array entries when one is skipped

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* add foreach tests

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* fix fmt

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* fix format errors

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* remove unused declarations

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* revert namespaceWithLabelYaml

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* fix mutate of element list

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* update CRDs

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* Update api/kyverno/v1/policy_types.go

Co-authored-by: Steven E. Harris <seh@panix.com>

* Update pkg/engine/forceMutate.go

Co-authored-by: Steven E. Harris <seh@panix.com>

* Update pkg/engine/forceMutate.go

Co-authored-by: Steven E. Harris <seh@panix.com>

* Update pkg/engine/forceMutate.go

Co-authored-by: Steven E. Harris <seh@panix.com>

* Update pkg/engine/mutation.go

Co-authored-by: Steven E. Harris <seh@panix.com>

* Update pkg/engine/mutation.go

Co-authored-by: Steven E. Harris <seh@panix.com>

* Update pkg/engine/mutation.go

Co-authored-by: Steven E. Harris <seh@panix.com>

* Update pkg/engine/validate/validate.go

Co-authored-by: Steven E. Harris <seh@panix.com>

* Update pkg/engine/validate/validate.go

Co-authored-by: Steven E. Harris <seh@panix.com>

* Update test/cli/test/custom-functions/policy.yaml

Co-authored-by: Steven E. Harris <seh@panix.com>

* Update test/cli/test/foreach/policies.yaml

Co-authored-by: Steven E. Harris <seh@panix.com>

* accept review comments and format

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* add comments to strategicMergePatch buffer

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* load context and evaluate preconditions foreach element

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* add test for foreach mutate context and precondition

* precondition testcase

* address review comments

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* update message

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

* format

Signed-off-by: Jim Bugwadia <jim@nirmata.com>

Co-authored-by: Steven E. Harris <seh@panix.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-01-05 09:36:33 +08:00
..
anchor updates for foreach and mutate (#2891) 2022-01-05 09:36:33 +08:00
common updates for foreach and mutate (#2891) 2022-01-05 09:36:33 +08:00
context updates for foreach and mutate (#2891) 2022-01-05 09:36:33 +08:00
jmespath add semver_compare JMESPath function (#2846) 2021-12-21 08:12:35 -08:00
jsonutils Fix various go lint issues (#2639) 2021-10-29 17:06:03 +02:00
mutate updates for foreach and mutate (#2891) 2022-01-05 09:36:33 +08:00
operator *Range Operators (#2622) 2021-10-29 13:48:23 +02:00
response updates for foreach and mutate (#2891) 2022-01-05 09:36:33 +08:00
utils updates for foreach and mutate (#2891) 2022-01-05 09:36:33 +08:00
validate updates for foreach and mutate (#2891) 2022-01-05 09:36:33 +08:00
variables updates for foreach and mutate (#2891) 2022-01-05 09:36:33 +08:00
wildcards updates for foreach and mutate (#2891) 2022-01-05 09:36:33 +08:00
apiPath.go Set Version to Group/Version for /apis/* URLs 2021-03-06 00:22:12 -05:00
apiPath_test.go Add unit test 2021-03-08 22:56:14 -05:00
forceMutate.go updates for foreach and mutate (#2891) 2022-01-05 09:36:33 +08:00
forceMutate_test.go updates for foreach and mutate (#2891) 2022-01-05 09:36:33 +08:00
generation.go updates for foreach and mutate (#2891) 2022-01-05 09:36:33 +08:00
imageVerify.go adding support for Cosign key-value annotations (#2824) 2021-12-16 06:19:44 +00:00
imageVerify_test.go Restructure project to follow standards (#2632) 2021-10-29 18:13:20 +02:00
jsonContext.go Restructure project to follow standards (#2632) 2021-10-29 18:13:20 +02:00
jsonContext_test.go Cleanup imports (#2635) 2021-10-29 12:24:26 +02:00
mutation.go updates for foreach and mutate (#2891) 2022-01-05 09:36:33 +08:00
mutation_test.go updates for foreach and mutate (#2891) 2022-01-05 09:36:33 +08:00
policyContext.go Restructure project to follow standards (#2632) 2021-10-29 18:13:20 +02:00
utils.go updates for foreach and mutate (#2891) 2022-01-05 09:36:33 +08:00
utils_test.go Restructure project to follow standards (#2632) 2021-10-29 18:13:20 +02:00
validation.go updates for foreach and mutate (#2891) 2022-01-05 09:36:33 +08:00
validation_test.go updates for foreach and mutate (#2891) 2022-01-05 09:36:33 +08:00