1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 07:57:07 +00:00
Commit graph

1944 commits

Author SHA1 Message Date
NoSkillGirl
b90df0980a small fixes for test command
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-09-02 18:15:22 +05:30
NoSkillGirl
27d6b81273 small fix
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-09-02 04:40:05 +05:30
NoSkillGirl
a629caae18 logic for generate policies
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-09-02 03:54:02 +05:30
NoSkillGirl
12f3d9e7e6 keeping policy report condition
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-09-02 03:29:15 +05:30
NoSkillGirl
f5343fe468 changes in test command
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-09-02 03:21:07 +05:30
NoSkillGirl
956709069f fixed kyverno common test cases
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-09-02 02:58:10 +05:30
NoSkillGirl
9f472a768f fixed policy report test cases
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-09-02 02:43:07 +05:30
NoSkillGirl
6b5cf01574 fixed Test_buildPolicyReports
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-09-02 02:24:04 +05:30
NoSkillGirl
7690a20752 fixed apply test cases
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-09-02 01:06:29 +05:30
NoSkillGirl
868537f04d added different logic for policy report in CLI
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-09-02 00:02:55 +05:30
NoSkillGirl
1e6b4bdcee skipping variable check for non matching kinds
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-09-01 18:51:31 +05:30
NoSkillGirl
02c584ed8f result is printed with mutated policy results
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-09-01 00:07:19 +05:30
NoSkillGirl
7abc74273c added logic for rule based count
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-08-31 21:18:54 +05:30
NoSkillGirl
92173fae9b small fix
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-08-31 19:29:53 +05:30
NoSkillGirl
dce3663429 removing error count
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-08-31 19:27:56 +05:30
NoSkillGirl
36515ce127 removing commented code
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-08-31 17:59:18 +05:30
NoSkillGirl
d416b4e3cb showing skiped policy seperately
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-08-31 16:24:31 +05:30
Pooja Singh
15e16e808c
Merge pull request #2247 from NoSkillGirl/bug/2181_generate_sync_issue
Added condition for resource synchronization
2021-08-30 17:40:08 +05:30
NoSkillGirl
6a90841627 added validation for context
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-08-27 13:50:30 +05:30
Frank Jogeleit
8eab9d45a6
Add Support for previouse test file structure (#2329)
Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
2021-08-26 22:52:44 -07:00
Pooja Singh
555f0a8d75
Merge pull request #2298 from freym/fix-ownerReferences
Remove ownerReferences when cloning resources to other namespace.
2021-08-25 10:34:42 +05:30
NoSkillGirl
912c465142 updating help section for cli apply
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-08-25 09:17:47 +05:30
Matthias Frey
605110d4ca remove ownerReferences when cloning resources to other namespace.
Signed-off-by: Matthias Frey <matthias.frey@kit.edu>
2021-08-24 16:02:12 +02:00
Frank Jogeleit
c522343c03
Update PolicyReport CRDs to wgpolicyk8s.io/v1alpha2 (#1825) 2021-08-21 10:35:17 -07:00
Vyankatesh Kudtarkar
8c7858c4b0
Validation for generate loops and support ClusterPolicy/Policy in match block (#2275)
* add validation for kinds

* remove cluster policy from excluded resources

* fix typo
2021-08-20 15:28:49 -07:00
Max Goncharenko
ab24da9707
Added 2241 test case (#2255)
* added 2241 test case

Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>

* update the log level for not resolved variables

Signed-off-by: Max Goncharenko <kacejot@fex.net>
2021-08-20 14:44:19 -07:00
Bricktop
a93240c436
Fix precondition logic for mutating policies (#2271)
* Add test for mutation with precondition

Signed-off-by: Marcel Mueller <marcel.mueller1@rwth-aachen.de>

* Fix mistake which prevented correct variable substitution

Signed-off-by: Marcel Mueller <marcel.mueller1@rwth-aachen.de>
2021-08-17 14:43:21 -07:00
Pooja Singh
ba00ead7f8
adding ownerRef with namespace (#2263)
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-08-13 17:07:40 -07:00
NoSkillGirl
bf86449395 added logic for updating the resource according to the sync flag
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-08-13 17:23:39 +05:30
NoSkillGirl
92d9d634a3 added condition for resource sync
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-08-13 14:03:09 +05:30
NoSkillGirl
a74dba83aa removing_unused_engineresponse_from_CLI
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-08-11 17:16:12 +05:30
Pooja Singh
f9616cbab1
Removing OwnerReference (#2251)
* removing OwnerReference

Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>

* removing comments

Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-08-10 17:05:20 -07:00
Pooja Singh
f23ad925da
updated cli comment (#2242)
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-08-06 17:16:12 -07:00
Jim Bugwadia
8af814c7af
update cosign to v1.0.0 (#2221)
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-08-02 13:51:36 -07:00
NoSkillGirl
15a63c109d removing context variables from variablesString
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-08-02 16:45:54 +05:30
NoSkillGirl
05234d94e2 adding variable in context
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-08-02 16:38:43 +05:30
NoSkillGirl
2eff4f2f3e added backward compatibility
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-08-01 16:27:47 +05:30
treydock
8204028009
Add DurationOperator to handle duration comparison operations (#2214)
Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
2021-07-30 13:11:52 -07:00
Max Goncharenko
922840b344
added deep copy for rule; changed rule deep copy logic (#2216)
* added deep copy for rule; changed rule deep copy logic

Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>

* fixed linter error

Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>
2021-07-30 12:07:01 -07:00
RinkiyaKeDad
b6f090f763 fixes for cache tests
Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>
2021-07-29 10:44:31 +05:30
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
Vyankatesh Kudtarkar
a3dfe3c647
Merge pull request #2202 from NoSkillGirl/bug/2197_CLI_issue
CLI result varies if multiple resources are passed for a policy with `request.operation`
2021-07-28 22:50:43 +05:30
Max Goncharenko
903963c26d
add special variable substitution logic for preconditions (#1930)
* add special variable substitution logic for preconditions

Signed-off-by: Max Goncharenko <kacejot@fex.net>

* handle NotFoundVariable error in proper way

Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>

* remove excess log; fix grammar

Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>

* removed isPrecondition flag; added test case for empty deny string; fixed related issue

Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>

* fix test case

Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>

* fix go lint

Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>

* fix tests

Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>
2021-07-28 09:54:50 -07:00
Vyankatesh Kudtarkar
64b6e22042
fix test command issue 2021-07-28 22:12:01 +05:30
NoSkillGirl
be8c584037 fixed test case
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-07-28 11:06:28 +05:30
NoSkillGirl
07497cd7e7 moved position of logic to check operation is delete or not
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-07-28 10:52:32 +05:30
Pooja Singh
88d1617390
Resolving variables from the resource passed | CLI (#2180)
* added logic for adding resources in context

Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>

* small fix

Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>

* returning error if request.object is passed from cmd

Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>

* reterning error if request.object is passed from value file

Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>

* removing comments

Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>

* small fix

Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>

* handling context for delete operation

Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>

* small fix for test command

Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-07-23 11:32:48 -07:00
Max Goncharenko
4c7ca97eac
Patch strategic merge preprocessing: implement anchor handling (#2156)
* finished walkMap

Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>

* added validation to the patchStrategicMerge

Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>

* finished fixing tests

Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>

* fixed part of old tests

Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>

* patchStrategicMerge anchor preprocessing is finished

Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>

* fix #1915 and #1896

Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>

* fix lint errors

Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>

* removed debug logs

Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>

* added failing test

Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>

* Fix unnecessary deletion

Signed-off-by: Maxim Goncharenko <goncharenko.maxim@apriorit.com>
2021-07-23 10:53:37 -07:00
Yashvardhan Kukreja
0a38f1c8ec
dealt with cardinality explosion (#2157) 2021-07-23 09:16:50 -07:00
Shuting Zhao
882c826c7d fix linter issue
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
2021-07-22 14:37:09 -07:00