artemis opened 11 months ago
|
||||||||||
I just took a look into the code, where I saw that, at least in theory, this is already implemented.
Should I change the Issue Type to Bug? |
||||||||||
@artemis thanks for using OneDev. I did test with containerd before on k8s and it works. Maybe broken for some reason. Will look into this. |
||||||||||
Robin Shen changed fields 11 months ago
|
||||||||||
Robin Shen changed fields 11 months ago
|
||||||||||
Just launched a GKE cluster with containerd runtime, and OneDev can uses its container runtime to build image. Note that you need to enable the option |
||||||||||
Hi @robin thanks for the prompt reply and for looking into it. I really appreciate it.
Where does the kubernetes executor get its information about the underlying CRI? When I deploy a pod to the same cluster that is explicitly mounting the
socket-test.yaml
|
||||||||||
The executor does not know which CRI is being used, and it mounts PS: The reason mounted docker sock works in GKE with containerd runtime in my previous test is that the node still has docker runtime installed, although it is using containerd runtime |
||||||||||
That does explain a lot 😃. I guess I can work with that. |
||||||||||
If I add a registry login to the Kubernetes executor, I don't get the
When I try to add Is the Build Docker Image not usable at all without the docker socket/runtime on the node? Is there a convenient alternative?
I saw in the code that the k8s-helper container indeed has |
||||||||||
I did some more research and opened a shell to the Pod (see quote):
stdout
So, it seems that docker-cli and containerd are working together correct by "default". |
||||||||||
How did you specify tag of the image being built in OneDev? |
||||||||||
@robin like this |
||||||||||
Then url of registry login in k8s executor should be specified as |
||||||||||
Please make sure below works on a linux host with docker installed:
|
||||||||||
That does work without issues. I guess it also has something to do with the docker.sock being unavailable. I tried some more things and ended up changing the Kubernetes Executor code, removing the |
||||||||||
Trying to reproduce your procedure on GKE. Dockerd starts successfully and listen on
Seems that this is fragile and highly depends on the node enviroment. I'd suggest to use |
||||||||||
@robin ya I guess that it strongly depends on the respective environment. Kaniko would be a sufficient solution I guess. Anything I can do to help? |
||||||||||
It should be a rather easy step to run Kaniko container. Will get it into next patch release. |
||||||||||
I filed an improvment request for this as #1406 |
||||||||||
Sounds great. Really appreciate your efforts. Thx |
||||||||||
Robin Shen changed state to 'Closed' 11 months ago
|
||||||||||
Kaniko image build step has been added in 8.3.4. Closing this now. |
||||||||||
artemis referenced from other issue 11 months ago
|
Type |
Question
|
Priority |
Major
|
Assignee |
First of all: Thx for that awesome project. I've been looking a long time for a VCS like OneDev.
It would be really helpful if it were possible to add compatibility for other Kubernetes CRIs besides Docker, like containerd or cri-o. ATM I am limited to normal build because it is not possible for the Kubernetes Executor to mount
unix:///var/run/docker.sock
(in my case it would need something likeunix:///run/containerd/containerd.sock
o.s.). Would it be possible to make that configurable, or is this something that requires more significant changes?