Charles-Edouard Brétéché
1fe203732f
refactor: separate json utils package ( #3523 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-31 16:34:52 +00:00
Charles-Edouard Brétéché
6e813a6b9e
refactor: webhooks package ( #3516 )
...
* refactor: use more policy interface
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: migrate to policy interface
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: webhooks package
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-31 23:34:10 +08:00
Charles-Edouard Brétéché
9fc65fa5a7
refactor: use policy interface and introduce admission utils package ( #3512 )
...
* refactor: use more policy interface
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: migrate to policy interface
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-31 20:25:54 +08:00
Prateek Pandey
1b2a3c1085
fix: use github repo env instead of hardcoded repo name ( #3513 )
...
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
2022-03-31 17:36:21 +08:00
Charles-Edouard Brétéché
04d094f775
fix: reduce dependency to ns lister ( #3509 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
2022-03-31 12:48:36 +05:30
Charles-Edouard Brétéché
04740c52fa
refactor: use more policy interface ( #3510 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-31 12:14:00 +05:30
Charles-Edouard Brétéché
9f9e0d749f
refactor: use policy interface in policycache package ( #3503 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-30 19:58:09 +05:30
Charles-Edouard Brétéché
83343697b9
refactor: make use of policy interface ( #3499 )
...
- refactor: make use of policy interface
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-30 18:34:30 +05:30
Charles-Edouard Brétéché
1fce53f49d
refactor: improve policycache package ( #3495 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
2022-03-29 17:20:00 +00:00
Charles-Edouard Brétéché
80d1ccb26d
chore: add autogen internals e2e tests ( #3492 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-03-29 16:35:27 +00:00
Charles-Edouard Brétéché
c59affb248
refactor: factorize policy interface ( #3496 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-03-29 15:52:45 +00:00
Charles-Edouard Brétéché
b4cf89e57f
feat: add webhooks object selector support ( #3413 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-03-29 23:09:44 +08:00
Prateek Pandey
bdb675b9c0
feat: generate support for namespace policy ( #3472 )
...
* feat: generate support for namespace policy
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
* use policy spec instead
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
* refactor the changes
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
* add synced flag for Namespace policies
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
2022-03-29 13:04:33 +00:00
Charles-Edouard Brétéché
69dcd9ee4c
chore: simplify validation with named return ( #3493 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-29 09:53:10 +00:00
treydock
8e8e7803ee
add missing namespace to role and rolebinding ( #3389 ) ( #3429 ) ( #3485 )
...
Signed-off-by: Dominik Ruf <dominikruf@gmail.com>
Co-authored-by: treydock <tdockendorf@osc.edu>
Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
Co-authored-by: Dominik Ruf <dominikruf@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-03-29 08:39:11 +00:00
Shubham Gupta
dd9b3f3a3d
chore(deps): add renovate.json ( #3471 )
...
Signed-off-by: Shubham Gupta <shubham.gupta2956@gmail.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-03-29 16:09:23 +08:00
Charles-Edouard Brétéché
20069c13c3
feat: stop mutating rules ( #3410 )
...
* feat: stop adding autogen annotation
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* feat: stop mutating rules
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* feat: stop mutating rules
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* fix: use toggle
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* fix: review comments
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-03-28 22:01:27 +08:00
Prateek Pandey
2ce205b9e9
use mutex as field instead of embedded ( #3480 )
2022-03-28 14:01:33 +08:00
Charles-Edouard Brétéché
88afd0dd31
refactor: create e2e infra using make to speed up e2e tests ( #3470 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
2022-03-26 00:08:38 +08:00
Vyankatesh Kudtarkar
58b1fd6210
fix ordering of mutate element ( #3468 )
...
Co-authored-by: shuting <shuting@nirmata.com>
2022-03-25 15:15:31 +00:00
Charles-Edouard Brétéché
4efcabffb5
refactor: use abstract policy interface in webhookconfig ( #3466 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-03-25 14:43:47 +00:00
Mritunjay Kumar Sharma
e303dddf86
adds lease objects for storing last-request-time and set-status annotations in deployment ( #3447 )
...
* funcs to patch last request time and status
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
* instead of patch, updating status
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
* added lease object appraoch
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
* cleanup
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
* attempt to solve panic issue
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
* fixes lease updates for both annotations
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
* minor cleanups in log messages
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
* clean up
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
* add object selector
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
* fixed leases and object selector
Signed-off-by: Mritunjay Sharma <mritunjaysharma394@gmail.com>
2022-03-25 21:42:01 +08:00
shuting
d1bf3d4742
clean up dependencies ( #3469 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2022-03-25 08:40:25 +00:00
Prateek Pandey
9c064ac76d
fix: use RWMutex lock while concurrent read/write ( #3462 )
...
Signed-off-by: prateekpandey14 <prateek.pandey@nirmata.com>
2022-03-25 12:40:34 +08:00
Charles-Edouard Brétéché
3cf83bc77f
refactor: match and exclude conflict validation ( #3454 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-23 17:04:17 +05:30
Charles-Edouard Brétéché
f34d3c342d
refactor: add ValidationFailureAction to the api ( #3451 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
2022-03-23 08:59:41 +00:00
Charles-Edouard Brétéché
65409890b4
refactor: remove ns lister from webhookconfig ( #3452 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Prateek Pandey <prateekpandey14@gmail.com>
2022-03-23 16:04:02 +08:00
Charles-Edouard Brétéché
06fc472f52
refactor: add IsNamespaced() method to API policy types ( #3450 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-23 13:03:15 +05:30
Charles-Edouard Brétéché
f263cbedca
fix: use PodControllersAnnotation constant ( #3448 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-22 20:43:19 +00:00
shuting
e5679bc6ff
Update MAINTAINERS.md ( #3449 )
...
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-03-22 19:19:46 +00:00
Vyankatesh Kudtarkar
e268be9e88
support for deprecated API's ( #3439 )
...
* support for deprecated API's
* add testcase
* update condition
* fix logic
2022-03-22 18:25:35 +00:00
Abhi Kapoor
1b10f18086
Drop v1alpha1 PolicyReport CRD ( #3437 )
...
* Drop v1alpha1 PolicyReport CRD
Signed-off-by: abhi-kapoor <43758739+abhi-kapoor@users.noreply.github.com>
* Drop v1alpha1 kyverno package
Signed-off-by: abhi-kapoor <43758739+abhi-kapoor@users.noreply.github.com>
* Update Makefile to remove references for v1alpha1
Signed-off-by: abhi-kapoor <43758739+abhi-kapoor@users.noreply.github.com>
* Update helm manifests
Signed-off-by: abhi-kapoor <43758739+abhi-kapoor@users.noreply.github.com>
2022-03-22 17:08:25 +00:00
Charles-Edouard Brétéché
d129b7a4c7
refactor: ExcludeResources validation ( #3445 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
2022-03-22 15:21:44 +00:00
Charles-Edouard Brétéché
11bbb4f83e
refactor: replace ExcludeResources by MatchResources ( #3444 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-22 14:24:40 +00:00
Charles-Edouard Brétéché
51254b2d5a
refactor: ResourceDescription validation ( #3446 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-22 21:17:51 +08:00
Sambhav Kothari
2239849f99
Fix incorrectly renamed file ( #3443 )
...
Helm test files are not the same as kyverno test files. This should remain test.yaml.
Signed-off-by: Sambhav Kothari <sambhavs.email@gmail.com>
2022-03-22 09:41:42 +00:00
Aidan Delaney
4ec3b36f7f
Remove support for test.yaml ( #3442 )
...
kyverno-test.yaml is now the only supported test file name
Signed-off-by: Aidan Delaney <adelaney21@bloomberg.net>
2022-03-22 14:09:08 +05:30
Vyankatesh Kudtarkar
9ed1872864
fix cli panic for --cluster flag ( #3436 )
2022-03-21 07:01:23 -07:00
Thomas Hartland
0360ad25c1
Fix check for generated webhook rules being equal to what the API server has ( #3407 )
...
* Add webhookRulesEqual function and test
Signed-off-by: Thomas Hartland <thomas.hartland@diamond.ac.uk>
* Handle edge cases in webhookRulesEqual function
Signed-off-by: Thomas Hartland <thomas.hartland@diamond.ac.uk>
2022-03-21 12:41:53 +00:00
Charles-Edouard Brétéché
c8c631d4a7
refactor: MatchResources validation ( #3422 )
...
* refactor: ValidationFailureActionOverrides validation
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
* refactor: MatchResources validation
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-03-21 19:51:12 +08:00
Charles-Edouard Brétéché
5816144912
feat: use IsReady method ( #3426 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-03-21 09:18:54 +00:00
Charles-Edouard Brétéché
bdcecf9882
refactor: ValidationFailureActionOverrides validation ( #3421 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-21 16:53:12 +08:00
Chip Zoller
e454c71aa6
PR and issue template updates per contributors' meetings ( #3428 )
...
* add cherry pick requirement
Signed-off-by: Chip Zoller <chipzoller@gmail.com>
* adopt github issue forms
Signed-off-by: Chip Zoller <chipzoller@gmail.com>
* update PR template with test checklist reminders
Signed-off-by: Chip Zoller <chipzoller@gmail.com>
* Add "other" issue template
Signed-off-by: Chip Zoller <chipzoller@gmail.com>
* add "triage" label to all new issues
Signed-off-by: Chip Zoller <chipzoller@gmail.com>
2022-03-19 21:31:54 -04:00
Naman Lakhwani
433ad5e0c4
[imageVerify]: correcting error msg ( #3398 )
...
* corrected err msgs
Signed-off-by: Naman Lakhwani <namanlakhwani@gmail.com>
* this msg is not required explicitly
Signed-off-by: Naman Lakhwani <namanlakhwani@gmail.com>
Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2022-03-18 12:47:27 -07:00
Charles-Edouard Brétéché
4136566bd9
feat: add toggle package for feature flags ( #3419 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-03-18 16:16:42 +00:00
Charles-Edouard Brétéché
0c8e8c1212
feat: move GetRules() at the policy level ( #3420 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-03-18 15:18:32 +00:00
Charles-Edouard Brétéché
30261b5235
feat: add conditions support ( #3378 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-03-18 22:00:01 +08:00
Charles-Edouard Brétéché
865eef248d
feat: stop adding autogen annotation ( #3379 )
...
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2022-03-18 11:30:49 +00:00
shuting
cc10feb906
fix webhook configuration issue when auto update is disabled ( #3417 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2022-03-18 10:05:00 +00:00
Aidan Delaney
def19d2ec0
Ignore test files that do not end in test.yaml ( #3402 )
...
Some editors create backup files when editing. So users will
edit kyverno-test.yaml and end up with both kyverno-test.yaml
and kyverno-test.yaml~ (or some variant). This change ignores
backup files that append a character to the string `test.yaml`
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
Signed-off-by: Aidan Delaney <adelaney21@bloomberg.net>
Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
Co-authored-by: Sambhav Kothari <skothari44@bloomberg.net>
2022-03-18 09:31:01 +00:00