From d77eb703c6558578e62fcf72f30f5f64cc09962a Mon Sep 17 00:00:00 2001 From: Chris LaRose Date: Tue, 13 Aug 2024 05:55:39 +0000 Subject: [PATCH 1/3] chore: update inner image in envbox example template The referenced image seems to be a deprecated version of the enterprise-base image --- examples/templates/envbox/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/templates/envbox/main.tf b/examples/templates/envbox/main.tf index b11a728182004..a25c7a122dd48 100644 --- a/examples/templates/envbox/main.tf +++ b/examples/templates/envbox/main.tf @@ -191,7 +191,7 @@ resource "kubernetes_pod" "main" { env { name = "CODER_INNER_IMAGE" - value = "index.docker.io/codercom/enterprise-base@sha256:069e84783d134841cbb5007a16d9025b6aed67bc5b95eecc118eb96dccd6de68" + value = "index.docker.io/codercom/enterprise-base:ubuntu-20240812" } env { From 3a6f5a87ccfafe542adc06df755e5d1ae8ad8000 Mon Sep 17 00:00:00 2001 From: Chris LaRose Date: Tue, 13 Aug 2024 06:03:20 +0000 Subject: [PATCH 2/3] chore: update install of code-server in envbox template Update the installation to match the other templates, in particular: * Install using standalone method * Install to /tmp * Close parent stderr stream (write code-server stderr to log file) --- examples/templates/envbox/main.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/templates/envbox/main.tf b/examples/templates/envbox/main.tf index a25c7a122dd48..7cc56c2a0f3a5 100644 --- a/examples/templates/envbox/main.tf +++ b/examples/templates/envbox/main.tf @@ -104,11 +104,11 @@ resource "coder_agent" "main" { fi # Install the latest code-server. - # Append "-s -- --version x.x.x" to `sh` to install a specific version of code-server. - curl -fsSL https://code-server.dev/install.sh | sh | tee code-server-install.log + # Append "--version x.x.x" to install a specific version of code-server. + curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server # Start code-server in the background. - code-server --auth none --port 13337 | tee code-server-install.log & + /tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 & EOT } From d90fb019f6304fa703b7873f74ba4182bfeb8094 Mon Sep 17 00:00:00 2001 From: Chris LaRose Date: Tue, 13 Aug 2024 06:41:55 +0000 Subject: [PATCH 3/3] chore: remove sensitive designation on non-sensitive variables --- examples/templates/envbox/main.tf | 8 -------- 1 file changed, 8 deletions(-) diff --git a/examples/templates/envbox/main.tf b/examples/templates/envbox/main.tf index 7cc56c2a0f3a5..73e6d4fd45ab6 100644 --- a/examples/templates/envbox/main.tf +++ b/examples/templates/envbox/main.tf @@ -24,7 +24,6 @@ data "coder_parameter" "home_disk" { variable "use_kubeconfig" { type = bool - sensitive = true default = true description = <<-EOF Use host kubeconfig? (true/false) @@ -40,13 +39,11 @@ provider "coder" { variable "namespace" { type = string - sensitive = true description = "The namespace to create workspaces in (must exist prior to creating workspaces)" } variable "create_tun" { type = bool - sensitive = true description = "Add a TUN device to the workspace." default = false } @@ -54,32 +51,27 @@ variable "create_tun" { variable "create_fuse" { type = bool description = "Add a FUSE device to the workspace." - sensitive = true default = false } variable "max_cpus" { type = string - sensitive = true description = "Max number of CPUs the workspace may use (e.g. 2)." } variable "min_cpus" { type = string - sensitive = true description = "Minimum number of CPUs the workspace may use (e.g. .1)." } variable "max_memory" { type = string description = "Maximum amount of memory to allocate the workspace (in GB)." - sensitive = true } variable "min_memory" { type = string description = "Minimum amount of memory to allocate the workspace (in GB)." - sensitive = true } provider "kubernetes" {