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

32 commits

Author SHA1 Message Date
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
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
Jim Bugwadia
e7a8eb93ee
Merge pull request #1714 from kacejot/vars-substitution
Bug Fix: #1506 issue; Resolve path reference in entire rule
2021-03-26 14:53:30 -07:00
Vyankatesh Kudtarkar
057ec4e690
Fix : 1657 (Update variable paths when auto generate the controller rules) and 1615 ( kyverno apply pipe through to kubectl) (#1735)
* Fix 1657and 1615

Signed-off-by: vyankatesh <vyankatesh@neualto.com>

* fix build issue

Signed-off-by: vyankatesh <vyankatesh@neualto.com>

* remove logs

Signed-off-by: vyankatesh <vyankatesh@neualto.com>

Co-authored-by: vyankatesh <vyankatesh@neualto.com>
2021-03-26 11:03:45 -07:00
Jim Bugwadia
6dff9e0ab9 merge and resolve conflicts
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2021-03-25 16:43:12 -07:00
Vyankatesh Kudtarkar
04dc3ddfe3
Remove sample Dir and Remove testcases from test_runner (#1686)
* remove sample Dir and remove testcases form test_runner

Signed-off-by: vyankatesh <vyankatesh@neualto.com>

* change git URL for test

Signed-off-by: vyankatesh <vyankatesh@neualto.com>

* fix fmt issue

Signed-off-by: vyankatesh <vyankatesh@neualto.com>

* remove unused policy and test yamls

Signed-off-by: vyankatesh <vyankatesh@neualto.com>

* fix yaml path issue

Signed-off-by: vyankatesh <vyankatesh@neualto.com>

Co-authored-by: vyankatesh <vyankatesh@neualto.com>
2021-03-16 14:35:32 -07:00
Max Goncharenko
24c4f06ecd Fix #1506; Resolve path reference in entire rule instead of just pattern/overlay
Signed-off-by: Max Goncharenko <kacejot@fex.net>
2021-03-16 13:45:40 +02:00
Yashvardhan Kukreja
10c714d5ba
feat: [preconditions, conditions] added backwards-compatible support for logical operators (#1604)
Signed-off-by: Yashvardhan Kukreja <yash.kukreja.98@gmail.com>
2021-03-01 20:31:06 -08:00
Shuting Zhao
c4ebef7b0d - support AllowMissingPathOnRemove and EnsurePathExistsOnAdd in patchesJSON6902
- upgrade to evanphx/json-patch/v5

Signed-off-by: Shuting Zhao <shutting06@gmail.com>
2021-02-25 15:25:07 -08:00
shuting
267be0815f
Bug fixes - policy validation, auto-generated rules, apiCall support in mutate and generate (#1629)
* Fix invalid policy reports generated for blocked resource

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

* fix 1464 - copy context and preconditions to auto-gen rules

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

* fix 1628 - add policy validations

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

* fix 1593 - support apiCall in mutate and generate

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

* fix test

Signed-off-by: Shuting Zhao <shutting06@gmail.com>
2021-02-22 12:08:26 -08:00
shuting
6fc349716c
Switch to use annotations to store resource info in cluster/reportChangeRequest (#1625)
* skip sending API request for filtered resource

* fix PR comment

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

* fixes https://github.com/kyverno/kyverno/issues/1490

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

* fix bug - namespace is not returned properly

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

* reduce throttling - list resource using lister

* refactor resource cache

* fix test

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

* fix label selector

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

* fix build failure

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

* fixes #1480

* store resource name and kind in (c)rcr's annotation
2021-02-19 09:09:41 -08:00
Jim Bugwadia
6afd2e6f3a
ignore non-policy files in CLI and improve validation messages (#1362)
* improve validation message

* improve error behaviors

* fix tests

* fix tests
2020-12-07 11:26:04 -08:00
Jim Bugwadia
305adf2fa0 fix typos and improve readability 2020-12-01 22:50:40 -08:00
Shuting Zhao
2d8092d97c fixes https://github.com/kyverno/kyverno/issues/1238 2020-11-18 14:31:43 -08:00
NoSkillGirl
5794889752 Merge branch 'main' into policyreport_cli 2020-11-18 14:43:30 +05:30
Shuting Zhao
b9fb926ddb fixes for golint ./... 2020-11-17 13:07:30 -08:00
Shuting Zhao
943935ee1b properly deserialize anyPattern 2020-11-13 16:25:51 -08:00
NoSkillGirl
6e7ae8ec13 namespace changes 2020-11-04 14:03:38 +05:30
Shuting Zhao
2152d354a9 migrate repo 2020-10-07 15:09:52 -07:00
Shuting Zhao
cdc5190c56 update nirmata/kyverno to kyverno/kyverno 2020-10-07 11:12:31 -07:00
Pooja Singh
ccdcb6ae89
Feature/read from stdin validate (#1171)
* temp

* added pipe logic for validate

* fixed test cases - policy mutation
2020-10-06 17:50:53 -07:00
Mohan B E
bd406f5bb8
added conversion of overlay to patch strategic merge (#1138)
* added conversion of overlay to patch strategic merge and modified unittest for the same

* updated best practice policy
2020-09-22 16:19:09 -07:00
Pooja Singh
ba5c656d76
converting patches to patchesJSON6902 (#1115)
* converting patches to patchesJSON6902

* updated readme

* removed patch section from readme
2020-09-16 10:53:05 -07:00
shuting
3fa745bc3e
Bugfix policymutation (#1119)
* fix policy mutation - autogen does not have exclude

* update doc
2020-09-15 22:58:55 -07:00
Mohan B E
c5e9d6db15
added autogen for patch strategic merge (#1104) 2020-09-04 16:20:20 -07:00
shuting
9a210e24d9
bug fix - nil pointer (#1093)
* add watch policy to clusterrole kyverno:customresources

* fix build

* fix nil pointer
2020-09-01 17:23:54 -07:00
shuting
e0f617b383
810 support cronJob for auto-gen (#1089)
* add watch policy to clusterrole kyverno:customresources

* - improve auto-gen policy application logic - remove unused code

* move method to common util

* auto-gen rule for cronJob

* update doc

* set CronJob as default auto-gen pod controller

* - update doc; - fix test

* remove unused code
2020-09-01 09:11:20 -07:00
NoSkillGirl
afe98bb93c Added set flag 2020-08-22 01:07:03 +05:30
Pooja Singh
5a68653749
Supporting annotations in match/exclude (#1045)
* Supporting annotations in match/exclude filters

* updated readme

* small fix
2020-08-17 17:12:27 -07:00
NoSkillGirl
fed8d7f967 small fixes 2020-07-11 18:12:35 +05:30
NoSkillGirl
c26a414182 auto generating policy rules 2020-07-11 17:57:31 +05:30
NoSkillGirl
b23cfa9f93 added auto-gen policy rule for cli 2020-07-11 17:57:07 +05:30