File tree 2 files changed +15
-4
lines changed
examples/templates/kubernetes-pod
2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,18 @@ roleRef:
72
72
73
73
Then start the Coder host with `serviceAccountName : coder` in the pod spec.
74
74
75
+ # # Namespace
76
+
77
+ The target namespace in which the pod will be deployed is defined via the `coder_workspace`
78
+ variable. The namespace must exist prior to creating workspaces.
79
+
75
80
# # Persistence
76
81
77
82
The `/home/coder` directory in this example is persisted via the attached PersistentVolumeClaim.
78
83
Any data saved outside of this directory will be wiped when the workspace stops.
84
+
85
+ # # code-server
86
+
87
+ ` code-server` is installed via the `startup_script` argument in the `coder_agent`
88
+ resource block. The `coder_app` resource is defined to access `code-server` through
89
+ the dashboard UI over `localhost:13337`.
Original file line number Diff line number Diff line change @@ -25,11 +25,11 @@ variable "use_kubeconfig" {
25
25
EOF
26
26
}
27
27
28
- variable "workspaces_namespace " {
28
+ variable "coder_namespace " {
29
29
type = string
30
30
sensitive = true
31
31
description = " The namespace to create workspaces in (must exist prior to creating workspaces)"
32
- default = " coder-workspace "
32
+ default = " coder-namespace "
33
33
}
34
34
35
35
variable "disk_size" {
@@ -70,7 +70,7 @@ resource "kubernetes_pod" "main" {
70
70
count = data. coder_workspace . me . start_count
71
71
metadata {
72
72
name = " coder-${ data . coder_workspace . me . owner } -${ data . coder_workspace . me . name } "
73
- namespace = var. workspaces_namespace
73
+ namespace = var. coder_namespace
74
74
}
75
75
spec {
76
76
security_context {
@@ -105,7 +105,7 @@ resource "kubernetes_pod" "main" {
105
105
resource "kubernetes_persistent_volume_claim" "home-directory" {
106
106
metadata {
107
107
name = " home-coder-java-${ data . coder_workspace . me . owner } -${ data . coder_workspace . me . name } "
108
- namespace = var. workspaces_namespace
108
+ namespace = var. coder_namespace
109
109
}
110
110
spec {
111
111
access_modes = [" ReadWriteOnce" ]
You can’t perform that action at this time.
0 commit comments