@@ -14,20 +14,6 @@ terraform {
14
14
provider "coder" {
15
15
}
16
16
17
- variable "use_kubeconfig" {
18
- type = bool
19
- description = <<- EOF
20
- Use host kubeconfig? (true/false)
21
-
22
- Set this to false if the Coder host is itself running as a Pod on the same
23
- Kubernetes cluster as you are deploying workspaces to.
24
-
25
- Set this to true if the Coder host is running outside the Kubernetes cluster
26
- for workspaces. A valid "~/.kube/config" must be present on the Coder host.
27
- EOF
28
- default = false
29
- }
30
-
31
17
variable "namespace" {
32
18
type = string
33
19
description = " The Kubernetes namespace to create workspaces in (must exist prior to creating workspaces)"
@@ -98,8 +84,7 @@ data "coder_parameter" "home_disk_size" {
98
84
}
99
85
100
86
provider "kubernetes" {
101
- # Authenticate via ~/.kube/config or a Coder-specific ServiceAccount, depending on admin preferences
102
- config_path = var. use_kubeconfig == true ? " ~/.kube/config" : null
87
+ config_path = null
103
88
}
104
89
105
90
data "coder_workspace" "me" {}
@@ -115,11 +100,6 @@ resource "coder_agent" "main" {
115
100
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server
116
101
/tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
117
102
118
- # # Set KUBECONFIG env var to the path of the mounted secret
119
- # mkdir -p /home/coder/.kube
120
- # sudo cp /tmp/config /home/coder/.kube/config
121
- # export KUBECONFIG=/home/coder/.kube/config
122
-
123
103
EOT
124
104
125
105
# The following metadata blocks are optional. They are used to display
@@ -251,7 +231,6 @@ resource "kubernetes_deployment" "main" {
251
231
}
252
232
253
233
spec {
254
- # replicas = data.coder_workspace.me.start_count
255
234
replicas = 1
256
235
selector {
257
236
match_labels = {
0 commit comments