benc-uk / kubeview

Kubernetes cluster visualiser and graphical explorer

Home Page:http://kubeview.benco.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pods without owner causes error

REBELinBLUE opened this issue · comments

For example in the kube-system namespace etcd-master isn't part of a ReplicaSet, DaemonSet or StatefulSet so you get an error

TypeError: Cannot read property '0' of undefined

caused by

let owner = pod.metadata.ownerReferences[0];

It looks like further down you do check if ownerReferences is set before using it

for(let ownerRef of pod.metadata.ownerReferences || []) {

Good spot. I never tested this with any "naked" pods.

Fixed by f85c69e