shuting
7ffeb6efca
skip generate violation on pre-exist pod ( #952 )
2020-06-25 09:52:54 -07:00
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
838d02c475
Bugfix/659 support wildcards for namespaces ( #871 )
...
* - support wildcards for namespaces
* do not annotate resource, unless policy is an autogen policy
* close HTTP body
* improve messages
* remove policy store
Policy store was not fully implemented and simply provided a way
to list all polices and get a policy by name, which can be done via
standard client-go interfaces.
We need to revisit and design a better PolicyStore that provides fast
lookups for matching policies based on names, namespaces, etc.
* handle wildcard namespaces in background processing
* fix unit tests 1) remove platform dependent path usage 2) remove policy store
* add test case for mutate with wildcard namespaces
2020-05-26 10:36:56 -07:00
shravan
f08f7e22c7
744 supporting Equals and NotEquals as operater types
2020-05-06 22:43:17 +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
93fa54bf79
744 deny all requests
2020-04-18 18:26:09 +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
shivkumar dudhani
e6e5bbb603
Merge branch 'master' into access_check
2020-03-17 17:23:18 -07:00
shivkumar dudhani
1b1ab78f77
logs & access
2020-03-17 11:05:20 -07:00
shravan
36e775edb0
527 resolved merge conflicts
2020-02-24 20:19:28 +05:30
shravan
d080aa18ce
527 prototype changes to handle generate stats - also changes made to handle stats such as violation count and generated resources count - currently untested
2020-02-24 20:12:39 +05:30
shravan
d758a4ad45
527 added accurate violation Count
2020-02-23 23:24:18 +05:30
shravan
592df74c57
527 tested mutate needs further testing
2020-02-22 23:35:02 +05:30
shravan
a15a741cb4
527 save commit
2020-02-22 16:57:00 +05:30
shivkumar dudhani
d855247a98
refactor generate to use variable substition at rule level
2020-02-13 13:57:48 -08:00
Jim Bugwadia
a1b49f72a3
fix gofmt and golint issues ( #667 )
...
* fix gofmt and golint issues
* add keys to structs
* fix compile error
* fix clusterrolebinding creation
* fix test
2020-02-03 13:38:24 -08:00
shuting
3343d73b76
linter fix ( #657 )
2020-01-27 08:58:53 -08:00
Shivkumar Dudhani
8c1d79ab28
linter suggestions ( #655 )
...
* cleanup phase 1
* linter fixes phase 2
2020-01-24 12:05:53 -08:00
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
b493600754
remove omitemptu on pocliy.spec and policy.spec.rules
2020-01-02 12:17:47 -08:00
Shuting Zhao
d36934fe11
Merge commit '5b8ab3842b43a72cc675b93b8b72e290adfca1d2' into 518_pod_controller
...
# Conflicts:
# pkg/api/kyverno/v1/types.go
# pkg/engine/mutation.go
# pkg/engine/mutation_test.go
# pkg/engine/validation.go
# pkg/policy/existing.go
2020-01-02 10:32:17 -08:00
Shivkumar Dudhani
5b8ab3842b
Support variable substitution ( #549 )
...
* initial commit
* variable substitution
* update tests
* update test
* refactor engine packages for validate & generate
* update vendor
* update toml
* support variable substitution in overlay mutation
* missing update
* fix indentation in logs
* store context values as single JSON document using merge patches.
* remove duplicate functions
* fix message string
* Handle processing of policies in background (#569 )
* remove condition check while generating mutation patch as conditions are verified in the first iteration
* initial commit
* background policy validation
* correct message
* skip non-background policy process for add/update
* fix order to correct policy registration
* update comment
Co-authored-by: shuting <shutting06@gmail.com>
* refactor
Co-authored-by: shuting <shutting06@gmail.com>
2019-12-30 17:08:50 -08:00
Shuting Zhao
e3a8cabe8d
add omitempty to types
2019-12-20 18:51:07 -08:00
Shuting Zhao
a107ad7ac8
rename namespacedpolicyviolation: update codegen
2019-12-11 16:07:39 -08:00
Shivkumar Dudhani
734ef44b17
504 bug ( #505 )
...
* correct role/clusterrole kind
* remove namespace from resource spec
* namespace lister to filter on namespace
* CR fixes
* refactor
* add namespace field back to types
2019-11-22 12:23:50 -08:00
Shivkumar Dudhani
69d4cb0b27
remove v1alpha pkgs ( #489 )
2019-11-13 18:58:49 -08:00
Shuting Zhao
eab9609c6a
update api in tests
2019-11-13 13:56:07 -08:00
Shuting Zhao
b67577994a
update apiversion to v1 in code
2019-11-13 13:41:08 -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
0badf761a8
add namespace cluster policyviolation crd
2019-11-12 19:02:31 -08:00
Shuting Zhao
5a3ed62b13
Merge branch 'master' into 345_support_usergroup_info
...
# Conflicts:
# pkg/engine/validation_test.go
# pkg/webhooks/annotations.go
# pkg/webhooks/annotations_test.go
# pkg/webhooks/mutation.go
# pkg/webhooks/server.go
# pkg/webhooks/validation.go
2019-11-11 19:19:08 -08:00
Shivkumar Dudhani
1613434c46
458 cleanup ( #464 )
...
* cleanup of policy violation on policy spec changes + refactoring
* remove unused code
* remove duplicate types
* cleanup references
* fix info log and clean code
* code clean
* remove dead code
2019-11-08 20:45:26 -08:00
Shuting Zhao
a7e55ed25e
update types for match/exclude
2019-11-08 18:53:29 -08:00
Shuting Zhao
8047ed68d3
remove required mark for managedresource "kind"
2019-10-28 11:44:48 -07:00
Shuting Zhao
3a3efe00f1
- rename to managedResource; - refact code structure
2019-10-24 15:50:11 -07:00
Shuting Zhao
6e69c8b69b
cleanup pv with dependant when blocked admission request pass
2019-10-23 23:18:58 -07:00
Shuting Zhao
32f94bca27
manage policy validation inside engine pkg
2019-10-18 17:45:24 -07:00
Shuting Zhao
7239b4d9b7
Merge commit '37c25daa17ad046f739e74d803cb78d887805bb4' into 346_validate_policy
...
# Conflicts:
# pkg/api/kyverno/v1alpha1/utils.go
2019-10-18 10:09:44 -07:00
shivkumar dudhani
f6367cfe4a
add negation anchor
2019-10-10 16:59:08 -07:00
Shuting Zhao
57456e5f06
improve code
2019-10-03 18:19:47 -07:00
Shuting Zhao
ae393f567d
make validation checks on different block internally
2019-10-03 17:53:46 -07:00
Shuting Zhao
e20d86f45c
remove duplicate code: hasMutate..
2019-10-03 17:00:05 -07:00
Shuting Zhao
c56c5c365d
Provide more details to policy validation errors
2019-10-03 16:49:41 -07:00
Shuting Zhao
572418795a
add validate checks for generate
2019-10-03 14:47:50 -07:00