emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Feature to allow selection of container when connecting to kubernetes po


From: Aaron Gonzales
Subject: Feature to allow selection of container when connecting to kubernetes pod
Date: Fri, 30 Dec 2022 05:53:45 -0800

Hi all,

This is my first time doing this so sorry if there are some mistakes in the process. I am also not entirely accustomed to elisp so please forgive my code and provide any feedback you may have. 

These new changes allow the user to select a container when connecting to a kubernetes pod. This is essential for kubernetes Tramp functionality since the first container may not always be the desired pod. Many pods contain multiple side-car containers besides the main application container. 

Now considering the above, the below changes are not the most desirable from my perspective. From a user perspective, there are no visual cues to display what container you selected. I wanted to avoid using ":" separator between a pod and container since that might overload the meaning of that separator. 

The other issue is the change to tramp-expand-args which now can expect either a lambda or string. The lambda takes in the entire tramp-file-name struct but that can be reduced to just passing the pod name for the sake of kubernetes connections. At the very least this should warrant a function rename, but I could also see a possible break off to more specific handling for kubernetes. Currently, Emacs is only accounting for connecting to pods, but jobs are still relevant when it comes to kubernetes which would require some selection.

Changes can also be found at https://github.com/Aaronzinhoo/emacs/tree/feat-tramp-kubernetes-select-container if needed.

Attachment: 0001-Add-ability-to-access-specific-kubernetes-pod-s-cont.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]