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

113 commits

Author SHA1 Message Date
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
Yuvraj
251521a77a policy report added 2020-08-26 18:50:38 +05:30
shuting
513f5ec898
add watch policy to clusterrole kyverno:customresources (#1084) 2020-08-24 12:27:16 -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
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
Michael Barrientos
d2ac5b829b
Replace CRD AnyValue fields with empty dict (#1047) 2020-08-13 11:57:35 -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
3b03531b97 add permission to get role / clusterRole 2020-07-10 20:04:52 -07:00
NoSkillGirl
b589169b5e Added in-notin operator 2020-06-26 12:48:45 +05:30
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
Yuvraj
5df422fd63 Added aggregated view clusterroles 2020-06-05 14:36:37 -07:00
Yuvraj
03c36d7df1 Added generated file 2020-06-05 13:51:22 -07:00
Yuvraj
4d9226351f replace crd with latest crd 2020-06-05 13:49:53 -07:00
Yuvraj
d96f3e6c89 remove duplicate crd changes 2020-06-05 13:42:53 -07:00
Shuting Zhao
852f2bec2d Fix CRD definition 2020-05-18 17:10:35 -07:00
shravan
f08f7e22c7 744 supporting Equals and NotEquals as operater types 2020-05-06 22:43:17 +05:30
shravan
c6dd8443ef 744 added validation for operator property in condition 2020-05-06 20:46:34 +05:30
shravan
6b1498b770 744 fixing policy validation and removing allRequests field 2020-05-06 19:46:32 +05:30
shravan
f839f27b41 Merge branch 'master' into 744_deny_requests 2020-04-27 15:12:35 +05:30
shravan
3b96d1bfc2 744 save commit 2020-04-27 11:47:33 +05:30
shravan
93fa54bf79 744 deny all requests 2020-04-18 18:26:09 +05:30
shravan
83ecd95945 744 added all request values to context 2020-04-15 21:17:14 +05:30
shravan
4cb44bce09 744 save commit 2020-04-14 19:06:48 +05:30
shravan
61918d9826 808_prototype 2020-04-12 18:58:55 +05:30
shravan
2451756651 744 tested prototype 2020-04-10 23:24:54 +05:30
shravan
77910a863e 789 tested prototype 2020-04-02 22:18:26 +05:30
shravan
5aa74c2b7a 755 exclude should not have any mandatory fields, currently the resource field in exclude is mandatory - which was made optional in this commit 2020-03-20 16:41:23 +05:30
shravan
0c817e8972 721 fixes 2020-02-23 19:08:24 +05:30
Shivkumar Dudhani
2f1c8c688c
add type in openapi schema (#629) 2020-02-18 14:55:12 -08:00
shravan
d38bf5c16e 658 prototype changes without policy lookup update 2020-02-05 15:55:37 +05:30
Shuting Zhao
eb0390d0ed remove managedResource 2020-01-10 13:34:45 -08:00
Shivkumar Dudhani
3cf9141f4d
593 feature (#594)
* initial commit

* background policy validation

* correct message

* skip non-background policy process for add/update

* add Generate Request CR

* generate Request Generator Initial

* test generate request CR generation

* initial commit gr generator

* generate controller initial framework

* add crd for generate request

* gr cleanup controller initial commit

* cleanup controller initial

* generate mid-commit

* generate rule processing

* create PV on generate error

* embed resource type

* testing phase 1- generate resources with variable substitution

* fix tests

* comment broken test #586

* add printer column for state

* return if existing resource for clone

* set resync time to 2 mins & remove resource version check in update handler for gr

* generate events for reporting

* fix logs

* initial commit

* fix trailing quote in patch

* remove comments

* initial condition (equal & notequal)

* initial support for conditions

* initial support fo conditions in generate

* support precondition checks

* cleanup

* re-evaluate GR on namespace update using dynamic informers

* add status for generated resources

* display loaded variable SA

* support delete cleanup of generate request main resources

* fix log

* remove namespace from SA username

* support multiple variables per statement for scalar values

* fix fail variables

* add check for userInfo

* validation checks for conditions

* update policy

* refactor logs

* code review

* add openapispec for clusterpolicy preconditions

* Update documentation

* CR fixes

* documentation

* CR fixes

* update variable

* fix logs

* update policy

* pre-defined variables (serviceAccountName & serviceAccountNamespace)

* update test
2020-01-07 15:13:57 -08:00
Shivkumar Dudhani
ffd2179b03
538 (#587)
* initial commit

* background policy validation

* correct message

* skip non-background policy process for add/update

* add Generate Request CR

* generate Request Generator Initial

* test generate request CR generation

* initial commit gr generator

* generate controller initial framework

* add crd for generate request

* gr cleanup controller initial commit

* cleanup controller initial

* generate mid-commit

* generate rule processing

* create PV on generate error

* embed resource type

* testing phase 1- generate resources with variable substitution

* fix tests

* comment broken test #586

* add printer column for state

* return if existing resource for clone

* set resync time to 2 mins & remove resource version check in update handler for gr

* generate events for reporting

* fix logs

* cleanup

* CR fixes

* fix logs
2020-01-07 10:33:28 -08:00
Shuting Zhao
81a0cc4f45 add age column to pv printer 2019-12-12 15:19:48 -08:00
Shuting Zhao
a107ad7ac8 rename namespacedpolicyviolation: update codegen 2019-12-11 16:07:39 -08:00
Shivkumar Dudhani
59f864c5d7
474 feature (#503)
* add printer columns

* add shortNames for CRD
2019-11-25 12:36:47 -08:00
shivkumar dudhani
9a24a27368 CR fixes 2019-11-15 16:10:12 -08:00
Shuting Zhao
6b227a2aa9 update crds to V1 2019-11-13 13:41:28 -08:00
Shuting Zhao
fc35a52ad8 Merge branch 'master' into 455_namespace_pv
# Conflicts:
#	definitions/install_debug.yaml
#	main.go
#	pkg/webhooks/mutation.go
#	pkg/webhooks/server.go
#	pkg/webhooks/validation.go
2019-11-13 11:46:46 -08:00
Shuting Zhao
3706822df7 update crd 2019-11-12 19:02:31 -08:00
Shuting Zhao
565a9b0f8f update crd 2019-11-11 18:52:39 -08:00
Shivkumar Dudhani
158a499feb
Merge branch 'master' into 261_dynamic_config 2019-10-28 15:06:37 -05:00
shivkumar dudhani
1528b7f333 add configMap to install.yaml 2019-10-28 15:00:20 -05:00
Shuting Zhao
8047ed68d3 remove required mark for managedresource "kind" 2019-10-28 11:44:48 -07:00
Shuting Zhao
50daf03743 clean up definitions folder 2019-10-25 13:53:16 -07:00
shivkumar dudhani
2669b0ae6b set default ValidationFailureAction to 'audit' 2019-09-06 10:18:45 -07:00
shivkumar dudhani
fa53519e2a change CRD Name to ClusterPolicy & ClusterPolicyViolations 2019-09-03 14:51:51 -07:00