kubeswitch
kubeswitch copied to clipboard
Kubeswitch does not handle proxys
Kubeconfig can use the proxy-url
to enable usage through a proxy. It would be convenient if I could set the proxy in the switch-config
to talk to the api and also add the proxy-url
to the kubeconfig
Hi, to clarify: you want a proxy-server to be globally enabled via kubeswitch which is then put into all of the kubeconfig files?
I think proxy should be able to be added to specific configs, if we take rancher as an example:
kind: SwitchConfig
version: v1alpha1
kubeconfigStores:
- kind: rancher
id: rancher
config:
rancherAPIAddress: https://rancher.yourdomain.com/v3
rancherToken: token-12abc:bmjlzslas......x4hv5ptc29wt4sfk
proxy-url: my-proxy-url:1234
cache:
kind: filesystem
config:
path: ~/.kube/cache
As you can see I have added a proxy-url to the config. If a proxy has been set in the switch-config it should also be set in the kubeconfig-files in the ~/.kube/cache
path.
Just a small correction above: the proxy-url is a kubeconfig config option, hence it should be either on the global or store-level for the SwitchConfig instead of the store-specific level.
kind: SwitchConfig
version: v1alpha1
kubeconfigStores:
- kind: rancher
id: rancher
proxy-url: my-proxy-url:1234
I think that should be doable, I'll work on a fix.