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

3416 commits

Author SHA1 Message Date
Pooja Singh
c0be318788
Merge pull request #1866 from treydock/test-error-handling
Improved error handling for test command
2021-05-05 16:05:02 +05:30
shuting
e9952fbaf2
Remove secret from default resourceCache (#1878)
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
2021-05-04 22:10:01 -07:00
Nicolas Lamirault
02f1faca0b
Add: Display which chart version is installed (#1875)
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
2021-05-04 10:59:55 -07:00
Trey Dockendorf
6407cb4c2d Only evaluate if policy names match when variables are present
Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
2021-05-04 13:13:23 -04:00
Nicolas Lamirault
d298bd2403
Fix: Link to pr_documentation file (#1872)
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
2021-05-04 09:47:11 -07:00
Thoro
e80d18e692
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)
Signed-off-by: Thomas Rosenstein <thomas@thoro.at>
2021-05-04 09:28:30 -07:00
Trey Dockendorf
beabeddb81 Fix reviewdog failure
Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
2021-05-04 11:14:07 -04:00
Trey Dockendorf
db4fec0eeb Add additional e2e tests for 'kyverno test'
Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
2021-05-04 10:18:24 -04:00
Trey Dockendorf
00b8da9219 Ensure JSON strings are properly escaped
Ensure multiple policies can be tested with variables in same files

Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
2021-05-04 10:17:25 -04:00
vyankatesh
1bce06e36b Merge branch 'main' of https://github.com/kyverno/kyverno into main 2021-05-04 12:54:59 +05:30
Trey Dockendorf
d7886bddc9 Fix tests with variables to use Mock store
Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
2021-05-03 19:54:19 -04:00
Vyankatesh Kudtarkar
f921bf47d2
Bug fix -1855 : Errors updating cluster policy (#1863)
* Fix Dev setup

* Bug fix -1855 : Errors updating cluster policy

Co-authored-by: vyankatesh <vyankatesh@neualto.com>
2021-05-03 14:58:57 -07:00
Trey Dockendorf
6cb26d3134 Fix path when loading variables during directory tests
Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
2021-05-03 15:35:47 -04:00
Pooja Singh
4d10c3e245
Merge pull request #1857 from realshuting/remove_log
Remove debug log
2021-05-03 21:52:23 +05:30
Trey Dockendorf
bb626ed633 Print 'Not found' if test defined is not found
Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
2021-05-03 08:57:00 -04:00
Trey Dockendorf
cb364904b6 Improved error handling for test command
Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
2021-05-03 08:39:38 -04:00
vyankatesh
8a1a83a345 Merge branch 'main' of https://github.com/kyverno/kyverno into main 2021-05-02 15:00:35 +05:30
Shuting Zhao
636b9a9fc1 remove debug log
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
2021-04-30 10:56:52 -07:00
Shuting Zhao
7e575d0e19 tag v1.3.6-rc1
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
2021-04-29 15:03:48 -07:00
shuting
618a69961e
Disable auto-gen when a rule has mixed of kinds: pod & pod controllers (#1847)
* disable auto-gen when a rule has mixed of kinds: pod & pod controllers

Signed-off-by: Shuting Zhao <shutting06@gmail.com>

* Bugfix :  Make match.resources.kinds required (#1843)

* Fix Dev setup

* make kind required in MatchResources

* add test cases

Co-authored-by: vyankatesh <vyankatesh@neualto.com>

* address PR comments

Signed-off-by: Shuting Zhao <shutting06@gmail.com>

* update background canAutoGen unit tests

Signed-off-by: Shuting Zhao <shutting06@gmail.com>

Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
Co-authored-by: vyankatesh <vyankatesh@neualto.com>
2021-04-29 14:59:37 -07:00
Vyankatesh Kudtarkar
34af7a930c
Bugfix : Make match.resources.kinds required (#1852)
* Fix Dev setup

* Bugfix : Make match.resources.kinds required

Co-authored-by: vyankatesh <vyankatesh@neualto.com>
2021-04-29 11:14:55 -07:00
Vyankatesh Kudtarkar
a0193e13e5
test cases for match/exclude GVK (#1851)
* Fix Dev setup

* add test_cases for GVK

Co-authored-by: vyankatesh <vyankatesh@neualto.com>
2021-04-29 10:58:17 -07:00
Pooja Singh
d3e4fede02
Fix for commented yaml files in Kyverno CLI (#1849)
* fix for commented policy yaml file

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

* fix for commented resource yaml file

Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-04-29 10:41:15 -07:00
Pooja Singh
1e4c950104
Feature/1515 - handle configmap and api variable cli (#1789)
* added store package

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

* added changes to handle api and configmap variables in cli

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

* removed comments

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

* refactoring code

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

* added test case for mutation

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

* added test case for validation

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

* code improvement

Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-04-29 10:09:44 -07:00
Vyankatesh Kudtarkar
caa6a90b27
Bug 1799: Fix mutate policy defaults and Fix endless look of auto-gen rules. (#1839)
* Fix Dev setup

* Mutate policy defaults (1799)

* fix look for exclude ResourceDescription

* fix condition

* reuse code

Co-authored-by: vyankatesh <vyankatesh@neualto.com>
2021-04-29 09:51:23 -07:00
vyankatesh
7728e6a8be Merge branch 'main' of https://github.com/kyverno/kyverno into main 2021-04-29 17:51:36 +05:30
Jim Bugwadia
df6c896a20
Merge pull request #1846 from realshuting/background_image_properties
Enable image substitution in the background mode
2021-04-28 15:34:50 -07:00
Shuting Zhao
e9c2d899c9 fix the unit test
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
2021-04-28 14:52:26 -07:00
Shuting Zhao
85dde7e960 Enable image substitution in the background mode
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
2021-04-28 14:21:11 -07:00
Max Goncharenko
0776b438d3
Support operators (>=, <, etc ...) on list values (#1838)
Signed-off-by: Max Goncharenko <kacejot@fex.net>
2021-04-28 13:31:55 -07:00
Max Goncharenko
9da2d44ee1
Fix #1737: forceMutate does not handle StrategicMerge patchesJson6902 (#1775)
* Fix #1737: forceMutate does not handle StrategicMerge patchesJson6902

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

* go fmt

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

* updated PR due to the comments

Signed-off-by: Max Goncharenko <kacejot@fex.net>
2021-04-28 13:12:44 -07:00
vyankatesh
95bba868d9 Merge branch 'main' of https://github.com/kyverno/kyverno into main 2021-04-27 18:24:16 +05:30
Bricktop
64f49caa84
Add e2e test with nested jmesPath in context (#1786)
Signed-off-by: Marcel Mueller <marcel.mueller1@rwth-aachen.de>
2021-04-26 14:02:52 -07:00
Pooja Singh
434a4cdb14
Bug fix/1783 generate endlessly (#1804)
* debug

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

* bug fix

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

* error handling

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

* added resource cache

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

* reverting back to api call attempt

Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-04-26 12:58:34 -07:00
Pooja Singh
1da4f74562
Merge pull request #1817 from NoSkillGirl/validate_policy_in_cli_according_to_crd
Validate policy in cli according to policy schema
2021-04-23 15:51:47 +05:30
NoSkillGirl
7a6648c9a1 simplified bool comparison
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-04-23 11:56:15 +05:30
NoSkillGirl
8f9c97411b added test cases
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-04-23 01:15:45 +05:30
NoSkillGirl
b98f1116f3 refactoring code
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-04-23 00:20:50 +05:30
Vyankatesh Kudtarkar
ab8d077384
Fix Dev setup (#1815)
Co-authored-by: vyankatesh <vyankatesh@neualto.com>
2021-04-21 12:35:13 -07:00
Simon Metzger
6e76fd68f0
allow fsGroup values greater than zero (#1822)
change the policy require-non-root-groups to allow fsGroup values greater than zero

Signed-off-by: Metzger, Simon <smnmtzgr@gmail.com>
2021-04-21 12:12:26 -07:00
vyankatesh
e4eeeb377d Merge branch 'main' of https://github.com/kyverno/kyverno into main 2021-04-21 13:45:08 +05:30
NoSkillGirl
fe05f0385d added error handling
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-04-21 10:28:11 +05:30
NoSkillGirl
3362ef95fc added policy crd as go file
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-04-21 10:28:11 +05:30
NoSkillGirl
4cfc21779c added policy validation according to api server
Signed-off-by: NoSkillGirl <singhpooja240393@gmail.com>
2021-04-21 10:28:11 +05:30
treydock
b5fd23588a
Fix Helm charts (#1828)
* Fix Helm charts to render  correctly

Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>

* Make Helm chart policies consistent

Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
2021-04-20 13:08:30 -07:00
vyankatesh
1068fdabdd Fix Dev setup 2021-04-17 23:05:56 +05:30
Frank Jogeleit
56183cc73d
Add severity to pod security policies (#1797)
Signed-off-by: Frank Jogeleit <fj@move-elevator.de>
2021-04-16 17:41:30 -07:00
Yashvardhan Kukreja
69c3418ca9
added: a pre-flight validation check for ensuring that only 'any'/'all' fields are present under conditions (#1791)
Signed-off-by: Yashvardhan Kukreja <yash.kukreja.98@gmail.com>
2021-04-16 17:23:01 -07:00
Max Goncharenko
6a0305674a
JMESPath custom functions (#1772)
* JMESPath: Support regex expressions

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

* JMESPath: Add string functions

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

* Removed {{$}} variable handling logic

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

* Name all functions in snake case; Update error message; Fix {{@}} behavior

Signed-off-by: Max Goncharenko <kacejot@fex.net>
2021-04-16 16:17:00 -07:00
Shuting Zhao
4a4fdc54ee release v1.3.5
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
2021-04-16 14:04:00 -07:00