ahmetb/kubectl-tree

Add a flag to support a list of condition types

hectorj2f opened this issue · 3 comments

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....`

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.

@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

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