k9s
k9s copied to clipboard
Show owner of pod, rs (#1747)
I reused the code from #1564 and used it for navigating "upstream" from pods to replica sets and daemon sets as well as from replica sets to deployments.
This fixes parts of what was discussed in #1747 though I didn't find a generic way that would work for all kinds of resources. Also it is a step-wise approach, not going all the way to the controller. If that is preferred, at least for pods it would be easy to directly jump to the deployment. But quickly hitting o
twice also gets you there.
Thanks. Tests fixed and rebase done.
Thanks for the feedback. I migrated the logic to a view extender. Handling multiple owners and the gvr/fqn tuples are still missing. Will work on that in the next days probably. If you find the time, you can let me know if I am on the right track.
On the dao side implement an Owner interface that would return a collection of gvr/fqn tuples for the owning controllers.
I didn't fully understand that part. Could you explain your idea a bit more? Would the DAOs themselves (e.g. dao/pod.go
) provide their owners? Would it actually be simpler than what I have implemented at the moment, or would it result in more redundant code?
The code got much cleaner now thanks to your suggestions and after me getting a better grasp on the structure of the code.
@derailed, still waiting for your feedback on this. I have rebased the branch after the O
hotkey got snagged in the meantime.