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

My kubeconfigs are nested in subdirs in a single filestore ie auth/kubeconfig which confuses showPrefix #112

Open
dblviking opened this issue Feb 26, 2024 · 1 comment
Labels
wontfix This will not be worked on

Comments

@dblviking
Copy link

Is there a way to set the prefix myself for each file store or path? Perhaps a regex pattern?

right now I see "auth/admin" x 5 when I run switch and I have to inspect in the preview which cluster I'm connecting to.
But I want the directory above it to be the prefix so when I run switch, I can see:
ie) cluster1/admin

My kubeconfig file layout is like:
/clusterrepo/clusters/cluster1/auth/kubeconfig
/clusterrepo/clusters/cluster2/auth/kubeconfig
/clusterrepo/clusters/cluster3/auth/kubeconfig
/clusterrepo/clusters/cluster4/auth/kubeconfig
/clusterrepo/clusters/cluster5/auth/kubeconfig

Right now I've had to create symlinks in my own homedir as a workaround, but I'd prefer a native kubeswitch filestore prefix to do it.
Note: I can't alter the filestore repo with the kubeconfigs.
Thanks!

kind: SwitchConfig
version: v1alpha1
kubeconfigName: "kubeconfig"
kubeconfigStores:

  • kind: filesystem
    showPrefix: true
    paths:
    • /clusterrepo/clusters/
@danielfoehrKn danielfoehrKn added the wontfix This will not be worked on label Apr 14, 2024
@danielfoehrKn
Copy link
Owner

Yes, the current assumption is that you can alter the filesystem path, so you can set either a unique parent directory or context name. Unfortunately I don't think that's something worth investing time for me personally ias that is a very specialized scenario which might only benefit very few users. I someone has the same problem and wants to contribute a fix, please feel very welcome though.
Thanks for reporting and I hope you are ok with the decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants