unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Filipp Gunbin <fgunbin@fastmail.fm>
To: Michael Albinus <Michael.Albinus@gmx.de>
Cc: emacs-devel@gnu.org,  bjc@spork.org,  bjc@kublai.com
Subject: Re: tramp-kubernetes
Date: Tue, 04 Oct 2022 19:50:46 +0300	[thread overview]
Message-ID: <m2v8oz1qjd.fsf@fastmail.fm> (raw)
In-Reply-To: <878rlvoe3q.fsf@gmx.de> (Michael Albinus's message of "Tue, 04 Oct 2022 16:30:49 +0200")

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



  reply	other threads:[~2022-10-04 16:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Filipp Gunbin [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2v8oz1qjd.fsf@fastmail.fm \
    --to=fgunbin@fastmail.fm \
    --cc=Michael.Albinus@gmx.de \
    --cc=bjc@kublai.com \
    --cc=bjc@spork.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).