Closed as not planned
Description
we have customers who do not overwrite image tags, but instead push new tags to an existing image. when updating an image/tag value via coder parameters, the workspace does not inherit the change.
steps to reproduce
1. initial template with image tag & k8s pod
data "coder_parameter" "image" {
name = "image"
type = "string"
mutable = "true"
option {
value = "ericpaulsen/code-server:v1"
name = "code-server"
}
}
resource "kubernetes_pod" "main" {
spec {
container {
image = "docker.io/${data.coder_parameter.image.value}"
image_pull_policy = "Always"
}
}
}
2. push new version of the template with new tag
data "coder_parameter" "image" {
name = "image"
type = "string"
mutable = "true"
option {
value = "ericpaulsen/code-server:v2"
name = "code-server"
}
}
3. rebuild workspace to apply new template version
upon rebuild, the kubernetes pod is shown to have pulled the old image tag v1
:
Normal Pulled 52s kubelet Successfully pulled image "docker.io/ericpaulsen/code-server:v1"
4. manually edit the workspace parameters in the UI
navigate to Settings > Parameters and notice that the image parameters is unset, while all other parmameters (mutable & non-mutable) are set correctly.
5. set the image value and rebuild workspace
when selecting ericpaulsen/code-server
and clicking Submit
, the workspace rebuilds, and correctly inherits the updated value with the new image and tag.