From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#59797: 30.0.50; [wishlist] Using namespaces in Tramp's kubernetes integration Date: Tue, 23 Jul 2024 14:29:34 +0200 Message-ID: <87ttggnvf5.fsf@gmx.de> References: <87wn78lu7n.fsf@gmx.de> <874ju96e2g.fsf@gmx.de> <87bkogr2e5.fsf@gmx.de> <87y1kaq7ty.fsf@gmx.de> Reply-To: Michael Albinus Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5572"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Aaron Gonzales , 59797@debbugs.gnu.org, Filipp Gunbin , Warren Lynn To: Eshel Yaron Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 23 14:30:14 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sWEek-0001LV-Fs for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Jul 2024 14:30:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWEeY-000627-CQ; Tue, 23 Jul 2024 08:30:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sWEeU-00061M-JE for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2024 08:29:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sWEeU-0006nJ-AQ for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2024 08:29:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sWEeY-0005R3-LB for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2024 08:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Jul 2024 12:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59797 X-GNU-PR-Package: emacs Original-Received: via spool by 59797-submit@debbugs.gnu.org id=B59797.172173779920864 (code B ref 59797); Tue, 23 Jul 2024 12:30:02 +0000 Original-Received: (at 59797) by debbugs.gnu.org; 23 Jul 2024 12:29:59 +0000 Original-Received: from localhost ([127.0.0.1]:59433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWEeU-0005QR-PG for submit@debbugs.gnu.org; Tue, 23 Jul 2024 08:29:59 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:56505) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWEeS-0005Q9-DM for 59797@debbugs.gnu.org; Tue, 23 Jul 2024 08:29:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1721737779; x=1722342579; i=michael.albinus@gmx.de; bh=M/y5yyg9Q9EA5GW0HiisNaGaKichJfMnIkaL/DMpb8k=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=hjisDdDXUE7U5kelBqfyp7/Y9FYdv/wkEz4byVaenCxxFjJtowDnQbisFeH27S9A 8Byinb/b2cBiTKcfeVCdd+NRqHSl38xk2FrdbaWRuwSzuMQCL7NElaodMVJMk8cys PKXostpJUX0sUtwwUscP4FOAmxnsr2SgAsHZEThVWhALhEOmBuVL/RVO43F8QSW8f m4qOms7cWZ0bVgeIq6Dep1IavhPwYsMBgbAH0BFC/QvBqr8xD9TXMQcqIKHmbtD85 HgeOzDv8E+mwzYXsFisFu+xFCX9I5N7mtlmJjNN+uvK+175cVYjFuaf8czZSjDKJ7 G/Vo2yDQkEEcE9VRFA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N2DxE-1sJUiL2KJK-00quiR; Tue, 23 Jul 2024 14:29:39 +0200 In-Reply-To: (Eshel Yaron's message of "Tue, 23 Jul 2024 13:20:11 +0200") X-Provags-ID: V03:K1:CfkHu2S78/5ZHa78xXQG2gQBJ5hfg9wb5JlnQO2NzuTtDbS9s7v wZNsRIFX9VdutTcPnb50oo1DgQZKSBKXNqzQep4Iu5w5ysB/971Yr6fHEBJmpj4c4K2Cwis azkrjkfTE1v1uFYT464ZQiA2NtgyUrlU7ncnQvn0U+eBMds2MGD2rwgYU6MYq+A5uzwVvKP kO3b4YVVZ/2q6Q8EPlKbg== UI-OutboundReport: notjunk:1;M01:P0:dlnDuJEZ6Tw=;BdwQoPHH++OeskI24duw0N/y8SS RjvFqDP4VrW+Znv4sBVzU7lCVWaA5sNr6AtRl/IYsBikOpFq2W6wXHcAOOzETmiclzwUYViQp Kbqn/tqTixLYb2QbIs8DgvxigqasdDf+nKucFVPnsytg6VxwepW0ip/4TPTS4YwYXON3nziuB yBdHugr0QleYMgY93r9ElLQjHSSUOgnq/F7rJ6lHuVyp3WJVdJW7+LEnH4UQhjMkMpB4r3/Du o1TnogXS/siNNw/6Rnx/yLW+v4ki6+P3IOY5Q0KSDCMDcMHhW+A8BQyNzRo7RtY65NZKf/6jl LNGV/oluBPssNACRe1Ta+ng2Sw+NIvqR5kFF8dQ4T3okwCqr3vFCGtYh5qVHmB7/y11ZFevkw YAvX3A+H3UqJtLaOO2BlDdSm2if60RPRY2jBLOk+p5Wk1yZUQJA6rdYjXInMA4ACX48BnBbAe JMpxYfjuM43uTb4JQiE4OEXAlr26A2xyVQc+MucLYtrl6u+3o79fWlvI32RInf1FzvivT2l0n gOoI3sDscz0yz4K+q4Gf2JgKTfWniaK7ktUl3MXe0dcvto1QzgnhheclhnFxC5Dp+e73MPC/W reIPr6GFIhZ+71c799Pe/m80Ke/AhJdWaVApAe/E6DOxbWe7+Az3pHb7joOm4sCT0tlgr0l9z HJeNGZPj2XaJDcSOkYBKeL/rB7P+AOU7EAM+FspLbN9a2vRR7UvheXYxTMiK/iCe4xE4Qp8Wj ZWauPVjxeJJr8O4Uj4WUg/l//FPwmbMvk9gFwARWg3ezrOw/p+vyBnGSIiBZ80bfKzKNDji4 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289163 Archived-At: Eshel Yaron writes: > Hi Michael, Hi Eshel, > Michael Albinus 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 "..svc.cluster.local"= . >> Should'nt we support this? It means should we allow to access kubernete= s >> 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 targe= t >> 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.