Skip to content

feat: always return exit code 0 - #240

Open
Haegi wants to merge 1 commit into
senthilrch:masterfrom
Haegi:master
Open

feat: always return exit code 0#240
Haegi wants to merge 1 commit into
senthilrch:masterfrom
Haegi:master

Conversation

@Haegi

@Haegi Haegi commented Jun 25, 2025

Copy link
Copy Markdown

Motivation

Right now the kube-fledged image cache jobs fail when pulled image fails to execute /tmp/bin/echo Image pulled successfully!. This is basically true for all container images without a shell like the distroless images.
Therefore, it is either not possible to use it with such images or to get a lot of failed jobs in the cluster.

This PR changes the behaviour to always return true and therefore exit code 0, which allows the usage of all images.

@samirgrl

Copy link
Copy Markdown

Thanks @Haegi — this is a thoughtful change. Returning exit code 0 from the cri-client after a successful pull makes the job lifecycle cleaner and avoids confusing operators who see non-zero exits in their logs even when nothing is wrong.

I've opened issue #242 to take over as maintainer. This PR would be on my review list early on. Do you have a test case to go along with it, or is the behavior observable from job status alone?

@senthilrch

Copy link
Copy Markdown
Owner

@Haegi Your proposal requires a shell in the container image. images without a shell would fail.

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