ahmetb / kubectl-tree

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

Add a flag to support a list of condition types #48

Open hectorj2f opened 3 years ago

hectorj2f commented 3 years ago

The current implementation only supports a condition with type Ready. However it could be great to support additional condition types that can be used on custom resource types.

As an example,

kubectl tree customresource --ready-cond-types=Ready,Processed,Scheduled....`
ahmetb commented 3 years ago

Are you saying instead of READY=true/false, we should accept a list of conditions and show them all? I am open to patches, although the Ready condition is pretty standard practice per kstatus. Perhaps the more advanced lineage plugin can also be a good place to add this.

hectorj2f commented 3 years ago

@ahmetb I ack the usage of Ready=True on conditions however there might be situations where other conditions should also be considered to be reported in the tree (maybe because Ready means something different for that customer resource). Therefore, I would suggest to have a flag that defines the list of condition types that can be accepted to appear in the tree, e.g. Scheduled=True, Ready=True, Processed=True so that would be --ready-cond-types=Ready,Processed,Scheduled

ahmetb commented 3 years ago

Yeah I think it's doable. It'll make the output hard to fit on the screen but feel free to prototype it.