ahmetb / kubectl-tree

kubectl plugin to browse Kubernetes object hierarchies as a tree 🎄 (star the repo if you are using)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Duplicate tree items, if a resource has two owners.

guettli opened this issue · comments

One of my child CRDs has two ownerRefs.

Unfortunately this results in a duplication:

NAMESPACE  NAME                                                                          READY  REASON  AGE
cluster    ClusterStack/clusterstack                                                     -              24m
cluster    ├─ClusterStackRelease/hellopa-apalla-1-26-v6                                  True           24m
cluster    │ └─HellopaClusterStackRelease/hellopa-apalla-1-26-v6                         -              24m
cluster    │   ├─HellopaNodeImageRelease/hellopa-apalla-1-26-controlplaneamd64hcloud-v5  -              24m
cluster    │   └─HellopaNodeImageRelease/hellopa-apalla-1-26-workeramd64hcloud-v5        -              24m
cluster    └─HellopaClusterStackRelease/hellopa-apalla-1-26-v6                           -              24m
cluster      ├─HellopaNodeImageRelease/hellopa-apalla-1-26-controlplaneamd64hcloud-v5    -              24m
cluster      └─HellopaNodeImageRelease/hellopa-apalla-1-26-workeramd64hcloud-v5          -              24m

HellopaClusterStackRelease/hellopa-apalla-1-26-v6 and the two children are twice in the tree.

The tool linage does not duplicate the children of this object:

k lineage -n cluster --exclude-types events clusterstacks clusterstack

NAME                                                                                 READY   STATUS   AGE
ClusterStack/clusterstack                                                            -                27m
├── ClusterStackRelease/hellopa-apalla-1-26-v6                                       True             27m
│   └── HellopaClusterStackRelease/hellopa-apalla-1-26-v6                            -                27m
│       ├── HellopaNodeImageRelease/hellopa-apalla-1-26-controlplaneamd64hcloud-v5   -                27m
│       └── HellopaNodeImageRelease/hellopa-apalla-1-26-workeramd64hcloud-v5         -                27m
└── HellopaClusterStackRelease/hellopa-apalla-1-26-v6                                -                27m

i think it is better to not show the children twice.

i think it is better to not show the children twice.

In my use cases, it's better to show twice as I use this tool to debug ownership references. :)