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

[RFE] Optionally include the file name when searching for contexts #71

Open
e-minguez opened this issue Jun 16, 2023 · 1 comment
Open

Comments

@e-minguez
Copy link

Currently:

❯ find .kube/configs -type f
.kube/configs/ha-edge-385.yaml
.kube/configs/vm-k3s-only.yaml

❯ cat .kube/switch-config.yaml
kind: SwitchConfig
version: v1alpha1
kubeconfigStores:
- kind: filesystem
  kubeconfigName: "*.yaml"
  paths:
  - /Users/eminguez/.kube/configs/
  - /Users/eminguez/.kube/config

❯ switch list-contexts
configs/default
configs/default

Ideally:

❯ switch list-contexts
configs/default (ha-edge-385.yaml)
configs/default (vm-k3s-only.yaml)
@danielfoehrKn
Copy link
Owner

Hi, thanks for the issue. That's a valid point. I always uniquely name my directories or have unique context names if multiple kubeconfigs are in the same directory. That could be a workaround.

I currently don't have the time to work on this project, so I'd suggest using the above approach for now.

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