chore: Update templates from Always to IfNotPresent for image_pull_policy (#501)
## Description Change `image_pull_policy` from `Always` to `IfNotPresent` on 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 - [ ] New module - [ ] New template - [ ] Bug fix - [x] Feature/enhancement - [ ] Documentation - [ ] Other ## 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 - [ ] Tests pass (`bun test`) - [ ] Code formatted (`bun fmt`) - [x] Changes tested locally ## Related Issues None
This commit is contained in:
parent
0c5a8a2354
commit
63e42283ce
@ -264,7 +264,7 @@ resource "kubernetes_deployment" "main" {
|
||||
container {
|
||||
name = "dev"
|
||||
image = var.cache_repo == "" ? local.devcontainer_builder_image : envbuilder_cached_image.cached.0.image
|
||||
image_pull_policy = "Always"
|
||||
image_pull_policy = "IfNotPresent"
|
||||
security_context {
|
||||
privileged = true
|
||||
}
|
||||
|
||||
@ -152,7 +152,7 @@ resource "kubernetes_pod" "main" {
|
||||
name = "dev"
|
||||
# We highly recommend pinning this to a specific release of envbox, as the latest tag may change.
|
||||
image = "ghcr.io/coder/envbox:latest"
|
||||
image_pull_policy = "Always"
|
||||
image_pull_policy = "IfNotPresent"
|
||||
command = ["/envbox", "docker"]
|
||||
|
||||
security_context {
|
||||
|
||||
@ -287,7 +287,7 @@ resource "kubernetes_deployment" "main" {
|
||||
container {
|
||||
name = "dev"
|
||||
image = "codercom/enterprise-base:ubuntu"
|
||||
image_pull_policy = "Always"
|
||||
image_pull_policy = "IfNotPresent"
|
||||
command = ["sh", "-c", coder_agent.main.init_script]
|
||||
security_context {
|
||||
run_as_user = "1000"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user