1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-04-08 01:54:18 +00:00
kyverno/pkg/engine
Arsh Sharma 97eaa7e854
adding any/all under match and exclude blocks (#2130)
* intial commit

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* update types

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* updated all type

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* extract to single struct

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* updated match resource description function

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* minor test working

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* match resources test is working

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* exclude resources test is working

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* changed double negetive in logic

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* yamls updated and added validation and cache loops

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* match exclude working but need to fix matchExcludeConflict function

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* restored doMatchAndExcludeConflict function

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* rewrote the matchExcludeConflictFunction

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* finalizing completed till utils_test.go

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* ready for review complete

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* update yamls

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* one more merge conflict solved

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* regenerates YAMLs

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* possible fix for failing tests

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* removed duplicate any/all logic and added a test, (rest refacotring is in progress)

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* cache test is working

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* improved cache test and it is working

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* added check for mutate and generate policies too

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* cleaned doesResourceMatchConditionBlock logic but validation still has code from attempt to combine the all block

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* reverted validate.go to older logic

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* removed commented code

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>

* removed extra comments

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>
2021-07-28 12:59:53 -07:00
..
anchor Patch strategic merge preprocessing: implement anchor handling (#2156) 2021-07-23 10:53:37 -07:00
common Fix #1506; Resolve path reference in entire rule instead of just pattern/overlay 2021-03-16 13:45:40 +02:00
context add special variable substitution logic for preconditions (#1930) 2021-07-28 09:54:50 -07:00
jmespath Add function label_match, to use matchLabel in JMESPath, usage: label_match(labels_from_network_policy, labels_from pod) bool, Remove validation for JMESPath (#1862) 2021-05-04 09:28:30 -07:00
json-utils Fix #1506; Resolve path reference in entire rule instead of just pattern/overlay 2021-03-16 13:45:40 +02:00
mutate Patch strategic merge preprocessing: implement anchor handling (#2156) 2021-07-23 10:53:37 -07:00
operator fix gofmt and golint issues (#667) 2020-02-03 13:38:24 -08:00
response Feature/cosign (#2078) 2021-07-09 18:01:46 -07:00
utils fmt and improve error messages 2021-07-20 20:28:11 -07:00
validate Patch strategic merge preprocessing: implement anchor handling (#2156) 2021-07-23 10:53:37 -07:00
variables add special variable substitution logic for preconditions (#1930) 2021-07-28 09:54:50 -07:00
wildcards updating minio verison (#1956) 2021-06-09 19:16:26 -07: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 Patch strategic merge preprocessing: implement anchor handling (#2156) 2021-07-23 10:53:37 -07:00
forceMutate_test.go Patch strategic merge preprocessing: implement anchor handling (#2156) 2021-07-23 10:53:37 -07:00
generation.go add special variable substitution logic for preconditions (#1930) 2021-07-28 09:54:50 -07:00
imageVerify.go check for changes 2021-07-20 09:36:12 -07:00
jsonContext.go Changed error to info for NotFoundError in jsonContext (#2140) 2021-07-14 14:50:28 -07:00
jsonContext_test.go feat: added functionality for delimiting multi-line block by newline characters 2021-03-01 00:46:50 +05:30
mutation.go add special variable substitution logic for preconditions (#1930) 2021-07-28 09:54:50 -07:00
mutation_test.go update JSON context with patched resource for chained mutate rules 2021-07-22 14:23:03 -07:00
policyContext.go namespace selector (#1532) 2021-02-03 13:09:42 -08:00
utils.go adding any/all under match and exclude blocks (#2130) 2021-07-28 12:59:53 -07:00
utils_test.go adding any/all under match and exclude blocks (#2130) 2021-07-28 12:59:53 -07:00
validation.go add special variable substitution logic for preconditions (#1930) 2021-07-28 09:54:50 -07:00
validation_test.go add special variable substitution logic for preconditions (#1930) 2021-07-28 09:54:50 -07:00