It is needed for OpenShift infra where getting events
is not supported due to security limits.
To disable containers stop detector variable
CHE_DOCKER_ENABLE__CONTAINER__STOP__DETECTOR=false should be
defined.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
Set environment context for a thread where logs of a machine are read.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
Minor adjustment to how image name is set when creating a
workspace on OpenShift.
On OpenShift 3.6, it seems that using an ImageStreamTag
in a Deployment spec causes the deployment to have null status,
which causes kubernetes-client to throw an NPE.
We still need to decide if this is to be a longer term solution,
and if removing ImageStreamTags completely is a good option
Signed-off-by: Angel Misevski <amisevsk@redhat.com>
OpenShiftConnector.inspectImage() uses pods to figure out a workspaces
docker image. Previously, this was not a problem as it would match
the imagestream tag we create earlier. However, in OpenShift 3.6 and
higher, it seems like pods created by deployments use the sha256 of
the image as an identifier, and so this fails. This means that
workspaces fail to start due to imagestream not found.
To resolve this issue, we instead get the image name through the
deployment, which does have the correct value.
Signed-off-by: Angel Misevski <amisevsk@redhat.com>
* Create routes in openshift with the same pattern than the urls provided by the naming strategy.
Also it will be able to handle service name described through labels on Docker image.
It means that for one image 8080 port can be tomcat, but for another image it can be named "vertx" or default value if not specified
Change-Id: Ie8e0a09d0be8f6d042f542a76c146e2bbe266fc7
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
Each pod has a dedicated folder matching the workspace id
for the project's source, it is currently using :
/projects ---> <PV>/<workspace-name>
and for the logs it's now using as well
/workspace-logs ---> <PR>/<workspace-name>-logs/
example : /workspace-logs/dev-machine-ws-agent/logs/catalina.log for the log of the dev-machine workspace agent.
Change-Id: I2b9d533ba3df2cf55857d8c30d2de5df463a5902
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>