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

Allow a spawn request which does not pull the image #267

Closed
paulgb opened this issue Nov 21, 2022 · 5 comments
Closed

Allow a spawn request which does not pull the image #267

paulgb opened this issue Nov 21, 2022 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@paulgb
Copy link
Member

paulgb commented Nov 21, 2022

This is something I've wanted to do to reduce cold start times when we know we have the image locally, and has also been requested by @MyCADDev via Discord.

@pretentious7
Copy link
Contributor

I can do this tom! Should just be matter of putting the pull behind a conditional right? And adding a field to the request.

@paulgb
Copy link
Member Author

paulgb commented Nov 22, 2022

I think we should support three pull policies like Kubernetes does:

  • IfNotPresent should be the default. It pulls only if we don't already have the image. We would switch to this for our own use case.
  • Always is the current behavior. Always run a Docker pull, even if the image does not exist.
  • Never never pull the image. If it doesn't exist, the backend status should be ErrorLoading. This would be the pull policy that @MyCADDev would use.

This would become a field on the DockerExecutableConfig rather than the SpawnRequest itself.

@pretentious7
Copy link
Contributor

Oops have to add this to the cli before closing.

@MyCADDev
Copy link

Just tried it via NATS API - works like a charm. Thanks @paulgb and @pretentious7

@paulgb paulgb closed this as completed Nov 25, 2022
@paulgb paulgb reopened this Nov 25, 2022
@paulgb
Copy link
Member Author

paulgb commented Dec 5, 2022

@pretentious7 I think it's not necessary for this to be in the cli, but we can discuss if you want to. I'll close this for now because the feature is done.

@paulgb paulgb closed this as completed Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants