Denis Belyshev
a85f646bd4
Removed excess Fatal log
2019-05-27 18:11:39 +03:00
Denis Belyshev
435a19152a
I have finished implementing patterns
2019-05-27 18:07:24 +03:00
Maxim Goncharenko
ac736bbf84
Written base for patterns using TDD
2019-05-27 14:46:29 +03:00
kacejot
8e73131f02
Fixed minor issue in overlay logic. Added tests
2019-05-23 19:13:39 +03:00
kacejot
18fc6d630f
Fixed: Overlay overwrites all items in the list
2019-05-23 16:31:00 +03:00
kacejot
f57cce907a
Fixed issue: Overlay was not returning error
2019-05-23 15:53:35 +03:00
kacejot
139e83c307
Merge remote-tracking branch 'refs/remotes/origin/master'
2019-05-23 14:52:12 +03:00
kacejot
7052d4bb93
Fixed issue: Overlay was not applied
2019-05-23 14:51:41 +03:00
Max Goncharenko
2bed831aff
Merge pull request #95 from nirmata/mutating-overlay
...
Fixed issue: The first element of array was always replaced
2019-05-23 10:55:08 +01:00
Max Goncharenko
feffc6238a
Update overlay.go
2019-05-23 12:51:45 +03:00
Maxim Goncharenko
8735ee7741
Fixed issue: The first element of array was always replaced
2019-05-23 12:45:56 +03:00
shuting
bfc56b935c
check in vendor and code generated by code-gen
2019-05-22 20:33:19 -07:00
shivdudhani
19e137690f
resolve merge conflicts with branch release-0.1
2019-05-22 16:17:26 -07:00
kacejot
101870fb5e
Added Overlay logic to mutation handling
2019-05-22 22:54:38 +01:00
kacejot
1219063ff8
Updated unit tests
2019-05-22 22:43:19 +01:00
kacejot
09e0065d4c
Finished mutating overlay. Added several tests
2019-05-22 22:34:25 +01:00
shivdudhani
857aa81f3e
update the project name in api version and test
2019-05-22 10:53:01 -07:00
shivdudhani
02d17f7d84
rebase with release 1.0
2019-05-22 10:43:29 -07:00
kacejot
f776e26dcc
Updated code due to changes in structure
2019-05-22 18:29:10 +01:00
kacejot
ab31d980b6
Updated mutation base due to spec
2019-05-22 18:28:38 +01:00
Denys Bielyshev
63ab88b6e0
Merge pull request #73 from nirmata/64_rename-crd-to-kyverno
...
64 rename crd to kyverno
2019-05-22 17:17:38 +01:00
kacejot
9bea87ec75
Merge branch 'master' into mutating-overlay
2019-05-22 14:58:42 +01:00
shivdudhani
c99e1dcc19
redesign: introduce cache discovery interface
2019-05-22 00:16:22 -07:00
shuting
09bfdc6ba3
- Change kube-policy to kyverno in install.yaml - Install in namespace kyverno
2019-05-21 18:36:24 -07:00
shivdudhani
31ce087504
support list of kind in resource, update the CRD openapischema & adapt the test and examples for the change
2019-05-21 15:43:43 -07:00
shuting
de83a16493
rename pkg to kyverno
2019-05-21 11:00:09 -07:00
shivdudhani
11d0923e36
replace typed client with dynamic client
2019-05-21 09:43:45 -07:00
shivdudhani
38baee7660
PR code review changes
2019-05-21 09:27:04 -07:00
Maxim Goncharenko
302090cd86
Implemented base for Mutation Overlay
2019-05-21 18:27:56 +03:00
shuting
771dcd358e
support policy apply to multiple resources
2019-05-20 17:59:13 -07:00
shuting
91b7a1b9ac
- handle operation remove case: if path does not exist - remove duplicate log - support validate in CLI
2019-05-20 15:14:01 -07:00
shuting
fae1a4b058
Merge branch 'develop' into 25_CLI-tool
2019-05-20 13:04:45 -07:00
shuting
ffe644f821
Support Mutate from command line
2019-05-20 13:02:55 -07:00
shivdudhani
459be76eb5
support all registered GVK for policy application in admission-controller
2019-05-20 11:43:13 -07:00
shivdudhani
5fcf9adfc5
rebase with develop
2019-05-20 11:01:47 -07:00
shivdudhani
5be203d2ce
group version registration and names correction for gvk
2019-05-20 10:56:12 -07:00
Maxim Goncharenko
500e8d7e16
Fixed string and float type mismatches
2019-05-20 18:28:54 +03:00
Maxim Goncharenko
91de076363
Merge branch 'develop' into lists-validation
2019-05-20 17:25:57 +03:00
Maxim Goncharenko
0aebb2a88e
Fixed int and float types mismatch
2019-05-20 17:07:09 +03:00
Maxim Goncharenko
8f3361e96b
Fixed issue with no message on errorness validation for user
2019-05-20 15:41:23 +03:00
Maxim Goncharenko
be13b041b6
Fixed issue with validation error messages
2019-05-20 14:48:38 +03:00
shuting
b036161f92
Merge branch 'develop' into 28-Stateless-policy-engine
2019-05-17 11:41:09 -07:00
shuting
47916acc63
move test utils to patches_test.go
2019-05-17 11:36:58 -07:00
shivdudhani
80d074d877
Merge branch 'develop' of github.com:nirmata/kube-policy into 29_dynamic_client
2019-05-17 11:22:12 -07:00
shuting
e878c8bc1e
move config to pkg/config
2019-05-17 11:15:30 -07:00
shivdudhani
8d5ae48c30
rebase with 28 stateless policy engine
2019-05-17 09:15:10 -07:00
Maxim Goncharenko
12c5274718
I have applied notes from review
2019-05-17 14:51:54 +03:00
Maxim Goncharenko
a6bb4b8564
Refactored the operator logic
2019-05-17 14:22:03 +03:00
Maxim Goncharenko
0a486a7f54
I have finished implementing validation logic using TDD
2019-05-17 14:03:06 +03:00
shuting
232357ee0e
Merge branch 'lists-validation' into 28-Stateless-policy-engine
...
# Conflicts:
# pkg/engine/generation.go
2019-05-16 18:09:20 -07:00
shuting
36f76a0f2f
- Correct crd yaml, since we only allow 1 generation per rule. - update example for generator
2019-05-16 17:19:38 -07:00
shuting
e8de9a111a
Finished Generate() logic to actual generating the resource
2019-05-16 14:09:02 -07:00
Maxim Goncharenko
e580c5e0ac
Merge branch 'develop' into lists-validation
2019-05-16 21:38:42 +03:00
Maxim Goncharenko
00b667b6e4
Added tests for validation logic
2019-05-16 21:37:54 +03:00
Maxim Goncharenko
354287ebb4
Fixed issue with checking parentheses
2019-05-16 21:36:30 +03:00
shivdudhani
e938866e06
PR review changes
2019-05-16 11:05:13 -07:00
shivdudhani
11195d9b51
rebase with develop
2019-05-16 10:25:18 -07:00
Maxim Goncharenko
7f3500a6fb
Fixed errors in type validation
2019-05-16 19:31:02 +03:00
Maxim Goncharenko
8e65521775
Finished implementing validation patterns
2019-05-16 17:37:05 +03:00
shuting
b58e4f5026
Format project with gofmt, govet, misspell
2019-05-15 18:53:45 -07:00
shuting
9956f3ee12
add unit test pkg/apis/policy/v1alpha1/utils_test.go
2019-05-15 18:27:02 -07:00
shivdudhani
ff48ba08ac
cleanup
2019-05-15 15:08:06 -07:00
shivdudhani
ab008189e7
sharedinfomer factory + update status
2019-05-15 12:29:09 -07:00
shuting
35f829e4b6
remove pkg/engine/mutation/checkRules.go since the logic is moved to /pkg/engine/mutation/utils.go
2019-05-15 11:47:38 -07:00
shuting
b08357a170
update pkg/engine/mutation/patches_test.go
2019-05-15 11:45:16 -07:00
shivdudhani
d315db7cb9
rebase with develop
2019-05-15 11:24:27 -07:00
Maxim Goncharenko
281dc257b9
Reworking validation logic due to the anchor feature
2019-05-15 19:25:49 +03:00
shivdudhani
a375b0e55c
replace kubeclient & add dynamic client
2019-05-15 07:30:22 -07:00
Maxim Goncharenko
800eb9b92d
Removed excess validation
2019-05-15 16:15:16 +03:00
Maxim Goncharenko
113fe517b4
Merge branch 'develop' into lists-validation
2019-05-15 15:59:06 +03:00
Maxim Goncharenko
5be337471b
Removed pkg/engine/utils_test.go because it's never used
2019-05-15 14:26:32 +03:00
Maxim Goncharenko
10e8d2cfe0
Moved common utils for mutation, validation and generation to pkg/engine/utils
2019-05-15 14:25:32 +03:00
Maxim Goncharenko
44ba5dbd8f
Removed TODO comment about ProcessExisting
2019-05-15 14:05:28 +03:00
shuting
a36bb2fbac
Implement Generate()
2019-05-14 18:20:41 -07:00
shuting
5dedbd844a
Merge branch 'develop' into 28-Stateless-policy-engine
...
# Conflicts:
# pkg/controller/processPolicy.go
# pkg/engine/engine.go
# pkg/engine/mutation.go
# pkg/engine/mutation/patches.go
# pkg/engine/validation.go
# pkg/webhooks/server.go
2019-05-14 12:11:07 -07:00
shuting
6d65203d91
Merge branch 'develop' into feature_proposal_redesign_policycontroller_eventcontroller_violationbuilder
...
# Conflicts:
# pkg/controller/processPolicy.go
# pkg/engine/engine.go
# pkg/engine/mutation.go
# pkg/engine/mutation/checkRules.go
# pkg/policyengine/validation.go
# pkg/webhooks/server.go
# pkg/webhooks/utils.go
2019-05-14 11:52:13 -07:00
shuting
3f293d8266
initial commit, remove kubeclient from policy engine
2019-05-14 11:24:40 -07:00
Maxim Goncharenko
bcdbe420a8
Fixed issue with absent kind in resource raw data in PolicyEngine
2019-05-14 19:40:17 +03:00
Maxim Goncharenko
c4a9e339f8
Implemented Validation Pattern base. Updated Webhooks registration logic. Updated project for using TLS package
2019-05-14 18:11:03 +03:00
Maxim Goncharenko
b3452d048f
Removed excess channel awaiting
2019-05-14 18:02:11 +03:00
Maxim Goncharenko
d4148b0255
Moved TLS utils to named package
2019-05-14 17:57:57 +03:00
shuting
d683340a2e
Resolve PR 27
2019-05-13 18:17:28 -07:00
Maxim Goncharenko
1d291c6375
Moved webhook package to pkg
2019-05-13 21:34:46 +03:00
Maxim Goncharenko
b60ec94267
Updated code in the project to be compilable with new version of Policy. Moved logic from webhooks/mutation.go to policyengine/mutation.go and server.go
2019-05-13 21:27:47 +03:00
Maxim Goncharenko
c22add9969
Moved all util funcs to the utils.go. Added deepcopy functions for policy types
2019-05-13 21:20:31 +03:00
Maxim Goncharenko
8fea251837
Made mutation, validation, generation and overlay optional due to the specs
2019-05-13 21:18:02 +03:00
shivdudhani
28eb4fa763
initial commit: call generate from policy controller
2019-05-13 09:47:37 -07:00
Maxim Goncharenko
43ebd8c12c
Changed policy type definition due to the policy-v2 specification
2019-05-13 16:10:00 +03:00
shuting
10e693d318
Remove commented code
2019-05-12 16:29:31 -05:00
shivdudhani
e4366c55be
inital commit: redesign the policyengine to make it stateless
2019-05-10 22:34:14 -07:00
shivdudhani
6d83aa6b9e
merge the changes with policy-engine
2019-05-10 12:36:55 -07:00
shivdudhani
04f5716f7b
rename internal components
2019-05-10 10:38:38 -07:00
shivdudhani
9a7be94930
initial feature proposal
2019-05-10 00:05:21 -07:00
shuting
e25f7a41e4
Update policyengine.go
2019-05-09 22:27:44 -07:00
shuting
7c82ea4284
Add PolicyEngine
2019-05-09 22:26:22 -07:00
shuting
e8e33732cf
move patch logic to pkg/mutation
2019-05-08 10:01:41 -07:00
shivdudhani
3ef72addd8
code review changes: remove extra code
2019-05-08 07:41:26 -07:00
shuting
0c744db0e9
move webhooks/patches.go webhooks/utils.go to pkg/policymanager/
2019-05-07 16:50:39 -07:00
shivdudhani
2b4ac9d07b
code review changes
2019-05-07 13:26:54 -07:00
shivdudhani
9d4541ac02
move policy violation type inside status subresource
2019-05-06 17:03:37 -07:00
shivdudhani
644d044fe6
correct arguments to violation builder
2019-05-06 12:08:31 -07:00
shivdudhani
8af86ab002
rename file, move append events
2019-05-06 10:30:44 -07:00
shivdudhani
0babf1f25d
redesign event & violation builders. kubeclient to provide resource handlers
2019-05-06 09:12:37 -07:00
shuting
447ff441df
Delete policy.go
2019-05-03 18:43:11 -07:00
shuting
82176b5371
remove commented code / extra lines, correct spelling
2019-05-03 16:41:45 -07:00
shuting
4862d03c3c
Remove regexp, add wildcard checks instead
2019-05-03 14:58:09 -07:00
shuting
565afd7e3c
- Update violation ruleName to the actual name of the rule; - Add the description to method ApplyRegex
2019-05-02 11:57:41 -07:00
shuting
06e5c433b9
add violations when patches are not applied
2019-05-01 14:48:50 -07:00
Shivkumar Dudhani
9a6738e272
violation framework updates
2019-04-30 17:30:27 -07:00
shuting
91b3269aa1
implement wildcard support
2019-04-30 17:26:50 -07:00
System Administrator
94bc5f22ca
violation type add + violation builer framework
2019-04-29 14:34:54 -07:00
shuting
2b25eee07c
move engine and violation into pkg
2019-04-26 18:53:38 -07:00
belyshevdenis
6845b48068
NK-31: Implemented validation of failurePolicy field.
2019-03-12 14:42:24 +02:00
belyshevdenis
c7ebbc2def
NK-31: Types validation methods moved to separate source file.
...
assertEq and assertNe utils replaced by gotest.tools/assert, deleted these utils.
Implemented proper serialization of JSON patches: all simple types in values are converted to sting, all maps of interfaces are converted to maps of strings. I.e. implemented applying of JSON patches directly from values in policies.
2019-03-11 20:50:06 +02:00
belyshevdenis
b320b4b433
NK-23: Implemented Validate() methods for structures in types.go.
...
Implemented tests for added methods.
Added usage of Validate() methods to the code, removed old checks.
Fixed some comments, added new comments.
2019-03-05 20:04:23 +02:00
belyshevdenis
2ef3bba93d
NK-23: Thre creation of default loggers moved to inside classes.
...
Removed fatal termination from object constructors.
Implemented new KubeClient class with test method which creates a Secret.
Improved comments for the types structures.
Added WebhookServerConfig structure instead of the most parameters to NewWebhookServer.
2019-03-04 20:40:02 +02:00
belyshevdenis
d593fe1a92
NK-22: Fixed build error with Selector pointer. Added comments. Changed tab to 4 spaces identation. Added unit tests for LabelSelector.
2019-03-01 17:59:59 +02:00
belyshevdenis
d0de77f9ce
NK-21: Improved policy type declaration, fixed declaration of patch field, made corresponding changes to applyPolicyRule. Fixed sentense in README.md.
2019-02-28 19:09:51 +02:00
belyshevdenis
68e468a699
NK-21: Added checking request by selector. Added tests for this logic. Added test policy file for selectors.
2019-02-28 18:43:20 +02:00
belyshevdenis
ae952f73ab
NK-10: Fixed group name in crd.yaml and register.go.
...
Fixed crash in controller, removed name checking in the root of admission request.
2019-02-28 14:25:47 +02:00
belyshevdenis
eb5c486ae1
NK-10: Refactored policy types, used patch operation struct from there instead of internal struct.
...
Implemented checking of incoming request to correspond the policy rule, added tests.
Implemented generation of JSON patches according to patches in policy object, added tests.
Implemented base version of Mutate function as a wrapper for all mutation functions.
2019-02-22 18:12:14 +02:00
belyshevdenis
5680480600
NK-9: Merged Webhook server and Policy controller. Added logger for controller.
2019-02-14 16:40:36 +02:00
belyshevdenis
65f766d905
NK9: Removed storage logic due to the policies cache. Updated types due to the policy-example.yaml
2019-02-14 14:33:36 +02:00
belyshevdenis
a6bc743f99
NK9: Added controller module. Added main loop for controller. Added informer for Policies. Fixed apis definitions to fit the Policy
2019-02-11 19:49:27 +02:00
belyshevdenis
9a0db318d3
Initial commit with resource stub
2019-02-06 14:23:15 +02:00