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
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
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
43bb3a47e7
NK-23: Fixed README.md
2019-03-07 18:51:14 +02:00
belyshevdenis
8c8c01a452
NK-23: Fixed readme and deployment script, deleted extra resource.
2019-03-07 18:48:02 +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
307df4786f
NK-22: Test CA certificates in yamls replaced by placeholders
2019-03-01 18:37:58 +02:00
belyshevdenis
43a6ec1abf
Merge branch 'NK-22_Refactoring'
2019-03-01 18:02:48 +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
c3b903a94b
NK-22: Fixed compile-image.sh
2019-03-01 17:40:47 +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
belyshevdenis
81e54bb6a0
Implemented test webhook, fixed script for certificate generation, fixed project dependencies
2019-02-21 18:13:21 +02:00
belyshevdenis
0f78f5cb82
NK-10: Small fixes after dev testing
2019-02-19 18:01:47 +02:00
belyshevdenis
3661e012a5
NK-10: Implemented basic logic for mutation, added logs
2019-02-15 20:00:49 +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
6765c97106
NK-8: Implemented deployment script for free (local) and in-cluster usage of the controller. Added readme file for scripts, improved scripts: implemented more convenient way to pass arguments. Removed hardcode from server.go.
2019-02-13 19:57:18 +02:00
belyshevdenis
c30f4d3119
NK-8: Implemented script for generating webhook server certificates, script for building the Docker container with webserver executable, script for deploying webserver to the cluster. Provided YAMLS for webhooks service and deployment. Changed YAML for webhook configuration: now webhook server is configured as a service.
2019-02-13 15:28:16 +02:00
belyshevdenis
ddf3e4c278
NK9: Updated policy crd and added minimal policy sample to check controller functions
2019-02-12 19:01:25 +02:00
belyshevdenis
e96562a1cf
NK9: Controller is a separate module now
2019-02-12 16:57:36 +02:00
belyshevdenis
88c90eaa4d
NK-8: Implemented basic HTTPS server with stub for mutation webhook. Implemented script for generating TLS key and certificate. Created MutatingWebhookConfiguration.yaml with declaration of future service.
2019-02-12 16:30:40 +02:00
belyshevdenis
ed86223f3e
NK-8: Implemented basic HTTPS server with stub for mutation webhook. Implemented script for generating TLS key and certificate. Created MutatingWebhookConfiguration.yaml with declaration of future service.
2019-02-12 16:12:03 +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
44ddeb9a68
NK-8: Implemented simple webserver with empty mutation handler
2019-02-07 19:22:04 +02:00
belyshevdenis
b3dff90019
NK17: Fixed dep command in readme
2019-02-07 14:34:20 +02:00
belyshevdenis
84cd3677ab
NK17: Fixed code generation, updated README.md
2019-02-06 19:51:47 +02:00
belyshevdenis
b93fb184cc
NK2: Added script for code-generator, YAMLs with CRDs and stub for main.go
2019-02-06 14:52:09 +02:00
belyshevdenis
9a0db318d3
Initial commit with resource stub
2019-02-06 14:23:15 +02:00
Jim Bugwadia
591880cdfe
Update README.md
...
add placeholders
2019-02-04 08:30:38 -08:00
Jim Bugwadia
bad7ef25fd
Initial commit
2019-02-04 08:25:49 -08:00