-
Notifications
You must be signed in to change notification settings - Fork 77
chore: Update templates from Always to IfNotPresent for image_pull_policy #501
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
Conversation
Change image pull policy to 'IfNotPresent' for efficiency.
matifali
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if someone has build pipeline, where they regularly build an publish new images to a registry, will it not pull the stale image?
So may be we shoudl add a comment that
In CI/CD with frequent image updates, tag images uniquely and keep
IfNotPresent.
If you rely on mutable tags likelatest, setimage_pull_policy: Always.
My thought was if someone has a build pipeline they should have a good understanding of their container runtime image pull policy and can set it appropriately for their use case. These are just example getting started templates for which the average Joe will use to begin using Coder, for which I don't feel like it makes sense to have the image pull policy default to |
I do generally agree with what you are saying here because IfNotPresent is the default |
|
@rowansmithau is the goal here is to provide faster startups in general? |
|
@matifali it's more around trying to be a good steward of not having excessive / unnecessary API calls be the default behaviour for folks who use our templates / use our templates as a baseline. It would have the added benefit of either matching existing startup times (at worst) or reducing workspace startup time by a few ms/s because it wouldn't be making the call to Docker Hub / ghcr to check the sha (as it does with |
|
One important note is that the templates we bundle in and the one in the registry aren't synchronized yet. There is a request to do that though. cc: @david-fraley |
Description
Change
image_pull_policyfromAlwaystoIfNotPresenton Coder owned templates. Given these are a reference point for users and customers and they copy them into their own templates I think it makes sense to encourage the use of caching of images.Type of Change
Template Information
Path:
https://github.com/coder/registry/tree/main/registry/coder/templates/kubernetes-devcontainer
https://github.com/coder/registry/tree/main/registry/coder/templates/kubernetes-envbox
https://github.com/coder/registry/tree/main/registry/coder/templates/kubernetes
Testing & Validation
bun test)bun fmt)Related Issues
None