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

236 commits

Author SHA1 Message Date
Shuting Zhao
1e00ef27d0 update crd manifests 2020-11-15 22:47:55 -08:00
Shuting Zhao
365dd6e408 update kyverno crd types.go 2020-11-13 16:02:44 -08:00
Shuting Zhao
047b2b8739 update types.go to generate schema 2020-11-12 19:48:39 -08:00
Shuting Zhao
58bc63e1ad remove policy violation from types.go 2020-11-11 15:50:17 -08:00
Shuting Zhao
2292bf860b update policyreport group to wgpolicyk8s.io 2020-11-11 15:09:07 -08:00
NoSkillGirl
acc34fbf0a Merge commit 2020-11-10 10:49:29 +05:30
Shuting Zhao
a39f4f5e61 tag v1.3.0-rc1 2020-11-09 11:43:22 -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
Shuting Zhao
b14174e51b refine description 2020-11-03 17:18:51 -08:00
Shuting Zhao
97e6382aaf update description 2020-11-03 16:57:47 -08:00
Shuting Zhao
a1eda94a80 Merge branch 'main' into policyreport
# Conflicts:
#	pkg/utils/util.go
2020-11-03 16:43:00 -08:00
Shuting Zhao
d19a44d34c print fields failreAction and background for kyverno policy 2020-11-03 16:31:41 -08:00
Shuting Zhao
51e2b0d978 change severity fields to lower case 2020-11-03 14:08:45 -08:00
Shuting Zhao
2abfff1f06 remove violation CRD from manifest 2020-11-02 17:08:35 -08:00
Shuting Zhao
153516b0d6 move reportChangeRequest to kyverno.io/v1alpha1 2020-10-30 19:26:53 -07:00
Shuting Zhao
e5c5cb39a0 update summary.* to lower case 2020-10-30 18:01:46 -07:00
Shuting Zhao
ba4b36153d rename apiversion from policy.kubernetes.io to policy.k8s.io 2020-10-30 17:33:20 -07:00
Shuting Zhao
53139db74f - rename reportRequest to reportChangeRequest; -rename clusterReportRequest to clusterReportChangeRequest 2020-10-28 15:36:50 -07:00
Shuting Zhao
fc3624f57b update resource filter in helm chart 2020-10-28 14:54:35 -07:00
Shuting Zhao
63a8d89c8d - update report summary to optional; - generate clusterPolicyReport; - remove reportRequests after merged to report 2020-10-27 18:28:30 -07:00
Shuting Zhao
32d834ea26 - update json tag of report summary; - update definition manifests; - fix dclient creation 2020-10-26 16:08:25 -07:00
Jim Bugwadia
ee6ff959de
update docs (#1213) 2020-10-24 21:59:54 -07:00
Shuting Zhao
36c549ea22 Merge branch 'master' into policyreport
# Conflicts:
#	charts/kyverno/values.yaml
2020-10-22 20:35:22 -07:00
otakuma
8c9c0139c8
Helm namespace value (#1210)
* enable users to specify namespace in helm chart values file

* update chart readme

* remove .DS_Store files

Co-authored-by: Qijun Liu <qliu@gracenote.com>
2020-10-22 17:53:17 -07:00
Shuting Zhao
2364ff1407 add reportRequest / clusterReportRequest 2020-10-22 16:15:43 -07:00
Shuting Zhao
af07e66ede - tag v1.2.1; - update liveness, readiness port in Helm chart 2020-10-22 13:07:48 -07:00
Jim Bugwadia
022c227bce update pod security context and ports 2020-10-22 11:26:22 -07:00
Shuting Zhao
25409e42ea - remove job controller; - remove in-memory configmap; - clean up kustomize manifest 2020-10-21 17:56:17 -07:00
Shuting Zhao
5b4afa85e2 add short names 2020-10-14 19:23:08 -07:00
Shuting Zhao
6b5e935e49 Merge branch 'feature/reports-cli' of https://github.com/evalsocket/kyverno into policyreport
# Conflicts:
#	Makefile
#	cmd/kyverno/main.go
#	go.mod
#	go.sum
#	pkg/client/clientset/versioned/clientset.go
#	pkg/client/clientset/versioned/fake/clientset_generated.go
#	pkg/client/clientset/versioned/fake/register.go
#	pkg/client/clientset/versioned/scheme/register.go
#	pkg/client/informers/externalversions/factory.go
#	pkg/client/informers/externalversions/generic.go
#	pkg/client/listers/kyverno/v1/expansion_generated.go
#	pkg/policy/common.go
#	pkg/policy/controller.go
#	pkg/policy/existing.go
#	pkg/policyviolation/builder.go
#	pkg/policyviolation/generator.go
#	pkg/webhooks/server.go
#	pkg/webhooks/validate_audit.go
#	pkg/webhooks/validation.go
2020-10-12 18:30:37 -07:00
Shuting Zhao
49c61a574a tag v1.2.0 2020-10-07 15:44:15 -07:00
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
Jim Bugwadia
73044f9515
fixes #1152 (#1154) 2020-09-29 16:15:27 -07:00
Shuting Zhao
fe20f3aa4c tag 1.1.12 2020-09-18 12:57:38 -07:00
evalsocket
d6b0af986e tested policy report 2020-09-16 06:56:38 -07:00
evalsocket
6aa9876f9f cronjob added 2020-09-15 11:20:08 -07:00
evalsocket
6a0a5132b5 resolve conflict 2020-09-11 05:16:31 -07:00
evalsocket
b008ec0aaa added job trigger if needed 2020-09-10 10:19:36 -07:00
Shuting Zhao
c7adf66fda tag 1.1.11 2020-09-08 11:53:49 -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
Yuvraj
09faf48b35 policy report removed 2020-09-03 22:35:34 +05:30
Yuvraj
e43154ea1c merge conflict resolve 2020-09-02 14:17:33 +05:30
Yuvraj
a01bfc7f15 configmap added 2020-08-29 04:31:40 +05:30
Michael Barrientos
b067f41d02
Replace Policy CRD AnyValue fields with empty dict (#1086)
/kind cleanup

\## Proposed change

This implements the same change as #1047, except for the new Policy CRD instead of the ClusterPolicy CRD, which apparently did not get those updates before merging.

When deploying Kyverno using Argo CD, we get a persistent false diff for the Policy custom resource definition (the definition itself, not instances of Policy), because Kubernetes converts the invalid AnyValue: {} property types to just an empty dict {}. Since the Kubernetes server makes this change to {} unilaterally after applying, when a diffing tool like Argo CD compares it against the YAML manifest, each such instance of AnyValue appears as a diff.

I know that since AnyValue is not part of the official OpenAPI V3 schema, and that when you run kubectl get crd policies.kyverno.io -o yaml the status message shows Kubernetes complaining about "Required value: must not be empty for specified object fields" for all of these fields. In theory the correct solution would be to somehow provide a full schema, but I know this can be tricky for these data/anyPattern/patches types, but at the minimum, I would like to get Argo CD to believe that there are no changes that need to be applied.

Since these fields are already silently turned into {} by Kubernetes, this should have no functionality change on existing code/deployments.
2020-08-26 11:11:36 -07:00
shuting
513f5ec898
add watch policy to clusterrole kyverno:customresources (#1084) 2020-08-24 12:27:16 -07:00
Shuting Zhao
1371da939b tag v1.1.10 2020-08-21 11:12:55 -07:00
Mohan B E
4c7ae3f5f7
added helm chart icon (#1077) 2020-08-21 09:46:04 -07:00
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
Yuvraj
3799b52fc8
[BUG] filterK8Resources is not correctly configured using ConfigMap (#1059)
* configmap issue fixed

* fixed e2e test

* helm template file added

* remove extra check

* string empty check removed
2020-08-19 13:46:08 +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
Yuvraj
4ee523dccf
default exclude group role (#1052) 2020-08-13 14:30:25 -07:00
Michael Barrientos
d2ac5b829b
Replace CRD AnyValue fields with empty dict (#1047) 2020-08-13 11:57:35 -07:00
Shuting Zhao
41667038e0 tag 1.1.9 2020-08-10 17:20:48 -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
Mohan B E
a14828246d
Feature/api version 852 (#1028)
* apiVersion support for generate

* added apiVersion to crds
2020-08-07 09:47:33 +05:30
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 Zhao
71ff4b911d tag 1.1.8 2020-07-21 11:06:42 -07:00
Shuting Zhao
f39372cb66 tag v1.1.7 2020-07-15 13:05:54 -07:00
Shuting Zhao
06db774cdd tag v1.1.7-rc4 2020-07-14 20:59:45 -07:00
shuting
2c5c7494a5
tag 1.1.7-rc3 (#985) 2020-07-13 14:45:54 -07:00
Shuting Zhao
3b03531b97 add permission to get role / clusterRole 2020-07-10 20:04:52 -07:00
shuting
204c2b9d8c
tag 1.1.7-rc2 (#978) 2020-07-10 19:25:44 -07:00
Pooja Singh
59b2378274
reading kyverno svc from environment variable (#962)
* reading kyverno svc from environment variable

* updated readme
2020-07-04 19:35:31 -07:00
Shuting Zhao
5e9cc1d669 update helm chart version 2020-07-01 18:16:07 -07:00
Pooja Singh
ac5d69895a
removing hardcoded namespace from the code (#955)
* removing hardcoded namespace from the code

* Added to helm chart

* removing hard-coded namespace and deployment name from config, generate, checker

* added namespace to configMap, service, serviceAccount

* updated installation documentation

passing `KYVERNO_NAMESPACE` while running in debug mode.

* Update installation.md

removing `kyverno` only namespace note
2020-07-01 14:50:49 -07:00
NoSkillGirl
e8c4050d49 Added In and NotIn Operators 2020-06-26 12:48:12 +05:30
Yuvraj
01724d63cf
Synchronize data for generated resources (#933)
* Generate request added fro update resource

* synchronize flag added

* documentation added for keeping resource synchronized

Signed-off-by: Yuvraj <yuvraj.yad001@gmail.com>
2020-06-23 07:19:43 +05:30
Jim Bugwadia
434d2452c7
update helm install 2020-06-05 16:59:26 -07:00
Yuvraj
d96f3e6c89 remove duplicate crd changes 2020-06-05 13:42:53 -07:00
Jim Bugwadia
7062349fcf
update chart version 2020-06-04 18:59:42 -07:00
Jim Bugwadia
0b8abc8c7a
Merge pull request #916 from nirmata/fix-helm-text
make helm text consistent
2020-06-04 18:50:12 -07:00
Jim Bugwadia
53fb634afe
Update version (#914) 2020-06-04 18:46:17 -07:00
Jim Bugwadia
4368787465
fix title 2020-06-04 18:45:47 -07:00
Jim Bugwadia
c46ceecd8c
Update helm chart docs 2020-06-04 18:33:42 -07:00
Yuvraj
d51807aac2
Hotfix/ci (#905)
* docs update and fixed issue for docker push on release
2020-06-04 14:31:54 -07:00
Yuvraj
bd5f871fee helm docs added for helm repository 2020-06-03 17:02:02 -07:00
Yuvraj
02aabbb08a chart version added to v1 2020-05-28 13:11:03 -07:00
Yuvraj
74db840b25
Added readiness and liveness prob (#874)
* Added readiness and liveness prob

* typo fix

* port number fixed

* fixed the image name
2020-05-26 18:03:32 -07:00
Yuvraj
3204b16559 resource limit added to kyverno defination and kyvrno chart
Signed-off-by: Yuvraj <yuvraj.yad001@gmail.com>
2020-05-21 12:18:05 -07:00
Shuting Zhao
bc0c733fa2 remove roles 2020-05-21 10:22:19 -07:00
Shuting Zhao
2dda3e2a42 pr fix 2020-05-21 08:29:35 -07:00
Shuting Zhao
980ad39df8 update helm chart 2020-05-20 19:18:03 -07:00
shravan
63b3f81e67 chart readme fixes 2020-05-13 15:53:26 +05:30
Michael Barrientos
b328dc6ff1
Fix Helm chart README.md for Helm 3 2020-05-13 02:15:36 -07:00
Michael Barrientos
a3889d8c39
Add Helm chart for Kyverno - #835 2020-05-08 19:10:27 -07:00