Commit Graph

410 Commits (915e9ffbf9344b20f87e2d19d6de02027dcc9013)

Author SHA1 Message Date
Oleksandr Garagatyi 8eaad8543b Ensure correct memory request/limit are set
Ensure that all containers have memory request is set and not
bigger than memory limit.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-10-10 17:57:18 +03:00
Oleksandr Garagatyi aeb99f99f8 Set Memory request for JWT sidecar
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-10-10 17:57:18 +03:00
Sergii Kabashniuk 65bd65e23b Upgrade to new dependency mockito-testng (#10647) 2018-10-10 13:58:33 +03:00
Max Shaposhnik 127c433d8a
Define image pulling strategy for sidecars via configuration 2018-10-09 14:20:06 +03:00
Max Shaposhnik 251e5e261b
Sidecar container naming using plugin_name + che_container_name 2018-10-05 15:12:19 +03:00
Sergii Leshchenko 1e78fa4d6e Make Che Server listen to broker log and republish it as runtime log 2018-10-04 21:12:36 +03:00
Sergii Leshchenko a222971865 Replace MachineLogEvent with more abstract RuntimeLogEvent 2018-10-04 21:12:36 +03:00
Sergii Leshchenko 6abb78a189 Add RuntimeId to plugin broker events instead of workspace id field 2018-10-04 21:12:36 +03:00
Roman Iuvshyn 63b389c2fe
RELEASE: Set next development version (#11434)
* RELEASE: Set next development version
2018-10-04 18:25:39 +03:00
Oleksandr Garagatyi 46c74a92e7 Set k8s memory request wherever we set limit
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-10-03 09:14:20 +03:00
Oleksandr Garagatyi eb6b28d0e6
Merge pull request #11410 from garagatyi/secureWSNEXT
Make Theia sidecar/stack secure, add an ability to use new JWT auth on a per-workspace basis
2018-10-03 09:08:15 +03:00
Oleksandr Garagatyi b698aec6e6 Change error code cause it is occupied
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-10-03 09:07:31 +03:00
Oleksandr Garagatyi 1ddaeba154 Set JWT server exposer attribute to environment if auth is enabled
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-10-03 09:07:31 +03:00
Oleksandr Garagatyi 80923a2c48 Fix missing constants
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-10-03 09:07:31 +03:00
Oleksandr Garagatyi b157c63729 Add an ability to enable JWT security exposer from WS config attribute
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-10-03 09:07:31 +03:00
Sergii Leshchenko af568904e1 Fix role binding for workspace service account 2018-10-02 17:15:50 +03:00
Oleksandr Garagatyi bb43e5a5e8 Rework SecureServerExposerFactoryProvider to be used at runtime, not binding time
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-09-29 00:27:49 +03:00
Ilya Buziuk 174e1aea9b
Adding support of the ephemeral workspaces (using `emptyDir` volume instead of PVC) via 'persistVolumes' attribute (#11343)
che #11350 Adding support of the ephemeral workspaces (using emptyDir volume instead of PVC) via 'persistVolumes' attribute

Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
2018-09-27 17:57:17 +02:00
Sergii Leshchenko adcbe9e84f Listen to unrecoverable events during Plugin Broker starting 2018-09-27 17:49:35 +03:00
Sergii Leshchenko 21798bf95c Extract unrecoverable events listener from KubernetesInternalRuntime 2018-09-27 17:49:35 +03:00
Sergii Leshchenko d9c210bd2a Make BrokerEvent suitable to be used for STARTED status event 2018-09-27 17:49:35 +03:00
Sergii Leshchenko b5b187e182
Merge pull request #11367 from sleshchenko/smallFixes
Add different small improvements
2018-09-27 17:49:15 +03:00
Max Shaposhnik ce31146629
Add possibility to configure timeout for plugin broker 2018-09-27 09:52:24 +03:00
Sergii Leshchenko d41f295d0a fixup! Set image pull policy to Always for docker image environments 2018-09-26 18:16:22 +03:00
Sergii Leshchenko 1675edb320 Set image pull policy to Always for docker image environments 2018-09-26 15:54:55 +03:00
Sergii Leshchenko a69077bb46 Make JwtProxyProvisioner reuse getConfigMap method 2018-09-26 15:54:55 +03:00
Sergii Leshchenko 97f3e63ec2 Add logging of original exception message when an error occurs on date parsing 2018-09-26 15:54:55 +03:00
Oleksandr Garagatyi 96a5ec7222 CHE-11097: Allow setting sidecar memory limit in ws attributes
Adding workspace config attribute
"sidecar.<name of a sidecar from plugin definition>.memory_limit"
overrides sidecar memory limit with the value of attribute
converted to bytes number.
Example:
Attribute "sidecar-theia-ide-memory_limit": "300Mi" sets Theia ide
sidecar container memory limit to 314572800 bytes.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-09-24 15:10:15 +03:00
Oleksandr Garagatyi 42e0993e49 Add an ability to configure Pull policy for broker
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-09-24 13:08:38 +03:00
Oleksandr Garagatyi 0f48d807a0
Merge pull request #11248 from garagatyi/memoryfield
Refactor WS.NEXT sidecars k8s applier to simplify the code.
Add an ability to configure memory limit for a WS.NEXT sidecar in
a sidecar configuration. If it is not configured in a sidecar it
will be set using the global default memory limit for sidecars.
2018-09-24 10:34:26 +03:00
Oleksandr Garagatyi ac18e3c16d
Add support of dockerimage and kubernetes recipes in some cases (#11213)
Add support of 'dockerimage' recipe to WS.NEXT flow on openshift
and kubernetes infras.
Add support of 'kubernetes' recipe on openshift infra.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-09-24 10:29:29 +03:00
Sergii Leshchenko 41b14c71b6
Make OpenShift infrastructure to create workspace service account if needed (#11199) 2018-09-21 08:50:25 +03:00
Angel Misevski 631729d447 Fix k8s/OS deployment cleanup when pod failed to start
The move to Deployments introduced a regression where the delete
workspace methods assume that a pod had been started as some point. If,
e.g. the workspace config refers to an invalid service account, a
deployment will be created, but no pod will ever start, causing the
delete method to fail to clean up the deployment. This means that
workspace cannot be started, even if the error in config is fixed.

Fixes this issue, by splitting the delete flow in KubernetesDeployments.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
2018-09-20 16:07:50 +03:00
Oleksandr Garagatyi 97357120ec Merge branch 'master' into memoryfield 2018-09-19 17:06:48 +03:00
Oleksandr Garagatyi 7f235aa3f9 CHE-11097: Add unit tests, refactor code
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-09-19 17:05:19 +03:00
Max Shaposhnik f838ea5a60
Add extra workspace existence check before creating keypair 2018-09-19 16:59:22 +03:00
Oleksandr Andriienko e981bf4e3c
Fix NPE for plugin volumes. (#11268)
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
2018-09-19 11:58:27 +03:00
Oleksandr Garagatyi e0d0428087 CHE-11097: Allow to specify memory limit in sidecar definition
Add an ability to configure memory limit for a WS.NEXT sidecar in
a sidecar configuration. If it is not configured in a sidecar it
will be set using global default memory limit for sidecars.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-09-18 12:14:56 +03:00
Oleksandr Garagatyi 805f9c24e8 CHE-11097: Refactor WS.NEXT applying code
Simplify KubernetesPluginsToolingApplier by moving sidecar service
discovery related code to a separate component -
SidecarServicesProvisioner.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-09-18 12:13:38 +03:00
Oleksandr Garagatyi 03997ef8de CHE-11097: Refactor WS.NEXT config apllying code
Simplify KubernetesPluginsToolingApplier by moving sidecar machine
configuration creation code to a separate component -
MachineResolver.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-09-18 12:13:38 +03:00
Oleksandr Garagatyi 6c21d4d12b CHE-11097: Refactor WS.NEXT sidecars k8s applier
Simplify KubernetesPluginsToolingApplier by moving sidecar
container configuration creation code to a separate component -
K8sContainerResolver.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-09-18 12:13:38 +03:00
Oleksandr Garagatyi 6585f92786 CHE-11097: Add docs to KubernetesPluginsToolingApplier
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-09-18 12:13:38 +03:00
Oleksandr Garagatyi 036f044155 Add a property for default sidecar mem limit
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-09-17 14:01:34 +03:00
Sergii Leshchenko f22fbe15c5 CHE-10991 Add provisioning of service account into workspaces pods 2018-09-13 11:03:09 +03:00
Roman Iuvshyn ea410c3340
RELEASE: Set next development version (#11169) 2018-09-12 11:53:42 +03:00
Oleksandr Garagatyi 24ccece9df
Rework plugin brokering to reuse PVC strategies code (#11119)
CHE-10879 Rework plugin broker code to reuse PVC strategies code.
Moreover, it applies other OS/K8s provisioners with proxy,
name uniqueness, private docker image registry, pod termination
support.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-09-11 15:48:47 +03:00
Oleksandr Garagatyi 028d1a7c1b Fix NPE and NumberFormatException in some cases
Fix NPE on start of a workspace created from the Theia stack.
Fix NumberFormatException when machine doesn't have memory
property.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-09-10 11:34:45 +03:00
Oleksandr Garagatyi ddf0f32a5c Set JWT proxy pulling strategy to Always
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-09-07 17:25:38 +03:00
Sergii Leshchenko 6a6c7f7e79
CHE-11080 Add authorization checks for BrokerService's JSON RPC methods (#11092) 2018-09-07 07:06:16 +03:00
Sergii Leshchenko 650ff5cf1c
CHE-11071 Add injecting of auth related env vars into Plugin Broker Pod (#11098) 2018-09-07 07:03:00 +03:00