- Notifications
You must be signed in to change notification settings - Fork928
Closed
Milestone
Description
Update from@kylecarbs 👋
We've narrowed this down to the application URL not accepting the<workspace>.<agent>
format. It currently statically goes to:https://domain.com/@username/workspace/apps/code-server
.
- Allow an agent identifier in the URL syntax for the backend.
- Update the routing URL on the frontend to use the agent identifier!
Original comment:
I follow instructionshere to enable open with code-server button, however when I click the button I receive error message application not found. It is the kubernetes multiservices template with the modification in order to have code-server in ubuntu container.
Here is the template I am using:
terraform { required_providers { coder = { source = "coder/coder" version = "~> 0.4.3" } kubernetes = { source = "hashicorp/kubernetes" version = "~> 2.10" } }}variable "use_kubeconfig" { type = bool sensitive = true description = <<-EOF Use host kubeconfig? (true/false) Set this to false if the Coder host is itself running as a Pod on the same Kubernetes cluster as you are deploying workspaces to. Set this to true if the Coder host is running outside the Kubernetes cluster for workspaces. A valid "~/.kube/config" must be present on the Coder host. EOF}variable "workspaces_namespace" { type = string sensitive = true description = "The namespace to create workspaces in (must exist prior to creating workspaces)" default = "coder-workspaces"}provider "kubernetes" { # Authenticate via ~/.kube/config or a Coder-specific ServiceAccount, depending on admin preferences config_path = var.use_kubeconfig == true ? "~/.kube/config" : null}data "coder_workspace" "me" {}resource "coder_agent" "go" { os = "linux" arch = "arm64"}resource "coder_agent" "java" { os = "linux" arch = "arm64"}resource "coder_agent" "ubuntu" { os = "linux" arch = "arm64" startup_script = <<EOF #!/bin/sh # install and start code-server curl -fsSL https://code-server.dev/install.sh | sh code-server --auth none --port 13337 EOF}resource "coder_app" "code-server" { agent_id = coder_agent.ubuntu.id name = "code-server" url = "http://localhost:13337/?folder=/home/coder" icon = "/icon/code.svg"}resource "kubernetes_pod" "main" { count = data.coder_workspace.me.start_count metadata { name = "coder-${data.coder_workspace.me.owner}-${data.coder_workspace.me.name}" namespace = var.workspaces_namespace } spec { container { name = "go" image = "mcr.microsoft.com/vscode/devcontainers/go:1" command = ["sh", "-c", coder_agent.go.init_script] security_context { run_as_user = "1000" } env { name = "CODER_AGENT_TOKEN" value = coder_agent.go.token } } container { name = "java" image = "mcr.microsoft.com/vscode/devcontainers/java" command = ["sh", "-c", coder_agent.java.init_script] security_context { run_as_user = "1000" } env { name = "CODER_AGENT_TOKEN" value = coder_agent.java.token } } container { name = "ubuntu" image = "mcr.microsoft.com/vscode/devcontainers/base:ubuntu-22.04" command = ["sh", "-c", coder_agent.ubuntu.init_script] security_context { run_as_user = "1000" } env { name = "CODER_AGENT_TOKEN" value = coder_agent.ubuntu.token } } }}
If anyone know what I am doing wrong, please share, perhaps who knows, the documentations also could be improved.