* tramp-kubernetes
@ 2022-10-03 20:30 Filipp Gunbin
2022-10-03 22:38 ` tramp-kubernetes Filipp Gunbin
2022-10-04 14:30 ` tramp-kubernetes Michael Albinus
0 siblings, 2 replies; 10+ messages in thread
From: Filipp Gunbin @ 2022-10-03 20:30 UTC (permalink / raw)
To: emacs-devel, Michael.Albinus; +Cc: bjc, bjc
[-- Attachment #1: Type: text/plain, Size: 491 bytes --]
Hi,
I've seen the recently-added tramp-docker method (thanks for that!). It
was easy to adapt that to add a method for Kubernetes. I think this
could be a worthwhile addition, the code is attached - take if you like.
Of the things to be improved, we could add container selection (like
"kubectl exec <pod> -c <container>"). Now it offers to choose pod, and
then uses first container there (as just "kubectl exec <pod>"). This
default should usually be enough, though.
Thanks.
Filipp
[-- Attachment #2: tramp-kubernetes.el --]
[-- Type: application/emacs-lisp, Size: 3400 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: tramp-kubernetes
2022-10-03 20:30 tramp-kubernetes Filipp Gunbin
@ 2022-10-03 22:38 ` Filipp Gunbin
2022-10-04 14:30 ` tramp-kubernetes Michael Albinus
1 sibling, 0 replies; 10+ messages in thread
From: Filipp Gunbin @ 2022-10-03 22:38 UTC (permalink / raw)
To: emacs-devel; +Cc: Michael.Albinus, bjc, bjc
Also put on branch scratch/tramp-kubernetes.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: tramp-kubernetes
2022-10-03 20:30 tramp-kubernetes Filipp Gunbin
2022-10-03 22:38 ` tramp-kubernetes Filipp Gunbin
@ 2022-10-04 14:30 ` Michael Albinus
2022-10-04 16:50 ` tramp-kubernetes Filipp Gunbin
1 sibling, 1 reply; 10+ messages in thread
From: Michael Albinus @ 2022-10-04 14:30 UTC (permalink / raw)
To: emacs-devel; +Cc: bjc, bjc
Filipp Gunbin <fgunbin@fastmail.fm> writes:
> Hi,
Hi Filipp,
> I've seen the recently-added tramp-docker method (thanks for that!). It
> was easy to adapt that to add a method for Kubernetes. I think this
> could be a worthwhile addition, the code is attached - take if you like.
Thanks for this!
This would be the very first Tramp method I'm not able to test. I've
worked with kubernetes years ago, but I have no access to kubernetes
clusters anymore. But of course, this shouldn't be an exclusion reason :-)
Have you checked kubernetes-tramp on MELPA, how they correlate?
Another question: Would we really need another Lisp file? Couldn't this
be added to tramp-docker.el (and maybe that file renamed to
tramp-container.el, because it is about container technology)?
What I also miss is something for the documentation, tramp.texi.
Otherwise, I have no objections.
> Of the things to be improved, we could add container selection (like
> "kubectl exec <pod> -c <container>"). Now it offers to choose pod, and
> then uses first container there (as just "kubectl exec <pod>"). This
> default should usually be enough, though.
This I would let to people familiar with kubernetes.
> Thanks.
> Filipp
Best regards, Michael.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: tramp-kubernetes
2022-10-04 14:30 ` tramp-kubernetes Michael Albinus
@ 2022-10-04 16:50 ` Filipp Gunbin
2022-10-04 17:35 ` tramp-kubernetes Michael Albinus
0 siblings, 1 reply; 10+ messages in thread
From: Filipp Gunbin @ 2022-10-04 16:50 UTC (permalink / raw)
To: Michael Albinus; +Cc: emacs-devel, bjc, bjc
Hi Michael,
On 04/10/2022 16:30 +0200, Michael Albinus wrote:
> Filipp Gunbin <fgunbin@fastmail.fm> writes:
>
>> Hi,
>
> Hi Filipp,
>
>> I've seen the recently-added tramp-docker method (thanks for that!). It
>> was easy to adapt that to add a method for Kubernetes. I think this
>> could be a worthwhile addition, the code is attached - take if you like.
>
> Thanks for this!
>
> This would be the very first Tramp method I'm not able to test. I've
> worked with kubernetes years ago, but I have no access to kubernetes
> clusters anymore. But of course, this shouldn't be an exclusion reason
> :-)
I've used Docker Desktop
(https://www.docker.com/products/docker-desktop/) to run local
Kubernetes cluter on macOS. There should be a way to run it locally on
other OSes as well.
> Have you checked kubernetes-tramp on MELPA, how they correlate?
Yes, I started from that, it's a bit outdated and didn't work for me.
It doesn't do anything which tramp-kubernetes.el does not.
> Another question: Would we really need another Lisp file? Couldn't this
> be added to tramp-docker.el (and maybe that file renamed to
> tramp-container.el, because it is about container technology)?
I see that tramp-docker.el offers to choose podman as program, I assume
that means that they have similar cli interface.
Kubernetes is a bit different, in that it's a layer on top of container
runtime (and they seem to deprecate Docker as container runtime:
https://www.docker.com/products/docker-desktop/). Kubernetes pod may
have several containers inside. There're also Kubernetes services.
Given this, I'd better not "unify" the two (even though currently
kubectl is used as just "give me the shell please").
> What I also miss is something for the documentation, tramp.texi.
Yeah, I'll add something.
> Otherwise, I have no objections.
>
>> Of the things to be improved, we could add container selection (like
>> "kubectl exec <pod> -c <container>"). Now it offers to choose pod, and
>> then uses first container there (as just "kubectl exec <pod>"). This
>> default should usually be enough, though.
>
> This I would let to people familiar with kubernetes.
Let's see what others say. There's also "kubernetes" package on MELPA,
which offers rich interface, but that's a different thing.
Thanks for the review!
Filipp
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: tramp-kubernetes
2022-10-04 16:50 ` tramp-kubernetes Filipp Gunbin
@ 2022-10-04 17:35 ` Michael Albinus
2022-10-04 17:45 ` tramp-kubernetes Brian Cully via Emacs development discussions.
2022-10-04 17:49 ` tramp-kubernetes Filipp Gunbin
0 siblings, 2 replies; 10+ messages in thread
From: Michael Albinus @ 2022-10-04 17:35 UTC (permalink / raw)
To: emacs-devel; +Cc: bjc, bjc
Filipp Gunbin <fgunbin@fastmail.fm> writes:
> Hi Michael,
Hi Filipp,
>> Another question: Would we really need another Lisp file? Couldn't this
>> be added to tramp-docker.el (and maybe that file renamed to
>> tramp-container.el, because it is about container technology)?
>
> I see that tramp-docker.el offers to choose podman as program, I assume
> that means that they have similar cli interface.
>
> Kubernetes is a bit different, in that it's a layer on top of container
> runtime (and they seem to deprecate Docker as container runtime:
> https://www.docker.com/products/docker-desktop/). Kubernetes pod may
> have several containers inside. There're also Kubernetes services.
> Given this, I'd better not "unify" the two (even though currently
> kubectl is used as just "give me the shell please").
I don't see why these three methods couldn't coexist in a single
package. All of them are about container technology.
See for example tramp-gvfs.el, which offers several methods, which are
very different. Or think about tramp-sh.el with its 22 different methods.
> Thanks for the review!
> Filipp
Best regards, Michael.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: tramp-kubernetes
2022-10-04 17:35 ` tramp-kubernetes Michael Albinus
@ 2022-10-04 17:45 ` Brian Cully via Emacs development discussions.
2022-10-04 17:49 ` tramp-kubernetes Filipp Gunbin
1 sibling, 0 replies; 10+ messages in thread
From: Brian Cully via Emacs development discussions. @ 2022-10-04 17:45 UTC (permalink / raw)
To: Michael Albinus, emacs-devel; +Cc: bjc
On 10/4/22 13:35, Michael Albinus wrote:
> Filipp Gunbin <fgunbin@fastmail.fm> writes:
> I don't see why these three methods couldn't coexist in a single
> package. All of them are about container technology.
I agree. I think "tramp-container.el" is very sensible.
-bjc
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: tramp-kubernetes
2022-10-04 17:35 ` tramp-kubernetes Michael Albinus
2022-10-04 17:45 ` tramp-kubernetes Brian Cully via Emacs development discussions.
@ 2022-10-04 17:49 ` Filipp Gunbin
2022-10-04 17:57 ` tramp-kubernetes Michael Albinus
1 sibling, 1 reply; 10+ messages in thread
From: Filipp Gunbin @ 2022-10-04 17:49 UTC (permalink / raw)
To: Michael Albinus; +Cc: emacs-devel, bjc, bjc
Hi Michael,
On 04/10/2022 19:35 +0200, Michael Albinus wrote:
> Filipp Gunbin <fgunbin@fastmail.fm> writes:
>
>> Kubernetes is a bit different, in that it's a layer on top of container
>> runtime (and they seem to deprecate Docker as container runtime:
>> https://www.docker.com/products/docker-desktop/).
The correct URL is
https://kubernetes.io/blog/2020/12/02/dont-panic-kubernetes-and-docker/.
And I've now updated scratch/tramp-kubernetes branch.
> I don't see why these three methods couldn't coexist in a single
> package. All of them are about container technology.
>
> See for example tramp-gvfs.el, which offers several methods, which are
> very different. Or think about tramp-sh.el with its 22 different
> methods.
That's reasonable. Do you want me to merge them together?
Filipp
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: tramp-kubernetes
2022-10-04 17:49 ` tramp-kubernetes Filipp Gunbin
@ 2022-10-04 17:57 ` Michael Albinus
2022-10-05 0:33 ` tramp-kubernetes Filipp Gunbin
0 siblings, 1 reply; 10+ messages in thread
From: Michael Albinus @ 2022-10-04 17:57 UTC (permalink / raw)
To: emacs-devel; +Cc: bjc, bjc
Filipp Gunbin <fgunbin@fastmail.fm> writes:
> Hi Michael,
Hi Filipp,
>> I don't see why these three methods couldn't coexist in a single
>> package. All of them are about container technology.
>>
>> See for example tramp-gvfs.el, which offers several methods, which are
>> very different. Or think about tramp-sh.el with its 22 different
>> methods.
>
> That's reasonable. Do you want me to merge them together?
Yes, pls merge your tramp-kubernetes.el work into tramp-docker.el, and
rename the latter to tramp-container.el.
> Filipp
Best regards, Michael.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: tramp-kubernetes
2022-10-04 17:57 ` tramp-kubernetes Michael Albinus
@ 2022-10-05 0:33 ` Filipp Gunbin
2022-10-05 15:13 ` tramp-kubernetes Michael Albinus
0 siblings, 1 reply; 10+ messages in thread
From: Filipp Gunbin @ 2022-10-05 0:33 UTC (permalink / raw)
To: Michael Albinus; +Cc: emacs-devel, bjc
Hi Michael,
On 04/10/2022 19:57 +0200, Michael Albinus wrote:
> Yes, pls merge your tramp-kubernetes.el work into tramp-docker.el, and
> rename the latter to tramp-container.el.
Now done on master.
Thanks,
Filipp
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: tramp-kubernetes
2022-10-05 0:33 ` tramp-kubernetes Filipp Gunbin
@ 2022-10-05 15:13 ` Michael Albinus
0 siblings, 0 replies; 10+ messages in thread
From: Michael Albinus @ 2022-10-05 15:13 UTC (permalink / raw)
To: emacs-devel; +Cc: bjc
Filipp Gunbin <fgunbin@fastmail.fm> writes:
> Hi Michael,
Hi Filipp,
>> Yes, pls merge your tramp-kubernetes.el work into tramp-docker.el, and
>> rename the latter to tramp-container.el.
>
> Now done on master.
Thanks a lot!
> Thanks,
> Filipp
Best regards, Michael.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-10-05 15:13 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-03 20:30 tramp-kubernetes Filipp Gunbin
2022-10-03 22:38 ` tramp-kubernetes Filipp Gunbin
2022-10-04 14:30 ` tramp-kubernetes Michael Albinus
2022-10-04 16:50 ` tramp-kubernetes Filipp Gunbin
2022-10-04 17:35 ` tramp-kubernetes Michael Albinus
2022-10-04 17:45 ` tramp-kubernetes Brian Cully via Emacs development discussions.
2022-10-04 17:49 ` tramp-kubernetes Filipp Gunbin
2022-10-04 17:57 ` tramp-kubernetes Michael Albinus
2022-10-05 0:33 ` tramp-kubernetes Filipp Gunbin
2022-10-05 15:13 ` tramp-kubernetes Michael Albinus
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).