1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00
Commit graph

452 commits

Author SHA1 Message Date
shuting
d0347afa59
Fix invalid failure event for generate policy (#1413)
* reduce RCR throttling requests by merging policy application (policy - namespace) results into single RCR

* - refactor policy controller; - fix RCR issue

* - refactor RCR controller; - fix cpolr on ns update; - reduce throttling when getting resources; - fix tests

* update CRD schema

* fix typo

* fix invalid generate failure event
2020-12-22 11:07:31 -08:00
shuting
3c5f9f8888
1398 - Reduce RCR throttling requests (#1406)
* reduce RCR throttling requests by merging policy application (policy - namespace) results into single RCR

* - refactor policy controller; - fix RCR issue

* - refactor RCR controller; - fix cpolr on ns update; - reduce throttling when getting resources; - fix tests

* update CRD schema

* fix typo
2020-12-21 11:04:19 -08:00
Jim Bugwadia
c77944ddef
filter resources excluded in config (#1404) 2020-12-16 12:29:16 -08:00
shuting
5f70f5feec
fixes #1399 (#1400) 2020-12-15 15:21:39 -08:00
Jim Bugwadia
ad9f189144 merge main 2020-12-14 16:08:01 -08:00
Pooja Singh
bff7229678
1345 use GR lister (#1387)
* improved log message

* added lister for GR

* added label to GR

* added wait for cache is sync
2020-12-14 14:52:13 -08:00
Jim Bugwadia
b25a037113 fix generate clone/data check 2020-12-14 02:43:16 -08:00
shuting
c1764a85d1
1370 clean up stale RCRs (#1373)
* remove env "POLICY-TYPE"

* clean up resource in goroutine

* clean up stale RCRs on namespace deletion

* go vet

* clean up code
2020-12-08 23:04:16 -08:00
Jim Bugwadia
2613a6cce4
pkg/webhooks/server.go (#1372)
* pkg/webhooks/server.go

* remove test for blocking deletes on generatated & synchronized resources

* remove test for blocking deletes on generatated & synchronized resources
2020-12-08 19:09:59 -08:00
shuting
624b481df3
Fix 1351 - policy report (#1359)
* ignore Kyverno CRDs existence check when server is not available

* clean up cluster / reportChangeRequest

* resolve PR comments

* - fixes #1351; - clean up code

* fo fmt
2020-12-04 10:04:46 -08:00
Jim Bugwadia
9cae63ea03
Merge pull request #1352 from kyverno/1332_wildcards_in_labels
1332 wildcards in labels and annotations
2020-12-03 13:56:56 -08:00
Pooja Singh
733cd060a3
fixed triggring generate rule (#1355) 2020-12-03 09:43:43 -08:00
Jim Bugwadia
305adf2fa0 fix typos and improve readability 2020-12-01 22:50:40 -08:00
shuting
2ec5a0fa42
1319 fix throttling (#1348)
* fix policy status and generate controller issues

* shorten ACTION column name

* update logs

* improve naming

* add temp logs for troubleshooting

* cleanup logs

* apply generate policy to old & new resource in webhook

* cleanup log messages

* cleanup log messages

* cleanup log messages

* fix clean up of policy report in init container

Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2020-12-01 12:30:08 -08:00
Jim Bugwadia
2344b2c305
1319 fix throttling (#1341)
* fix policy status and generate controller issues

* shorten ACTION column name

* update logs

Co-authored-by: Shuting Zhao <shutting06@gmail.com>
2020-11-30 11:22:20 -08:00
Jim Bugwadia
ec95724e97
update webhook registration and monitor (#1318)
* update webhook registration and monitor

* update log

* fix test

* improve logs

* improve logs

* format changes

* decrease interval for webhook config checks
2020-11-26 16:07:06 -08:00
Jim Bugwadia
125faaf4e3 fix variable substitution 2020-11-25 00:21:51 -08:00
shuting
e868dbfeb9
Fix 1287 - failed to update annotation through mutate policy (#1289)
* fix 1287

* update mutate log
2020-11-24 10:11:05 -08:00
Shuting Zhao
2d8092d97c fixes https://github.com/kyverno/kyverno/issues/1238 2020-11-18 14:31:43 -08:00
Shuting Zhao
b9fb926ddb fixes for golint ./... 2020-11-17 13:07:30 -08:00
Shuting Zhao
e985ee4031 correct misspelled words 2020-11-17 12:01:01 -08:00
Shuting Zhao
781fbfb82c Merge branch 'main' into schema_gen
# Conflicts:
#	pkg/generate/cleanup/controller.go
#	pkg/generate/controller.go
2020-11-13 17:46:34 -08:00
Pooja Singh
c9b6c1f2f1
Supress Error Logs (#1255)
* supressed  validation and crd error log

* small fix
2020-11-13 16:36:25 -08:00
Shuting Zhao
58bc63e1ad remove policy violation from types.go 2020-11-11 15:50:17 -08:00
shuting
5e07ecc5f3
Add Policy Report (#1229)
* add report in cli

* policy report crd added

* policy report added

* configmap added

* added jobs

* added jobs

* bug fixed

* added logic for cli

* common function added

* sub command added for policy report

* subcommand added for report

* common package changed

* configmap added

* added logic for kyverno cli

* added logic for jobs

* added logic for jobs

* added logic for jobs

* added logic for cli

* buf fix

* cli changes

* count bug fix

* docs added for command

* go fmt

* refactor codebase

* remove policy controller for policyreport

* policy report removed

* bug fixes

* bug fixes

* added job trigger if needed

* job deletation logic added

* build failed fix

* fixed e2e test

* remove hard coded variables

* packages adde

* improvment added in jobs sheduler

* policy report yaml added

* cronjob added

* small fixes

* remove background sync

* documentation added for report command

* remove extra log

* small improvement

* tested policy report

* revert hardcoded changes

* changes for demo

* demo changes

* resource aggrigation added

* More changes

* More changes

* - resolve PR comments; - refactor jobs controller

* set rbac for jobs

* add clean up in job controller

* add short names

* remove application scope for policyreport

* move job controller to policyreport

* add report logic in command apply

* - update policy report types;  - upgrade k8s library; - update code gen

* temporarily comment out code to pass CI build

* generate / update policyreport to cluster

* add unit test for CLI report

* add test for apply - generate policy report

* fix unit test

* - remove job controller; - remove in-memory configmap; - clean up kustomize manifest

* remove dependency

* add reportRequest / clusterReportRequest

* clean up policy report

* generate report request

* update crd clusterReportRequest

* - update json tag of report summary; - update definition manifests; -  fix dclient creation

* aggregate reportRequest into policy report

* fix unit tests

* - update report summary to optional; - generate clusterPolicyReport; - remove reportRequests after merged to report

* remove

* generate reportRequest in kyverno namespace

* update resource filter in helm chart

* - rename reportRequest to reportChangeRequest; -rename clusterReportRequest to clusterReportChangeRequest

* generate policy report in background scan

* skip generating report change request if there's entry results

* fix results entry removal when policy / rule gets deleted

* rename apiversion from policy.kubernetes.io to policy.k8s.io

* update summary.* to lower case

* move reportChangeRequest to kyverno.io/v1alpha1

* remove policy report flag

* fix report update

* clean up policy violation CRD

* remove violation CRD from manifest

* clean up policy violation code - remove pvGenerator

* change severity fields to lower case

* update import library

* set report category

Co-authored-by: Yuvraj <yuvraj.yad001@gmail.com>
Co-authored-by: Yuvraj <10830562+evalsocket@users.noreply.github.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2020-11-09 11:26:12 -08:00
Jim Bugwadia
7e9b08baeb
Feature/make operators case insensitive (#1217)
* fix typo

* make operators case insensitive

* fix case statement
2020-10-29 15:00:22 -07:00
Jim Bugwadia
ac2ab7b74e update pod security context and switch to higher port 2020-10-22 00:41:25 -07:00
Shuting Zhao
cdc5190c56 update nirmata/kyverno to kyverno/kyverno 2020-10-07 11:12:31 -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
Mohan B E
51ac382c6c
Feature/configmaps var 724 (#1118)
* added configmap data substitution for foreground mutate and validate

* added configmap data substitution for foreground mutate and validate fmt

* added configmap lookup for background

* added comments to resource cache

* added configmap data lookup in preConditions

* added parse strings in In operator and configmap lookup docs

* added configmap lookup docs

* modified configmap lookup docs
2020-09-22 14:11:49 -07:00
shuting
f82b4a4952
skip policy mutation on status update (#1112) 2020-09-14 10:56:06 -07:00
Yuvraj
b7524467a3
Reconcile Generate request on policy update (#1096)
* policy report crd added

* added namespaced rule

* remove extra field from crd

* revert crd change

* remove policy report chnages

* remove policy report chnages

* remove policy report chnages

* remove policy report chnages

* added logic for gr

* revert changes

* fixed generate rules

* fixed generate rules

* fixed generate rules

* fixed generate rules

* remove extra logs

* remove extra logs

* fixed e2e test

* remove extra logs

* crd issue resolved

* added check for sync

* add labels update

* add label update

* added permission to role

* roles added to helm

* roles added to helm
2020-09-03 14:34:23 -07:00
Mohan B E
118b40c644
added invalid field validation for policy (#1094) 2020-09-03 22:14:54 +05:30
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
Pooja Singh
2bfb5fffb3
Merge pull request #1080 from NoSkillGirl/feature/crd_validation
Supporting CRD validation in CLI
2020-09-01 08:51:02 +05:30
Yuvraj
2641120907
Generate policy does not work on namespace update (#1085)
* added logic for handling generate request

* generate rules added

* added label condition for generate

* remove extra logs

* remove extra logs

* buf fixed

* bug fixed

* added logic for delete gr

* log fixed

* documentation changed

* remove best practices changes

* bug fix

* added best pratice
2020-08-31 11:25:13 -07:00
NoSkillGirl
6b6897f6e2 working version of CRD validation for CLI 2020-08-31 18:19:09 +05:30
NoSkillGirl
df154537f1 Added provision to pass cli values from a file 2020-08-22 01:07:04 +05:30
NoSkillGirl
afe98bb93c Added set flag 2020-08-22 01:07:03 +05:30
Mohan B E
f60deecdce
Feature/namespaced policy 280 (#1058)
* namespaced policy crd and cache

* modified main.go

* removed kyverno

* implemented policy violation generator for namespaced policy on audit

* modified cache

* added validation for cluster resource types

* install.yaml

* install.yaml

* removed namespaces from crd and refactored code

* modified NamespacePolicy to Policy

* added ClusterRole aggregate for policies

* modified clusterrole
2020-08-19 09:07:23 -07:00
shuting
db342d0ece
Improvements in webhook (#1057)
* remove empty flag

* format code

* revert change in install.yaml

* -  skip mutation for a deleting resource - add debug log

* format code

* revert change in install.yaml

* -  skip mutation for a deleting resource - add debug log
2020-08-17 11:17:07 -07:00
shuting
d6062fdd47
Add go fmt (#1055)
* remove empty flag

* format code

* revert change in install.yaml
2020-08-14 12:21:06 -07:00
Yuvraj
73840e3c5f
configrable rules added (#1017)
* configrable rules added

* fix exclude group logic from code

* flag added in yaml

* exclude username added

* exclude username added

* config interface implimented

* configure exclude username

* get role ref

* test case fixed

* panic fix

* move from interface to slice

* exclude added in mutate

* trim strings

* configmap changes added

* kustomize changes for configmap

* k8s resources added
2020-08-07 17:09:24 -07:00
shuting
39de46fe39
983 kustomize support (#1026)
* prototype - strategic merge patch

* add end to end test

* add engine strategic merge patch support

* set webhook reinvocationPolicy to IfNeeded

* refactor engine mutate code

* support JMESPath in strategic merge patch

* implement patchesJson6902

* update doc

* resolve pr comments
2020-08-05 09:11:23 -07:00
shuting
75a7543c6d
Events fix (#1006)
* remove success event

* remove event success message

* remove events generated on clusterpolicy
2020-07-20 20:30:02 +05:30
evalsocket
629267c40a policy group change 2020-07-15 17:19:20 -07:00
evalsocket
37e3c08476 policy name added in labels 2020-07-15 14:30:00 -07:00
shuting
67f7ed0ed3
Bug fix: perform OR across types in UserInfo (#992)
* remove policy name cache entry on policy DELETE

* buugfix: perform OR in userInfo match

* add function description
2020-07-14 20:23:30 -07:00
Yuvraj
2d11d4a695
Error message update (#988)
* error message update
2020-07-15 01:20:34 +05:30
Yuvraj
4535f43283
Added Synchronize flag in Generate Request (#980)
* fix Synchronize flag issue
2020-07-14 02:12:11 +05:30