-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support to run kubedock at workspace startup #107
Conversation
Part of eclipse-che/che#21735 Signed-off-by: Andrew Obuchowicz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ibuziuk, l0rd, svor The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
New changes are detected. LGTM label has been removed. |
Signed-off-by: Mario Loriedo <[email protected]>
This PR partially addresses eclipse-che/che#20227.
Using kubedock to
run
containers and local podman tobuild
containersThe approach of this PR is to add
kubedock
in the universal developer image (Eclipse Che default image) and start it automatically if the env variableKUBEDOCK_ENABLED
is set totrue
(can be set using a devfile).When
KUBEDOCK_ENABLED=true
then the following commands will be executed with kubedock (the remaining commands, in particularpodman build
, will be executed by the local podman):The limits of this approach
The
kubedock
approach allows to run containers from a container running on Kubernetes but has a few limits:podman build -t <image> . && podman run <image>
doesn't work and should be replaced withpodman build -t <image> . && podman push <image> && podman run <image>
. That's because kubedock runs the container as a Kubernetes pod and, as a result, the kubelet on the node will try to pull<image>
and will fail if it cannot find it.CONTAINER_HOST=tcp://127.0.0.1:2475
orDOCKER_HOST=tcp://127.0.0.1:2475
when they run containers and configured to point to localpodman
when building the container (something impracticable in some cases).podman
comands such asgenerate kube
are not supported yet--env
is provided then the commandpodman run
failsHow to test
I have pushed this image to
quay.io/mloriedo/universal-developer-image:kubedock-wrapper
.The PR can be tested on sandbox using the repo
https://github.com/l0rd/dockerfile-hello-world
: