k9s icon indicating copy to clipboard operation
k9s copied to clipboard

Show owner of pod, rs (#1747)

Open gitolicious opened this issue 1 year ago • 5 comments

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.

gitolicious avatar Jun 15 '23 15:06 gitolicious

Thanks. Tests fixed and rebase done.

gitolicious avatar Nov 12 '23 18:11 gitolicious

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.

gitolicious avatar Jan 01 '24 21:01 gitolicious

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?

gitolicious avatar Jan 02 '24 21:01 gitolicious

The code got much cleaner now thanks to your suggestions and after me getting a better grasp on the structure of the code.

gitolicious avatar Jan 21 '24 21:01 gitolicious

@derailed, still waiting for your feedback on this. I have rebased the branch after the O hotkey got snagged in the meantime.

gitolicious avatar Apr 23 '24 19:04 gitolicious