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

Init container if no input artifacts needed? #12728

Closed
mweibel opened this issue Mar 1, 2024 · 2 comments
Closed

Init container if no input artifacts needed? #12728

mweibel opened this issue Mar 1, 2024 · 2 comments
Labels
area/executor type/support User support issue - likely not a bug

Comments

@mweibel
Copy link
Contributor

mweibel commented Mar 1, 2024

Summary

We were wondering if the init container is needed if the workflow doesn't use input artifacts. Looking at the relevant code:
https://github.com/argoproj/argo-workflows/blob/61156f2eb2bafb795c8550233c11cb8a82c101e7/workflow/controller/workflowpod.go#L262..L265

It seems that the comment suggests it's not needed if no input artifacts are there. However there's no if guard around it.

Looking at the change in this commit:
62e0a8c#diff-0cd2c830c5575d814bc0dccc445c0483f0ea0411b72862784714ed44c6806280L236

It seems that there initially was a guard but that got removed. Either the comment is outdated or the guard went missing while refactoring.

Can anyone shed some light on this?

Use Cases

When no input artifact is used, this would speed up deploying the actual container.

@mweibel mweibel added the type/feature Feature request label Mar 1, 2024
@Joibel
Copy link
Member

Joibel commented Mar 1, 2024

That guard also created an init container if woc.getContainerRuntimeExecutor() == common.ContainerRuntimeExecutorEmissary which is the only executor these days.

#4925 added this, and documents why at

The init container creates these files:

The init container creates these files:
* `/var/run/argo/argoexec` The binary, copied from the `argoexec` image.
* `/var/run/argo/template` A JSON encoding of the template.

@agilgur5 agilgur5 added area/executor type/support User support issue - likely not a bug and removed type/feature Feature request labels Mar 1, 2024
@agilgur5
Copy link

agilgur5 commented Apr 3, 2024

Closing as the question has been answered and there has been no follow-up in a month (stale)

@agilgur5 agilgur5 closed this as completed Apr 3, 2024
@agilgur5 agilgur5 changed the title Init container if no input artifacts needed Init container if no input artifacts needed? Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/executor type/support User support issue - likely not a bug
Projects
None yet
Development

No branches or pull requests

3 participants