Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubeswitch does not handle proxys #114

Open
anton264 opened this issue Mar 4, 2024 · 3 comments
Open

Kubeswitch does not handle proxys #114

anton264 opened this issue Mar 4, 2024 · 3 comments

Comments

@anton264
Copy link

anton264 commented Mar 4, 2024

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-urlto the kubeconfig

@danielfoehrKn
Copy link
Owner

Hi, to clarify: you want a proxy-server to be globally enabled via kubeswitch which is then put into all of the kubeconfig files?

@anton264
Copy link
Author

anton264 commented Apr 14, 2024

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.

@danielfoehrKn
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants