Skip to content
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(helm): move dind to sidecar #3842

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

velkovb
Copy link

@velkovb velkovb commented Dec 11, 2024

Run dind container as a Sidecar

Currently, in dind mode we run 2 containers in the pod. This results in them having their own lifecycles. In the case of dind this could lead to issues as the process in the runner container depend on the docker socket from the dind container. We hit that multiple times were we wanted to wait for jobs to complete and the runner container stays alive as we handle the SIGTERM manually but dind dies and the jo fails. When running as a Sidecar container dind stays alive as long as the pod is alive and we don't need to do custom SIGTERM handling there.

Since 1.29 Sidecars are enabled by default so this PR moves the dind container as a Sidecar if the version is above 1.29.

@velkovb velkovb marked this pull request as ready for review December 12, 2024 10:03
@velkovb velkovb requested review from mumoshu, toast-gear, rentziass and a team as code owners December 12, 2024 10:03
@chadxz
Copy link

chadxz commented Jan 5, 2025

I think this may fix an issue i'm seeing sometimes with our runners. In some jobs, we were seeing this error message in the "Initialize Containers" workflow step:

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

@velkovb
Copy link
Author

velkovb commented Jan 6, 2025

I think this may fix an issue i'm seeing sometimes with our runners. In some jobs, we were seeing this error message in the "Initialize Containers" workflow step:

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

@chadxz This exactly the issue we were seeing and it helped us fix it.

@chadxz
Copy link

chadxz commented Jan 7, 2025

I tried using this but realized it conflicts with my manual dind setup in values.yaml. However I was able to move my dind container from “containers” to “initContainers” and set ‘retryPolicy: Always’ to replicate this behavior.

worked!

@velkovb
Copy link
Author

velkovb commented Jan 7, 2025

I tried using this but realized it conflicts with my manual dind setup in values.yaml. However I was able to move my dind container from “containers” to “initContainers” and set ‘retryPolicy: Always’ to replicate this behavior.

worked!

Probably the case for most people. It is in the custom dind for us as well but I believe it should be the default option actually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants