1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-01-20 18:52:16 +00:00
Commit graph

4306 commits

Author SHA1 Message Date
Charles-Edouard Brétéché
f77220ad66
refactor: reduce policy mutations (#3550)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-04-05 16:28:33 +08:00
Charles-Edouard Brétéché
e716daa22e
fix: annotation path (#3547)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

Co-authored-by: shuting <shuting@nirmata.com>
2022-04-04 21:48:22 +00:00
Charles-Edouard Brétéché
2f81c77850
refactor: use GetFailurePolicy method (#3545)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-04-05 04:49:30 +08:00
Charles-Edouard Brétéché
4b3de26433
refactor: use BackgroundProcessingEnabled method (#3544)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

Co-authored-by: shuting <shuting@nirmata.com>
2022-04-05 04:16:45 +08:00
Charles-Edouard Brétéché
a93ac45586
refactor: move some helpers in utils package (#3539)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

Co-authored-by: shuting <shuting@nirmata.com>
2022-04-04 18:58:22 +00:00
Charles-Edouard Brétéché
cb6f55cdcd
refactor: use GetValidationFailureAction method (#3546)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

Co-authored-by: shuting <shuting@nirmata.com>
2022-04-04 16:33:12 +00:00
Charles-Edouard Brétéché
1cee8894e0
fix: disallow all in autogen annotation (#3537)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-04-04 16:10:57 +00:00
Charles-Edouard Brétéché
d4a71a53c2
refactor: use existing ContainsString util (#3543)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

Co-authored-by: shuting <shuting@nirmata.com>
2022-04-04 15:31:33 +00:00
Ricardo Rosales
aba9c6ca95
Create poddisruptionbudget.yaml when mode=ha (#3536)
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Signed-off-by: Ricardo Rosales <728243+missingcharacter@users.noreply.github.com>

Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-04-04 23:02:05 +08:00
silenceper
d97258654f
fix wildcards in value arrays (#3486)
Signed-off-by: silenceper <silenceper@gmail.com>

Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-04-01 10:42:07 +00:00
Charles-Edouard Brétéché
bc6a228f7d
refactor: separate yaml utils package (#3520)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-04-01 09:56:16 +00:00
Charles-Edouard Brétéché
857cd1209c
refactor: separate kube utils package (#3527)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

Co-authored-by: Vyankatesh Kudtarkar <vyankateshkd@gmail.com>
2022-04-01 08:34:25 +00:00
Charles-Edouard Brétéché
fe0ad3c68f
refactor: add os utils sub package (#3528)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

Co-authored-by: shuting <shuting@nirmata.com>
2022-04-01 06:59:44 +00:00
Charles-Edouard Brétéché
663ad49dca
refactor: add a json patch util and use it in autogen package (#3524)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-04-01 13:26:47 +08:00
Charles-Edouard Brétéché
adca5f200b
fix: tls min version (#3521)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-03-31 17:12:38 +00:00
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