24 Commits

Author SHA1 Message Date
Dario Tranchitella
d2700556dd Adding linters and aligning code (#169)
* Adding linters and aligning code

* Aligning ingressHostnames to AllowedListSpec
2021-01-13 23:49:11 +01:00
Geofrey Ernest
1ed5d703e6 Short circuit error returns (#175) 2020-12-23 15:08:15 +01:00
Dario Tranchitella
03eb6e633e No loop on ResourceQuota outer updates and error handling improvements (#168)
* Avoiding loop on updating outer resource quota

* Using retryOnConflict on Tenant status update

* Using errgroup instead of bare go routines

* Testing Namespace Capsule default label presence
2020-12-20 12:25:41 +01:00
Dario Tranchitella
007bdff512 Only owner Tenant specification key is mandatory (#153)
* Only Tenant owner specification key is mandatory

* Increasing default timeout to avoid e2e flakiness on GH Actions

* Ensuring also empty Namespace annotations and labels
2020-12-11 15:47:29 +01:00
Dario Tranchitella
3e38884a6c Annotating Tenant's Namespaces with allowed registries (#154)
* Updating allowed registries docs w/ Namespace annotations
2020-12-09 15:20:14 +01:00
Dario Tranchitella
40130696bb Annotating ResourceQuota with Hard quota (#158) 2020-12-09 15:19:16 +01:00
Dario Tranchitella
ea599ba6e6 Supporting additional Role Bindings per Tenant (#133)
* Enabling Capsule to run on a cluster with PodSecurityPolicy enabled

* Supporting additional Role Binding per Tenant

* Documenting the additionalRoleBindings specification
2020-11-16 13:51:44 +01:00
Maxim Fedotov
078588acb5 migrating service webhook to controller p1 (#130)
migrating service webhook to controller p2

migrating service webhook to controller p3. add tests

Using an abstract reconciler to avoid copy/paste code

update tests. remove service_labels webhook. fix bug in sync labels\endpoint func

apply review notes

disable EndpointSlicesLabelsReconciler for kubernetes versions <=1.16

Co-authored-by: Maksim Fedotov <m_fedotov@wargaming.net>
2020-11-10 19:43:30 +03:00
Dario Tranchitella
a7f7c00558 Supporting ingresses.networking.k8s.io/v1 (#110)
* Updating to controller-runtime v0.7.0-alpha.4 and k8s 0.19.3

* Implementing ingresses.networking.k8s.io/v1

* Aligning to latest zap signatures
2020-10-23 21:19:14 +02:00
Maxim Fedotov
875650f185 Regexp support for Ingress and Storage classes (#89)
Co-authored-by: Maksim Fedotov <m_fedotov@wargaming.net>
2020-09-15 11:08:14 +02:00
Dario Tranchitella
9d0a7a78c1 Making CR/CRB names conforming to Kubernetes naming requirements (#91) 2020-09-12 12:14:52 +02:00
Maxim Fedotov
303fc4d69c Support Groups as Subject Kind for Tenant Namespace RoleBindings created by Capsule (#71)
Modified CRD to support Owner struct.

Added Tenant name validation webhook.

Rewrote owner_reference hook logic.

Updated and added new e2e tests.

Co-authored-by: Maksim Fedotov <m_fedotov@wargaming.net>
2020-09-10 17:02:22 +02:00
Maxim Fedotov
e8362f739f Add Service labelling and annotating webhook (#84)
Co-authored-by: Maksim Fedotov <m_fedotov@wargaming.net>
2020-09-10 11:56:51 +02:00
Dario Tranchitella
12b1338dad Making Namespace no more hard-coded (#83) 2020-09-09 13:33:03 +02:00
Dario Tranchitella
ee0261c069 Providing namespace metadata additional labels and annotations (#80) 2020-09-07 15:09:34 +02:00
Maxim Fedotov
164431959c Add capsule-user-group CLI flag (#67)
* add capsule-user-group param

* Implementing RBAC controller

Co-authored-by: Maksim Fedotov <m_fedotov@wargaming.net>
Co-authored-by: Dario Tranchitella <dario@tranchitella.eu>
2020-09-01 12:15:48 +02:00
Dario Tranchitella
9969864141 Scaffolding e2e testing (#56)
* Implementing generic e2e features

* Adding changes upon e2e benchmarking
2020-08-21 14:55:48 +02:00
Dario Tranchitella
ee469ce2e7 Ignoring NotIn requirement during resource pruning (#54) 2020-08-12 17:16:48 +02:00
Dario Tranchitella
1767bcee12 Implementing Capsule certificate validation (#44) 2020-08-07 16:19:23 +02:00
Dario Tranchitella
a29db95ad3 Updating tenant after adding/removing Namespace (#43) 2020-08-06 21:50:50 +02:00
Dario Tranchitella
a3c667b2b9 Moving the Namespace count reconciliation to the Tenant reconciler (#39) 2020-08-06 13:36:21 +02:00
Dario Tranchitella
72380e2aba Syncing Namespace annotations for Storage and Ingress classes (#30) 2020-08-05 11:54:46 +02:00
Dario Tranchitella
ee0a238b7f Adding exists requirement to avoid pruning tenant owner resources (#29)
* Adding exists requirement to avoid pruning tenant owner resources

* Restoring useful Makefile commands (fixing 5d20d51)
2020-08-04 16:45:44 +02:00
Dario Tranchitella
5d20d515a7 Migrating from OperatorSDK 0.18 to 0.19 (#23) 2020-08-04 16:30:28 +02:00