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>
Refactor DockerMachineStarter to clean it up and reduce
its responsibilities. Move container configuration applying
to InfrastructureProvisioners.
Move classes to different packages to create some structure and
reduce classes mess in a single package.
Uncomment some commented tests.
Signed-off-by: Oleksandr Garagatyi <ogaragat@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>
Implement and bind as default impl URLRewriter which makes Docker
infra work on MacOS or Windows. Property 'che.docker.ip.external'
should be used to set the correct external hostname for
containers.
Refactored URLRewriter interface to use strings as URLs instead of
URL class since it can't handle non-basic protocols, e.g. ws.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>