devpod icon indicating copy to clipboard operation
devpod copied to clipboard

Support to set DEVPOD_AGENT_URL in workspace or provider

Open koolay opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? It can't start workspace when downloading agent in pod because of GFW in China.

Which solution do you suggest? Suppport to custom the DEVPOD_AGENT_URL in workspace settings.

Which alternative solutions exist?

Additional context


[00:36:43] debug Run command: kubectl --namespace devpod --kubeconfig /Users/huwl/.kube/home.k3s.yaml --context default exec -c devpod -i devpod-tianxiang-php-default-9633bcabe684-b78a8 -- sh -c #!/bin/sh

...
...

# set download url
export DEVPOD_AGENT_URL=https://github.com/loft-sh/devpod/releases/download/v0.2.1

# Execute command
[00:36:44] debug Received line after pong: ARM-false
[00:36:44] debug Inject binary
[00:36:46] info Download DevPod Agent...

koolay avatar Jul 10 '23 16:07 koolay

@koolay thanks for creating this issue! Not sure if I understand this correctly, but is this ENV var not working for you? Or do you want a way how to configure this ENV var for your project in something like the devcontainer.json or project.yaml?

FabianKramm avatar Jul 10 '23 17:07 FabianKramm

@FabianKramm Thanks for your quick reply. Workspace can't download the agent because of the BFW, and I can not find where to change the env: DEVPOD_AGENT_URL.

koolay avatar Jul 11 '23 02:07 koolay

For the CLI you can just use:

DEVPOD_AGENT_URL=https://github.com/loft-sh/devpod/releases/download/v0.2.1 devpod up ...

But we will also create a context option for you to set in the Loft UI as well.

FabianKramm avatar Jul 11 '23 07:07 FabianKramm

@koolay You can also use the context option AGENT_URL to set it permanently. per-command DEVPOD_AGENT_URL takes precedence though.

devpod context set-options -o AGENT_URL=$YOUR_URL or alternatively specify it in the UI in Settings > General

pascalbreuninger avatar Jul 14 '23 14:07 pascalbreuninger