powerline-kubernetes icon indicating copy to clipboard operation
powerline-kubernetes copied to clipboard

Kube Config Context Without a Namespace Causes Error

Open emmercm opened this issue 5 years ago • 3 comments

I have a kubeconfig that looks like:

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: ...
    server: ...
  name: ...
contexts:
- context:
    cluster: ...
    user: ...
  name: ...
current-context: ...
kind: Config
preferences: {}
users:
- name: ...
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      args:
      - token
      - -i
      - ...
      command: ...
      env:
        - name: ...
          value: ...

and when I powerline-daemon --kill I get an error similar to:

2019-12-03 10:15:52,043:ERROR:shell:kubernetes:'namespace'

I think https://github.com/so0k/powerline-kubernetes/commit/c366a55de5527bf9fa9067697771fd80466fe153#diff-5206fb189568a38aa689ef479153c15d intended to fix this but there's two instances of namespace = ctx['namespace'].

emmercm avatar Dec 03 '19 15:12 emmercm

I believe this is fixed in #14, so just need someone to merge it.

mortenlj avatar Feb 18 '20 12:02 mortenlj

Any update?

emmercm avatar May 02 '20 06:05 emmercm

Experiencing this as well

process0 avatar Jun 04 '20 18:06 process0