jonmosco / kube-tmux

Kubernetes status line for tmux
Apache License 2.0
345 stars 46 forks source link

invalid namespace shown in-case of extensions #21

Open amirsalarsafaei opened 3 weeks ago

amirsalarsafaei commented 3 weeks ago

Clusters accept extensions such as Telepresence. The way the plugin extracts information conflicts with the extension config. In the case of namespaces we are using kubectl config view --minify --output 'jsonpath={..namespace}' and this json query searches for every occurrence of namespace which can lead to conflict with other parts of configuration. I fix this issue by revising the query to .contexts[].context.namespace, fixing the problem and minimizing conflicts if the solution seems adequate, I'd be happy to prepare a pull request.