Skip to content

Commit 91ef8d9

Browse files
sharkymarkericpaulsenkylecarbs
authored
chore: remove code-server release limitation and add image push policy in kubernetes example template (#5831)
* chore: remove code-server release limitation and add image push policy * restore code-server changes * chore: remove spaces in pod space * Format terraform --------- Co-authored-by: Eric Paulsen <ericpaulsen@coder.com> Co-authored-by: Kyle Carberry <kyle@carberry.com>
1 parent 896158c commit 91ef8d9

File tree

1 file changed

+7
-14
lines changed
  • examples/templates/kubernetes

1 file changed

+7
-14
lines changed

examples/templates/kubernetes/main.tf

+7-14
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ variable "use_kubeconfig" {
2828
variable "namespace" {
2929
type = string
3030
sensitive = true
31-
description = "The namespace to create workspaces in (must exist prior to creating workspaces)"
31+
description = "The Kubernetes namespace to create workspaces in (must exist prior to creating workspaces)"
3232
}
3333

3434
variable "home_disk_size" {
@@ -57,17 +57,9 @@ resource "coder_agent" "main" {
5757
startup_script = <<-EOT
5858
set -e
5959
60-
# home folder can be empty, so copying default bash settings
61-
if [ ! -f ~/.profile ]; then
62-
cp /etc/skel/.profile $HOME
63-
fi
64-
if [ ! -f ~/.bashrc ]; then
65-
cp /etc/skel/.bashrc $HOME
66-
fi
67-
6860
# install and start code-server
69-
curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.8.3
70-
code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
61+
curl -fsSL https://code-server.dev/install.sh | sh -s
62+
code-server --auth none --port 13337 &
7163
EOT
7264
}
7365

@@ -144,9 +136,10 @@ resource "kubernetes_pod" "main" {
144136
fs_group = "1000"
145137
}
146138
container {
147-
name = "dev"
148-
image = "codercom/enterprise-base:ubuntu"
149-
command = ["sh", "-c", coder_agent.main.init_script]
139+
name = "dev"
140+
image = "codercom/enterprise-base:ubuntu"
141+
image_pull_policy = "Always"
142+
command = ["sh", "-c", coder_agent.main.init_script]
150143
security_context {
151144
run_as_user = "1000"
152145
}

0 commit comments

Comments
 (0)