GNU bug report logs -
#59797
30.0.50; [wishlist] Using namespaces in Tramp's kubernetes integration
Previous Next
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59797 in the body.
You can then email your comments to 59797 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
fgunbin <at> fastmail.fm, bug-gnu-emacs <at> gnu.org
:
bug#59797
; Package
emacs
.
(Sat, 03 Dec 2022 09:21:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Michael Albinus <michael.albinus <at> gmx.de>
:
New bug report received and forwarded. Copy sent to
fgunbin <at> fastmail.fm, bug-gnu-emacs <at> gnu.org
.
(Sat, 03 Dec 2022 09:21:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
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?
Best regards, Michael.
In GNU Emacs 30.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version
3.24.34, cairo version 1.17.6) of 2022-11-29 built on gandalf
Repository revision: 7939184f8e0370e7a3397d492812c6d202c2a193
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12201005
System Description: Fedora Linux 37 (Workstation Edition)
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LIBOTF LIBSELINUX LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG
RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM
XINPUT2 XPM GTK3 ZLIB
Important settings:
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8
Major mode: Lisp Interaction
Minor modes in effect:
display-time-mode: t
shell-dirtrack-mode: t
delete-selection-mode: t
icomplete-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
column-number-mode: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
/home/albinus/src/elpa/packages/debbugs/debbugs hides /home/albinus/.emacs.d/elpa/debbugs-0.34/debbugs
/home/albinus/src/elpa/packages/debbugs/debbugs-org hides /home/albinus/.emacs.d/elpa/debbugs-0.34/debbugs-org
/home/albinus/src/elpa/packages/debbugs/debbugs-gnu hides /home/albinus/.emacs.d/elpa/debbugs-0.34/debbugs-gnu
/home/albinus/src/elpa/packages/debbugs/debbugs-guix hides /home/albinus/.emacs.d/elpa/debbugs-0.34/debbugs-guix
/home/albinus/src/elpa/packages/debbugs/debbugs-browse hides /home/albinus/.emacs.d/elpa/debbugs-0.34/debbugs-browse
/home/albinus/src/elpa/packages/debbugs/debbugs-pkg hides /home/albinus/.emacs.d/elpa/debbugs-0.34/debbugs-pkg
/home/albinus/src/elpa/packages/debbugs/debbugs-autoloads hides /home/albinus/.emacs.d/elpa/debbugs-0.34/debbugs-autoloads
/home/albinus/src/elpa/packages/debbugs/debbugs-compat hides /home/albinus/.emacs.d/elpa/debbugs-0.34/debbugs-compat
/home/albinus/src/tramp/lisp/tramp-sh hides /home/albinus/.emacs.d/elpa/tramp-2.5.3.3/tramp-sh
/home/albinus/src/tramp/lisp/tramp-compat hides /home/albinus/.emacs.d/elpa/tramp-2.5.3.3/tramp-compat
/home/albinus/src/tramp/lisp/tramp hides /home/albinus/.emacs.d/elpa/tramp-2.5.3.3/tramp
/home/albinus/src/tramp/lisp/tramp-rclone hides /home/albinus/.emacs.d/elpa/tramp-2.5.3.3/tramp-rclone
/home/albinus/src/tramp/lisp/tramp-cmds hides /home/albinus/.emacs.d/elpa/tramp-2.5.3.3/tramp-cmds
/home/albinus/src/tramp/lisp/tramp-gvfs hides /home/albinus/.emacs.d/elpa/tramp-2.5.3.3/tramp-gvfs
/home/albinus/src/tramp/lisp/tramp-uu hides /home/albinus/.emacs.d/elpa/tramp-2.5.3.3/tramp-uu
/home/albinus/src/tramp/lisp/tramp-crypt hides /home/albinus/.emacs.d/elpa/tramp-2.5.3.3/tramp-crypt
/home/albinus/src/tramp/lisp/tramp-integration hides /home/albinus/.emacs.d/elpa/tramp-2.5.3.3/tramp-integration
/home/albinus/src/tramp/lisp/tramp-archive hides /home/albinus/.emacs.d/elpa/tramp-2.5.3.3/tramp-archive
/home/albinus/src/tramp/lisp/tramp-fuse hides /home/albinus/.emacs.d/elpa/tramp-2.5.3.3/tramp-fuse
/home/albinus/src/tramp/lisp/tramp-adb hides /home/albinus/.emacs.d/elpa/tramp-2.5.3.3/tramp-adb
/home/albinus/src/tramp/lisp/trampver hides /home/albinus/.emacs.d/elpa/tramp-2.5.3.3/trampver
/home/albinus/src/tramp/lisp/tramp-ftp hides /home/albinus/.emacs.d/elpa/tramp-2.5.3.3/tramp-ftp
/home/albinus/src/tramp/lisp/tramp-smb hides /home/albinus/.emacs.d/elpa/tramp-2.5.3.3/tramp-smb
/home/albinus/src/tramp/lisp/tramp-cache hides /home/albinus/.emacs.d/elpa/tramp-2.5.3.3/tramp-cache
/home/albinus/src/tramp/lisp/tramp-sudoedit hides /home/albinus/.emacs.d/elpa/tramp-2.5.3.3/tramp-sudoedit
/home/albinus/src/tramp/lisp/tramp-sshfs hides /home/albinus/.emacs.d/elpa/tramp-2.5.3.3/tramp-sshfs
/home/albinus/src/tramp/lisp/tramp-loaddefs hides /home/albinus/.emacs.d/elpa/tramp-2.5.3.3/tramp-loaddefs
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme-autoloads hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme-autoloads
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme
/home/albinus/src/elpa/packages/tramp-theme/tramp-theme-pkg hides /home/albinus/.emacs.d/elpa/tramp-theme-0.2/tramp-theme-pkg
/home/albinus/src/tramp/lisp/tramp-sh hides /usr/local/share/emacs/site-lisp/tramp-sh
/home/albinus/src/tramp/lisp/tramp-cmds hides /usr/local/share/emacs/site-lisp/tramp-cmds
/home/albinus/src/tramp/lisp/tramp-gvfs hides /usr/local/share/emacs/site-lisp/tramp-gvfs
/home/albinus/src/tramp/lisp/tramp-ftp hides /usr/local/share/emacs/site-lisp/tramp-ftp
/home/albinus/src/tramp/lisp/tramp-crypt hides /usr/local/share/emacs/site-lisp/tramp-crypt
/home/albinus/src/tramp/lisp/tramp-adb hides /usr/local/share/emacs/site-lisp/tramp-adb
/home/albinus/src/tramp/lisp/tramp hides /usr/local/share/emacs/site-lisp/tramp
/home/albinus/src/tramp/lisp/tramp-cache hides /usr/local/share/emacs/site-lisp/tramp-cache
/home/albinus/src/tramp/lisp/tramp-rclone hides /usr/local/share/emacs/site-lisp/tramp-rclone
/home/albinus/src/tramp/lisp/tramp-compat hides /usr/local/share/emacs/site-lisp/tramp-compat
/home/albinus/src/tramp/lisp/tramp-integration hides /usr/local/share/emacs/site-lisp/tramp-integration
/home/albinus/src/tramp/lisp/tramp-archive hides /usr/local/share/emacs/site-lisp/tramp-archive
/home/albinus/src/tramp/lisp/tramp-sudoedit hides /usr/local/share/emacs/site-lisp/tramp-sudoedit
/home/albinus/src/tramp/lisp/tramp-loaddefs hides /usr/local/share/emacs/site-lisp/tramp-loaddefs
/home/albinus/src/tramp/lisp/tramp-uu hides /usr/local/share/emacs/site-lisp/tramp-uu
/home/albinus/src/tramp/lisp/tramp-smb hides /usr/local/share/emacs/site-lisp/tramp-smb
/home/albinus/src/tramp/lisp/trampver hides /usr/local/share/emacs/site-lisp/trampver
/home/albinus/.emacs.d/elpa/auth-source-pass-20210210.1908/auth-source-pass hides /home/albinus/src/emacs/lisp/auth-source-pass
/home/albinus/.emacs.d/elpa/transient-20221119.1503/transient hides /home/albinus/src/emacs/lisp/transient
/home/albinus/src/tramp/lisp/tramp-sh hides /home/albinus/src/emacs/lisp/net/tramp-sh
/home/albinus/src/tramp/lisp/tramp-fuse hides /home/albinus/src/emacs/lisp/net/tramp-fuse
/home/albinus/src/tramp/lisp/tramp-cmds hides /home/albinus/src/emacs/lisp/net/tramp-cmds
/home/albinus/src/tramp/lisp/tramp-container hides /home/albinus/src/emacs/lisp/net/tramp-container
/home/albinus/src/tramp/lisp/tramp-gvfs hides /home/albinus/src/emacs/lisp/net/tramp-gvfs
/home/albinus/src/tramp/lisp/tramp-ftp hides /home/albinus/src/emacs/lisp/net/tramp-ftp
/home/albinus/src/tramp/lisp/tramp-crypt hides /home/albinus/src/emacs/lisp/net/tramp-crypt
/home/albinus/src/tramp/lisp/tramp-adb hides /home/albinus/src/emacs/lisp/net/tramp-adb
/home/albinus/src/tramp/lisp/tramp hides /home/albinus/src/emacs/lisp/net/tramp
/home/albinus/src/tramp/lisp/tramp-cache hides /home/albinus/src/emacs/lisp/net/tramp-cache
/home/albinus/src/tramp/lisp/tramp-rclone hides /home/albinus/src/emacs/lisp/net/tramp-rclone
/home/albinus/src/tramp/lisp/tramp-compat hides /home/albinus/src/emacs/lisp/net/tramp-compat
/home/albinus/src/tramp/lisp/tramp-integration hides /home/albinus/src/emacs/lisp/net/tramp-integration
/home/albinus/src/tramp/lisp/tramp-archive hides /home/albinus/src/emacs/lisp/net/tramp-archive
~/lisp/dbus hides /home/albinus/src/emacs/lisp/net/dbus
/home/albinus/src/tramp/lisp/tramp-sudoedit hides /home/albinus/src/emacs/lisp/net/tramp-sudoedit
/home/albinus/src/tramp/lisp/tramp-loaddefs hides /home/albinus/src/emacs/lisp/net/tramp-loaddefs
/home/albinus/src/tramp/lisp/tramp-uu hides /home/albinus/src/emacs/lisp/net/tramp-uu
/home/albinus/src/tramp/lisp/tramp-sshfs hides /home/albinus/src/emacs/lisp/net/tramp-sshfs
/home/albinus/src/tramp/lisp/tramp-smb hides /home/albinus/src/emacs/lisp/net/tramp-smb
/home/albinus/src/tramp/lisp/trampver hides /home/albinus/src/emacs/lisp/net/trampver
Features:
(shadow sort mail-extr emacsbug pop3 utf-7 nndraft nnmh nnml
network-stream nsm gnus-agent gnus-srvr gnus-score score-mode nnvirtual
gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig
gnus-cache gnus-sum shr pixel-fill kinsoku url-file svg dom nnnil
smtpmail gnus-demon nntp gnus-group gnus-undo gnus-start gnus-dbus dbus
xml gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int
gnus-range message sendmail yank-media puny rfc822 mml mml-sec epa
derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader
gnus-win gnus nnheader gnus-util text-property-search mail-utils range
mm-util mail-prsvr face-remap ob-shell ob ob-tangle ol org-src ob-ref
ob-lob ob-table ob-exp ob-comint ob-core ob-eval org-keys oc org-compat
advice org-macs vc vc-dispatcher time tramp-cache time-stamp tramp-sh
lxd-tramp lxc-tramp tramp tramp-loaddefs trampver tramp-integration
cus-edit pp cus-load wid-edit files-x tramp-compat rx warnings icons
shell pcomplete comint ansi-osc ansi-color ring parse-time iso8601
time-date ls-lisp format-spec delsel ido jka-compr icomplete dired
dired-loaddefs debbugs-autoloads
recentf-remove-sudo-tramp-prefix-autoloads relint-autoloads
transient-autoloads markdown-mode-autoloads direnv-autoloads
alert-autoloads dired-rsync-autoloads dockerfile-mode-autoloads
auth-source-xoauth2-autoloads yaml-mode-autoloads
auto-virtualenv-autoloads flycheck-autoloads projectile-autoloads
f-autoloads ghub-autoloads compat-autoloads xr-autoloads
pylint-autoloads dash-autoloads clojure-mode-autoloads envrc-autoloads
helm-autoloads helm-core-autoloads async-autoloads info
jarchive-autoloads package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv
bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip
cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process
emacs)
Memory information:
((conses 16 184847 16944)
(symbols 48 20233 0)
(strings 32 65431 4443)
(string-bytes 1 2209670)
(vectors 16 35283)
(vector-slots 8 400831 12797)
(floats 8 251 354)
(intervals 56 323 0)
(buffers 984 12))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59797
; Package
emacs
.
(Mon, 05 Dec 2022 14:06:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 59797 <at> debbugs.gnu.org (full text, mbox):
Hi,
My motivation behind adding limited k8s support to Tramp was to be able
to login into pod. A service is a more high-level abstraction, you
cannot log into service, as there're some particular pods behind it.
From my limited knowledge and experience of k8s, listing pods in the
current namespace is ok. We could add more scenarios when the need
arises.
Filipp
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59797
; Package
emacs
.
(Mon, 05 Dec 2022 15:55:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 59797 <at> debbugs.gnu.org (full text, mbox):
Filipp Gunbin <fgunbin <at> fastmail.fm> writes:
> Hi,
Hi Filipp,
> My motivation behind adding limited k8s support to Tramp was to be able
> to login into pod. A service is a more high-level abstraction, you
> cannot log into service, as there're some particular pods behind it.
> From my limited knowledge and experience of k8s, listing pods in the
> current namespace is ok. We could add more scenarios when the need
> arises.
I don't speak about services in general. I speak about pods.
Imagine, you have "pod1" in your current context, and "pod2" in another
namespace, call it "another-namespace".
"kubectl get pods" shows you "pod1". "kubectl get pods --namespace
another-namespace" shows you "pod2".
"kubectl exec pod1 -it -- /bin/sh" access pod1 in your current
context. This is what we use when we access via remote file name syntax
"/kubernetes:pod1:".
pod2 is not accessible in your current context. But you could apply
"kubectl exec pod2 -it --namespace another-namespace -- /bin/sh". This
is what I mean with remote-file name syntax "/kubernetes:pod1.another-namespace:".
Is this possible?
> Filipp
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59797
; Package
emacs
.
(Tue, 06 Dec 2022 13:57:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 59797 <at> debbugs.gnu.org (full text, mbox):
Hi Michael,
On 05/12/2022 16:54 +0100, Michael Albinus wrote:
>> My motivation behind adding limited k8s support to Tramp was to be able
>> to login into pod. A service is a more high-level abstraction, you
>> cannot log into service, as there're some particular pods behind it.
>> From my limited knowledge and experience of k8s, listing pods in the
>> current namespace is ok. We could add more scenarios when the need
>> arises.
>
> I don't speak about services in general. I speak about pods.
>
> Imagine, you have "pod1" in your current context, and "pod2" in another
> namespace, call it "another-namespace".
>
> "kubectl get pods" shows you "pod1". "kubectl get pods --namespace
> another-namespace" shows you "pod2".
>
> "kubectl exec pod1 -it -- /bin/sh" access pod1 in your current
> context. This is what we use when we access via remote file name syntax
> "/kubernetes:pod1:".
>
> pod2 is not accessible in your current context. But you could apply
> "kubectl exec pod2 -it --namespace another-namespace -- /bin/sh". This
> is what I mean with remote-file name syntax "/kubernetes:pod1.another-namespace:".
>
> Is this possible?
Maybe, and there's "get pods -A" which lists all pods. This will be
limited to current "context" in k8s meaning (covering all namespaces in
it). I could look into this in detail in few weeks, if you'd like me
to. It's quite a busy time at work now :-)
Filipp
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59797
; Package
emacs
.
(Tue, 06 Dec 2022 15:14:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 59797 <at> debbugs.gnu.org (full text, mbox):
Filipp Gunbin <fgunbin <at> fastmail.fm> writes:
> Hi Michael,
Hi Filipp,
>> Is this possible?
>
> Maybe, and there's "get pods -A" which lists all pods. This will be
> limited to current "context" in k8s meaning (covering all namespaces in
> it). I could look into this in detail in few weeks, if you'd like me
> to. It's quite a busy time at work now :-)
Take your time. Emacs 29.1 is on its release path, so any feature change
won't be pushed there. We could plan it for Emacs 29.2.
> Filipp
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59797
; Package
emacs
.
(Fri, 23 Jun 2023 19:48:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 59797 <at> debbugs.gnu.org (full text, mbox):
Michael Albinus <michael.albinus <at> gmx.de> writes:
Hi,
>> Maybe, and there's "get pods -A" which lists all pods. This will be
>> limited to current "context" in k8s meaning (covering all namespaces in
>> it). I could look into this in detail in few weeks, if you'd like me
>> to. It's quite a busy time at work now :-)
>
> Take your time. Emacs 29.1 is on its release path, so any feature change
> won't be pushed there. We could plan it for Emacs 29.2.
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 :-)
Best regards, Michael.
Reply sent
to
Michael Albinus <michael.albinus <at> gmx.de>
:
You have taken responsibility.
(Sun, 02 Jul 2023 08:38:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Michael Albinus <michael.albinus <at> gmx.de>
:
bug acknowledged by developer.
(Sun, 02 Jul 2023 08:38:03 GMT)
Full text and
rfc822 format available.
Message #25 received at 59797-done <at> debbugs.gnu.org (full text, mbox):
Version: 30.1
Michael Albinus <michael.albinus <at> gmx.de> writes:
Hi,
> Everything pushed to the Emacs and Tramp master repositories. The target
> is now Tramp 2.7 / Emacs 30. Comments welcome :-)
No further comments, so I'm closing the bug.
Best regards, Michael.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 30 Jul 2023 11:24:15 GMT)
Full text and
rfc822 format available.
bug No longer marked as fixed in versions 30.1 and reopened.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 23 Jul 2024 11:21:02 GMT)
Full text and
rfc822 format available.
bug No longer marked as fixed in versions 30.1 and reopened.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 23 Jul 2024 12:20:01 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
Michael Albinus <michael.albinus <at> gmx.de>
to
control <at> debbugs.gnu.org
.
(Tue, 23 Jul 2024 12:20:02 GMT)
Full text and
rfc822 format available.
bug No longer marked as fixed in versions 30.1 and reopened.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 23 Jul 2024 12:21:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59797
; Package
emacs
.
(Tue, 23 Jul 2024 12:30:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 59797 <at> debbugs.gnu.org (full text, mbox):
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59797
; Package
emacs
.
(Tue, 23 Jul 2024 13:01:01 GMT)
Full text and
rfc822 format available.
Message #41 received at 59797 <at> debbugs.gnu.org (full text, mbox):
Michael Albinus <michael.albinus <at> gmx.de> writes:
> 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?
You're absolutely right. AFAIU from the Kubernetes documentation[0],
non-alphanumeric characters other than "-" and "." should be safe.
Maybe "@" would be the most natural choice? "+" could work too I think.
>> 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.
SGTM.
> Note also, that Emacs 30 is in pretest. Any such feature change will be
> targeted to Emacs 31 / Tramp 2.8.
Of course, that's fine.
Thank you!
[0] https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59797
; Package
emacs
.
(Tue, 23 Jul 2024 14:14:01 GMT)
Full text and
rfc822 format available.
Message #44 received at 59797 <at> debbugs.gnu.org (full text, mbox):
Eshel Yaron <me <at> eshelyaron.com> writes:
Hi Eshel,
>> 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?
>
> You're absolutely right. AFAIU from the Kubernetes documentation[0],
> non-alphanumeric characters other than "-" and "." should be safe.
> Maybe "@" would be the most natural choice? "+" could work too I think.
"@" is already used for the "user <at> host" notation in Tramp. We shouldn't
confuse users with another meaning in parallel. "+" might be OK, let's
start with it. It will be a Lisp constant, we can change it any time
later. So we have "/kubernetes:[CONTAINER.]POD[+NAMESPACE]:/..." now.
(If somebody has another proposal: it's time to stand up)
> Thank you!
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59797
; Package
emacs
.
(Wed, 24 Jul 2024 16:49:01 GMT)
Full text and
rfc822 format available.
Message #47 received at 59797 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Michael Albinus <michael.albinus <at> gmx.de> writes:
Hi Eshel,
>> You're absolutely right. AFAIU from the Kubernetes documentation[0],
>> non-alphanumeric characters other than "-" and "." should be safe.
>> Maybe "@" would be the most natural choice? "+" could work too I think.
>
> "@" is already used for the "user <at> host" notation in Tramp. We shouldn't
> confuse users with another meaning in parallel. "+" might be OK, let's
> start with it. It will be a Lisp constant, we can change it any time
> later. So we have "/kubernetes:[CONTAINER.]POD[+NAMESPACE]:/..." now.
I gave it a first try. It turns out, that "+" is a bad choice, because
it doesn't belong to tramp-host-regexp. I would need to rewrite host
name handling in Tramp just for that, which is not desirable.
tramp-host-regexp is "[%._[:alnum:]-]+". So we could take either "%" or
"_" as namespace delimiter. I've decided for "%"; a complete remote file
name for kubernetes is now "/kubernetes:[CONTAINER.]POD[%NAMESPACE]:/path/to/file".
It works OK acc to my basic tests. I have appended the patch; I would
really appreciate if you could give it more testing in your production
environment. Please sync first with the Emacs or Tramp git repo; this
morning I've pushed other changes there.
What's left is file name completion for namespaces. I'm undecided
whether we need this in practice; let's see how it goes as-it-is.
Best regards, Michael.
[Message part 2 (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59797
; Package
emacs
.
(Wed, 24 Jul 2024 17:31:02 GMT)
Full text and
rfc822 format available.
Message #50 received at 59797 <at> debbugs.gnu.org (full text, mbox):
Hi Michael,
Michael Albinus <michael.albinus <at> gmx.de> writes:
> I gave it a first try. It turns out, that "+" is a bad choice, because
> it doesn't belong to tramp-host-regexp. I would need to rewrite host
> name handling in Tramp just for that, which is not desirable.
>
> tramp-host-regexp is "[%._[:alnum:]-]+". So we could take either "%" or
> "_" as namespace delimiter. I've decided for "%"; a complete remote file
> name for kubernetes is now "/kubernetes:[CONTAINER.]POD[%NAMESPACE]:/path/to/file".
Makes sense. Thank you for tackling it so promptly!
> It works OK acc to my basic tests. I have appended the patch; I would
> really appreciate if you could give it more testing in your production
> environment. Please sync first with the Emacs or Tramp git repo; this
> morning I've pushed other changes there.
From a quick test, this mostly works fine. There's one issue (typo?) in
tramp-kubernetes--namespace that causes a regression when there's no
explicit namespace and tramp-kubernetes-namespace is nil, it returns an
empty string instead of nil.
> What's left is file name completion for namespaces. I'm undecided
> whether we need this in practice; let's see how it goes as-it-is.
It's not very crucial for me, FWIW.
Cheers,
Eshel
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59797
; Package
emacs
.
(Thu, 25 Jul 2024 08:22:01 GMT)
Full text and
rfc822 format available.
Message #53 received at 59797 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eshel Yaron <me <at> eshelyaron.com> writes:
> Hi Michael,
Hi Eshel,
> From a quick test, this mostly works fine. There's one issue (typo?) in
> tramp-kubernetes--namespace that causes a regression when there's no
> explicit namespace and tramp-kubernetes-namespace is nil, it returns an
> empty string instead of nil.
I'fixed this, see appended revised patch. I've changed also the default
value of tramp-kubernetes-namespace to nil; we shouldn't assume that
everybody wants "default" as default.
Could you give it a short test, please?
> Cheers,
>
> Eshel
Best regards, Michael.
[Message part 2 (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59797
; Package
emacs
.
(Thu, 25 Jul 2024 10:49:02 GMT)
Full text and
rfc822 format available.
Message #56 received at 59797 <at> debbugs.gnu.org (full text, mbox):
Michael Albinus <michael.albinus <at> gmx.de> writes:
> I'fixed this, see appended revised patch. I've changed also the default
> value of tramp-kubernetes-namespace to nil; we shouldn't assume that
> everybody wants "default" as default.
Looks good. (I think the custom type of tramp-kubernetes-namespace may
need updating because it currently only permits string values.)
> Could you give it a short test, please?
I tried it with Dired, M-x shell, C-x C-f, remote file name completion,
everything seems to work well!
Thanks,
Eshel
Reply sent
to
Michael Albinus <michael.albinus <at> gmx.de>
:
You have taken responsibility.
(Thu, 25 Jul 2024 11:43:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Michael Albinus <michael.albinus <at> gmx.de>
:
bug acknowledged by developer.
(Thu, 25 Jul 2024 11:43:01 GMT)
Full text and
rfc822 format available.
Message #61 received at 59797-done <at> debbugs.gnu.org (full text, mbox):
Version: 31.1
Eshel Yaron <me <at> eshelyaron.com> writes:
Hi Eshel,
> Looks good. (I think the custom type of tramp-kubernetes-namespace may
> need updating because it currently only permits string values.)
Good catch! I've fixed this.
> I tried it with Dired, M-x shell, C-x C-f, remote file name completion,
> everything seems to work well!
Thanks for the tests! I've pushed the patch to both Emacs and Tramp git
repositories, closing the bug.
> Thanks,
>
> Eshel
Best regards, Michael.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 23 Aug 2024 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 261 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.