-
Notifications
You must be signed in to change notification settings - Fork 73
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
Question: kubeswitch print only shortened context name? #18
Comments
Thanks for reporting. |
Oh yes of course: $ cat ~/.kube/config
apiVersion: v1
clusters:
- cluster:
insecure-skip-tls-verify: true
server: https://api.vmw.example.com:6443
name: api-vmw-example-com:6443
contexts:
- context:
cluster: api-vmw-example-com:6443
namespace: windows-container
user: kube:admin/api-vmw-example-com:6443
name: windows-container/api-vmw-example-com:6443/kube:admin
- context:
cluster: api-vmw-example-com:6443
namespace: windows-workload
user: kube:admin/api-vmw-example-com:6443
name: windows-workload/api-vmw-example-com:6443/kube:admin
current-context: demo-app/api-demo-openshift-pub:6443/admin
kind: Config
preferences: {}
users:
- name: kube:admin/api-vmw-example-com:6443
user:
token: sha256~A518ZtBiOcuyuYuYWk96-NTgZaJh_vfqomZ-SyXTNpc $ cat ~/.kube/switch-config.yaml
kind: SwitchConfig
version: v1alpha1
kubeconfigStores:
- kind: filesystem
id: local
refreshIndexAfter: 3h
paths:
- ~/.kube/config $ kubectx
windows-container/api-vmw-example-com:6443/kube:admin
windows-workload/api-vmw-example-com:6443/kube:admin
$ switch list-contexts
.kube/kube:admin
|
It should be fixed on the current master branch. The problem was the slashes in the context names. Could you check if it works for you now from the master branch? |
LGTM Is it possible to disable the kubeconfig preview on the right side? |
Yep, you can use |
Ah thanks, but the left part is still shortened. |
Did you build from the current master?
Also try to remove the cache via |
should be fixed with this commit Let me know if that works for you :) |
Rebuild from master and looks great!
Just-for-information: $ ./hack/switch/switcher_linux_amd64 --show-preview false
Error: context with name "false" not found
context with name "false" not found$
|
I have only one kubeconfig in |
Only for the switcher binary.
You can now also achieve the same thing via the config file with the latest master. |
I'll have to think about a good way to do that. I guess it makes sense that it is configurable. |
Done, i guess we can close this Issue. Thank you very much for your support! |
Hi,
is that only me or is kubeswitch using any shortened context name?
Here an example:
my switch configuration
switch version
I would like to see the whole context name.
Thanks for any advice
Cheers
Robert
The text was updated successfully, but these errors were encountered: