shuting
e8e33732cf
move patch logic to pkg/mutation
2019-05-08 10:01:41 -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
0babf1f25d
redesign event & violation builders. kubeclient to provide resource handlers
2019-05-06 09:12:37 -07:00
shuting
4862d03c3c
Remove regexp, add wildcard checks instead
2019-05-03 14:58:09 -07:00
shuting
d0e832b424
remove violations generate from applyPolicyRules
2019-05-02 15:08:10 -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
8558ba3d64
change util function for retrieving kind, name and namespace from resource RAW
2019-05-02 11:15:23 -07:00
shuting
06e5c433b9
add violations when patches are not applied
2019-05-01 14:48:50 -07:00
shuting
2e1c4b36d9
parse regex from policyResourceName
2019-04-30 18:54:08 -07:00
shuting
91b3269aa1
implement wildcard support
2019-04-30 17:26:50 -07:00
shuting
5ba0b0b842
modify applyPOolicyRule to make it reusable for a certain raw resource
2019-04-29 19:27:59 -07:00
belyshevdenis
547787b8b1
NK-51: Kubeclient is encapsulated now
2019-03-25 18:12:48 +02:00
belyshevdenis
670881c71d
NK-51: Added Deployment as owner of MutatingWebhookConfiguration. This allows kubernetes to delete webhook config, when deployment deletes.
2019-03-25 18:12:48 +02:00
belyshevdenis
c0ce49052b
NK-47: Added missed files
2019-03-25 10:11:50 +02:00
belyshevdenis
6662988124
NK-31: Refactoring
2019-03-21 18:14:26 +02:00
belyshevdenis
0ef675f3c1
NK-31: Implemnted loggin about success to policy.
...
Also fixed showing of error on initialization.
2019-03-21 18:10:26 +02:00
belyshevdenis
8f7a0dba95
NK-31: Fixed indentation
2019-03-21 18:10:26 +02:00
belyshevdenis
b160fabcba
NK-31: Put constants in separate file. Updated install.yaml definition to create Service and DaemonSet. Fixed bug with webhook registration.
2019-03-21 18:10:26 +02:00
belyshevdenis
c662f1c9db
NK-31: Renamed constants package to config
2019-03-21 18:09:14 +02:00
belyshevdenis
20d9fcd563
NK-31: Fixed indentation
2019-03-21 16:56:03 +02:00
belyshevdenis
92c97a92e9
NK-31: Put constants in separate file. Updated install.yaml definition to create Service and DaemonSet. Fixed bug with webhook registration.
2019-03-21 15:57:30 +02:00
belyshevdenis
0afd1c279f
NK-31: Added tests for CA extraction from clientset
2019-03-20 12:37:05 +02:00
belyshevdenis
89b211d1f9
NK-31: Implemented webhook registration logic.
2019-03-19 21:32:31 +02:00
belyshevdenis
f0fb3c671d
NK-31: Fixed reporting about patching errors
2019-03-19 14:16:09 +02:00
belyshevdenis
491f4baf78
NK-31: Added missed file
2019-03-15 17:58:16 +02:00
belyshevdenis
85c84046af
NK-31: SerializePatches decomposed to ProcessPatches and JoinPatches. Implemented new tests for ProcessPatches, used it in mutation webhook. Added options for behavior on errors while patching. Improved and refactored code for mutation webhook. Added dependency from json-patch lib.
2019-03-12 22:02:39 +02:00
belyshevdenis
e2b7444271
NK-31: Removed processPatchValue function because it causes validation mismatches, changed tests.
2019-03-12 15:20:52 +02:00
belyshevdenis
040ea99f41
NK-31: Fixed compilation
2019-03-12 14:53:32 +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
b674120db8
NK-31: used gotest.tools/assert package instead of utils in admission_test
2019-03-11 19:27:22 +02:00
belyshevdenis
70b658b359
NK-31: Fixed supporting policies for Endpoints
2019-03-11 16:17:58 +02:00
belyshevdenis
898652b9a2
NK-23: Improved comments, commited crd with status subresource.
2019-03-07 17:57:43 +02:00
belyshevdenis
0a939e44dc
NK-23: Implemented logging to the policy object/status.
...
Refactored MutationWebhook, modified controller logs.
2019-03-07 17:42:37 +02:00
belyshevdenis
9d5f77a941
NK-23: Implemented generating of secrets and configmaps after namespace is created.
...
Functions for parsing metadata moved to utils.
Changed login of mutation webhook according to last changes.
2019-03-06 13:01:17 +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
ea9491a105
NK-10: Controller renamed to PolicyController. Created MutationWebhook class in new webhook package. Implemented filtering of incoming objects by Kind. Implemented simple usage of PolicyController in MutationWebhook.
2019-02-21 20:31:18 +02:00