nice-toddler-37804
11/24/2022, 3:34 PMhttp_proxy
variable inside the rancher-desktop
WSL VM /etc/profile
file. I don't think I've seen anyone working on this issue currently let me know if you know anything about this, right now the issues about proxy only propose to directly modify the files inside the VM.jolly-forest-99711
11/24/2022, 11:41 PMcalm-sugar-3169
11/24/2022, 11:49 PMwide-mechanic-33041
11/28/2022, 1:09 PMnice-toddler-37804
12/05/2022, 4:04 PMkubernetes.port
* kubernetes.containerEngine
* kubernetes.enables
* kubernetes.WSLIntegrations
* kubernetes.options.traefik
* kubernetes.options.flannel
* kubernetes.hostResolver
All the preferences are under the kubernetes
object but they don't all relate directly to the Kubernetes configuration. Correct me if I'm wrong but for instance, the parameter WSLIntegrations
is in this object but doesn't relate directly to Kubernetes.
During the development of my WSLProxy features, I added the the wslProxy
entry to the Settings
object
ts
export const defaultSettings = {
...
kubernetes: { ... },
wslProxy: { address: '', port: 3128 },
...
}
My first question is then:
1. Should all the preference settings that modify the backend be listed under the kubernetes
Settings
entry ? Or I can just keep it as I did ?
Right now the modification of every settings variable is checked in the function requiresRestartReasons
in pkg/rancher-desktop/backend/kube/wsl.ts
. Any change in one of that preference will trigger a full reset of Kubernetes in the WSL VM.
2. Is it planned to take into account the preference more precisely ? In such a way, a simple change in the settings doesn't trigger the whole Kubernetes reset but a more specific subset ?
If I want to apply the WSL Proxy settings my setting will need to be checked in the body of requiresRestartReasons
in pkg/rancher-desktop/backend/wsl.ts
Also, I want first to be sure
3. There is no settings the user can trigger that directly modify the content or execution of the WSL VM that currently exist ?
To apply the WSL Proxy settings I do have to modify WSLENV
variables or directly write them inside the running WSL VM.
4. If I want to modify the WSLENV
, is there any way to modify the WSLENV
variable while the VM is running or I should re-spawn a new VM ?
Thank youwide-mechanic-33041
12/05/2022, 4:09 PMnice-toddler-37804
12/05/2022, 4:22 PMWSLENV
and maybe restarting WSL then just to try things out. I guess that if I just set http_proxy
variable in /etc/profile
I will need to restart all the docker, k8s, ... so that they take that variable into account anyway.
"vpnkit" does looks interesting to try out indeed, I did saw it mentioned somewhere in one of the issues. Right now I was thinking of just developing something more simple based on the env variable instead of importing something external to rancher-desktop project. Of course I'm open to investigate any option to solve this issue right now.wide-mechanic-33041
12/05/2022, 4:23 PMnice-toddler-37804
12/05/2022, 4:26 PMwide-mechanic-33041
12/05/2022, 4:27 PMcalm-sugar-3169
12/05/2022, 5:06 PMWSLENV
we need to be more cautious since restarting the WSL or re-spawn of a new VM may not be an option since RD is only one of the many distros that users could be running in their wsl. If WSL vm is restarted all those distros essentially are restarted too. Furthermore, ideally the proxy variable should also get updated without the restart of k8s or docker to prevent any potential glitches or outages from users experience perspective. One way to do this is to use an intermediary proxy either by running it on the host machine or inside the WSL VM, that way all traffic is always going through the proxy and also, all the changes applied to the proxy too. This way there is no need to restart dockerd or wsl for that matter. I wrote a proposal for a solution in this document here (under proxy section): https://docs.google.com/document/d/1rEMnQJTxJ6oHePrtsdtuES8gi6p_Qibi4BOq1rmzp5E/edit?usp=sharing