Merge api-devfile and api-workspace together and put the infrastructure-dependent code behind injectable interfaces.
Signed-off-by: Lukas Krejci <lkrejci@redhat.com>
Instead of downloading metas from plugin registry and passing them to
plugin broker, provide plugin broker with serialized plugin fully
qualified names and allow broker to download necessary metas.
Signed-off-by: Angel Misevski <amisevsk@redhat.com>
* Allow workspace pods to list Kubernetes services by default
* Update workspace-view-role.yaml to allow listing
of Kubernetes services
* Allow sidecar containers to list services on OpenShift
* Add services resource to workspace-view role for OpenShift
Signed-off-by: John Collier <John.J.Collier@ibm.com>
Trace the prepare storage, deploy, and wait broker result phases of
plugin brokering.
Additionally clean up start tracing code slightly:
- Move span names to a separate file
- Move TracingUtil functionality into TracingTags
Signed-off-by: Angel Misevski <amisevsk@redhat.com>
- Group machine start traces under a separate span
- Move wait running and check servers spans out of start machines span
since the start machine span ends before check servers is complete
- Track wait running async and check servers spans separately
- Add tracing to bootstrap servers
Signed-off-by: Angel Misevski <amisevsk@redhat.com>
Add 'extensions' field to meta model.
Use Jackson instead of GSON since we use Jackson annotations.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
* Create view role rather than rely on view clusterRole
* Create view role for k8s. Fix typo
* Typo and Java doc sync
* Add namespaced role to k8s and openshift templates. Role instead ClusterRole for k8s
* Rename view role to workspace-view
* Fix formatting
* Fix javadoc. Revent erroneous changes to postgres template
* Remove hidden Dockerfile
* Revert pg changes
defined with the dockerimage recipe.
Note that this only works in kubernetes and openshift environments.
Signed-off-by: Lukas Krejci <lkrejci@redhat.com>
* Introduced two web-socket endpoints for workspace master to split JSON-RPC messages
Based on Dmytro's Kulieshov work https://github.com/eclipse/che/pull/12252
Signed-off-by: Sergii Kabashniuk <skabashniuk@redhat.com>
K8s does the expansion only if it already knows about the variable being
expanded.
This means we have to sort the environment variable list prior to sending
it to k8s in such a way that vars that reference others always follow the
referenced ones.
Signed-off-by: Lukas Krejci <lkrejci@redhat.com>
Add log message when starting InconsistentRuntimesDetector and
log number of workspaces to be checked for monitoring purposes.
Signed-off-by: Angel Misevski <amisevsk@redhat.com>
* Provision plugin attribute for machines that contains related plugin id
* Remove unused constants from Workspace API
Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
- Allow KubernetesDeployments#watchEvents to handle events from
Deployments and ReplicaSets as well as Pods.
- Necessary to handle quota events (e.g. exceeding quota)
- Fix regression where sometimes unrecoverable events weren't handled
at all due to pod naming issues
- Add 'FailedCreate' to unrecoverable events list (this event occurs
when quota is exceeded.
Signed-off-by: Angel Misevski <amisevsk@redhat.com>
This is needed to help clients in figuring out which port led
to creating a server in a workspace.
Also, refactor some code.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>