plane
plane copied to clipboard
Allow a spawn request which does not pull the image
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.
I can do this tom! Should just be matter of putting the pull behind a conditional right? And adding a field to the request.
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 beErrorLoading
. This would be the pull policy that @MyCADDev would use.
This would become a field on the DockerExecutableConfig
rather than the SpawnRequest
itself.
Oops have to add this to the cli before closing.
Just tried it via NATS API - works like a charm. Thanks @paulgb and @pretentious7
@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.