GNU bug report logs - #59797
30.0.50; [wishlist] Using namespaces in Tramp's kubernetes integration

Previous Next

Package: emacs;

Reported by: Michael Albinus <michael.albinus <at> gmx.de>

Date: Sat, 3 Dec 2022 09:21:01 UTC

Severity: wishlist

Found in version 30.0.50

Fixed in version 31.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eshel Yaron <me <at> eshelyaron.com>
Cc: Aaron Gonzales <aarongonzales1 <at> gmail.com>, 59797 <at> debbugs.gnu.org, Filipp Gunbin <fgunbin <at> fastmail.fm>, Warren Lynn <wrn.lynn <at> gmail.com>
Subject: bug#59797: 30.0.50; [wishlist] Using namespaces in Tramp's kubernetes integration
Date: Tue, 23 Jul 2024 14:29:34 +0200
Eshel Yaron <me <at> eshelyaron.com> writes:

> Hi Michael,

Hi Eshel,

> Michael Albinus <michael.albinus <at> gmx.de> writes:
>
>> Now we have kubernetes integrated in Tramp. We can access pods like
>> "/kubernetes:POD:/path/to/file".
>>
>> However, kubernetes can much more. For all services (like pods) it
>> creates DNS entries "<service-name>.<namespace-name>.svc.cluster.local".
>> Should'nt we support this? It means should we allow to access kubernetes
>> pods like "/kubernetes:POD.NAMESPACE:/path/to/file", including
>> completion for namespace names?
>
> [...]
>
>> Finally, I've taken the stab and implemented something along these
>> lines. It is a little bit different from earlier proposals.
>>
>> - You can now specify a container in the host name, dotted notation.
>>   "/kubernetes:container.pod:" accesses the given container. If it is
>>   not specified, as in "/kubernetes:pod:", the first container is taken.
>>
>> - You can now specify different context and namespace. Change the new
>>   user options tramp-kubernetes-context or tramp-kubernetes-namespace
>>   for this effect.
>>
>> Everything pushed to the Emacs and Tramp master repositories. The target
>> is now Tramp 2.7 / Emacs 30. Comments welcome :-)
>
> Sorry for not chiming in when this discussion was still ongoing, and
> thank you for your work on the Kubernetes integration.  I use it a lot.
>
> Would it be possible the reconsider adding an optional namespace to
> Tramp's Kubernetes file name syntax?  I'm thinking of something like
> "/kubernetes:[CONTAINER.]POD[.NAMESPACE]:/...".

Possible. However, the syntax is ambiguous. If we have "/kubernetes:name1.name2:/..."
it isn't clear what they are. name1 could be a container, and name2 a pod. Or
name1 is a pod, and name2 is a namespace. Could we agree on another
delimiter between POD and NAMESPACE?

> My use case is that I want to start Dired for a (container in a) pod in
> another namespace.  I can almost get there if I temporarily bind
> tramp-kubernetes-namespace around the call to dired, but the binding
> doesn't carry on to subsequent operations in the Dired buffer.  So an
> explicit namespace in default-directory could help, I think.

I see, it makes sense. My practical kubernetes experience is sparse; I
would exploit you while implementing. At least for tests.

Note also, that Emacs 30 is in pretest. Any such feature change will be
targeted to Emacs 31 / Tramp 2.8.

> Best,
>
> Eshel

Best regards, Michael.




This bug report was last modified 302 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.