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

1936 commits

Author SHA1 Message Date
Vyankatesh Kudtarkar
601fb711e5 fix unit test issue 2021-09-03 10:32:09 +05:30
Vyankatesh Kudtarkar
6821800273 Merge branch 'GVK_Format' of https://github.com/vyankyGH/kyverno into GVK_Format 2021-09-02 12:40:46 +05:30
Vyankatesh Kudtarkar
2ee32214f9 Dynamic process of GVK 2021-09-02 12:40:40 +05:30
Vyankatesh Kudtarkar
68d66111a7
Merge branch 'kyverno:main' into GVK_Format 2021-09-02 11:14:33 +05:30
Yashvardhan Kukreja
4990122f1c
removed: resource_name label which is exposed as a part of Kyverno's metrics (#2351)
Signed-off-by: Yashvardhan Kukreja <yash.kukreja.98@gmail.com>
2021-09-01 18:26:25 -07:00
Bricktop
fbab9abd43
Add test case for non zero index patches with patchesJson6902 (#2339)
* Clean up formatting in mutate test file

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

* Add test for non-zero index numbers for patchesJson6902

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

* Align more with sample

Signed-off-by: Marcel Mueller <marcel.mueller1@rwth-aachen.de>
2021-09-01 17:50:37 -07:00
Bricktop
80c29ae20d
Clean up formatting in mutate test file (#2338)
Signed-off-by: Marcel Mueller <marcel.mueller1@rwth-aachen.de>
2021-08-31 12:44:36 -07:00
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
Vyankatesh Kudtarkar
cc957e2c6e fix issue 2021-08-13 14:08:18 +05:30
NoSkillGirl
92d9d634a3 added condition for resource sync
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-08-13 14:03:09 +05:30
Vyankatesh Kudtarkar
71803c46d8 GVK format 2021-08-12 23:26:35 +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
Shuting Zhao
e3ba38b165 update JSON context with patched resource for chained mutate rules
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
2021-07-22 14:23:03 -07:00
Pooja Singh
acc9f6652d
Merge pull request #2178 from NoSkillGirl/bug/2126_external_metrics
moving to error info log for external.metrics.k8s.io/v1beta1
2021-07-21 17:49:25 +05:30
NoSkillGirl
c4ee793c2c moving to error info log
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-07-21 13:39:07 +05:30
Vyankatesh Kudtarkar
437d511099 Clean log 2021-07-21 12:10:52 +05:30
Vyankatesh Kudtarkar
4993e69c5b Revert "clean log"
This reverts commit e5b02ee526.
2021-07-21 12:04:46 +05:30
Vyankatesh Kudtarkar
e5b02ee526 clean log 2021-07-21 12:02:14 +05:30
Jim Bugwadia
067760cfdc merge main
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-07-20 21:52:35 -07:00
Jim Bugwadia
38b3730c7f Merge branch 'main' into 2171_optimize_image_verify_checks 2021-07-20 21:50:10 -07:00