ahmetb / kubectl-tree

kubectl plugin to browse Kubernetes object hierarchies as a tree 🎄 (star the repo if you are using)
Apache License 2.0
2.95k stars 120 forks source link

Query resources in current namespace by default #18

Closed ahmetb closed 4 years ago

ahmetb commented 4 years ago

This came up in #9, #14 and #16.

Right now (v0.3.x) we are querying ALL objects in ALL api groups (without any namespace limitation). This has several problems:

From controller examples like Kubernetes Deployment, Knative, Agones, etc. it's fair to assume that resources don't often create child resources in other namespaces.

Proposed solution

When kubectl tree is querying child objects of a specified object:

This addresses:

It would likely work by refactorying query method to be namespace-scoped (query only namespaced APIs in the specified namespace) OR global-scoped (query both namespaced & non-namespaced APIs without specifying a namespace limitation, i.e. what we do today).

ahmetb commented 4 years ago

Anyone willing to take this on?

feloy commented 4 years ago

Anyone willing to take this on?

☝️ I can work on this

ahmetb commented 4 years ago

Please!