Commit Graph

421 Commits (fc2f76bc5c8a6146cdaca34eb2bb60ca8e30aaee)

Author SHA1 Message Date
Sergii Leshchenko 057a418ca7 Add tracking of STARTING/STOPPING recovered k8s/OS runtimes (PR #11570) 2018-10-17 00:11:58 +03:00
Sergii Leshchenko 72749a00c6 Introduced RuntimeAbnormalStopping and RuntimeAbnormalStopped events (PR #11570) 2018-10-17 00:11:58 +03:00
Sergii Leshchenko 1862dd97c3 Fix propagating TimeoutException (PR #11570)
Since timeout exception has no message in this particular case
user saw `Workspace failed to start. Cause: null` when timeout exception
occured. Now TimeoutException is wrapped in InfrastructureException with
meaningful message and it is much clear what happened
2018-10-17 00:11:58 +03:00
Sergii Leshchenko 89a51b9e43 Move start timeout to StartSynchronizer (PR #11570)
It allows considering ingress wait timeout as part of start timeout
instead of considering them as non-related timeouts
2018-10-17 00:11:58 +03:00
Oleksandr Garagatyi a093e4ce54
Merge pull request #11596 from garagatyi/theiaBroker2
Adds an ability to run multiple plugin brokers on plugins provisioning phase. They all be part of a single pod.
Use bare pod instead of deployment for plugin brokering to avoid unwanted restarts of brokers.
Adds Theia plugin broker (which is not merged yet, but should be merged soon).
Allow ChePlugin and plugin brokers (by changing ChePlugins) to provide env vars that are provisioned in all the containers of the workspace. This enables brokers/plugins to share info with each other.
2018-10-15 13:15:16 +03:00
Sergii Kabashniuk 3e72212e8b
Add an ability to disable discover-ability of a plugin endpoint (#11617)
Add an ability to disable discover-ability of a plugin endpoint (#11617)
2018-10-15 13:08:09 +03:00
Oleksandr Garagatyi 851c3a8be7 fixup! fixup! fixup! fixup! Add workspaceEnv to plugin, populate it on sidecar resolving 2018-10-14 14:13:16 +03:00
Oleksandr Garagatyi 44a47a7bc1 fixup! fixup! fixup! Add workspaceEnv to plugin, populate it on sidecar resolving 2018-10-14 14:01:16 +03:00
Oleksandr Garagatyi 4919b1b361 fixup! fixup! Add workspaceEnv to plugin, populate it on sidecar resolving 2018-10-12 11:07:41 +03:00
Oleksandr Garagatyi 23eef0a7af fixup! Add workspaceEnv to plugin, populate it on sidecar resolving 2018-10-11 18:52:47 +03:00
Oleksandr Garagatyi caa36ae58c Add workspaceEnv to plugin, populate it on sidecar resolving
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2018-10-11 15:01:58 +03:00
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