[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59797: 30.0.50; [wishlist] Using namespaces in Tramp's kubernetes in
From: |
Michael Albinus |
Subject: |
bug#59797: 30.0.50; [wishlist] Using namespaces in Tramp's kubernetes integration |
Date: |
Wed, 24 Jul 2024 18:48:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Michael Albinus <michael.albinus@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@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.
txtTKrwVBISRM.txt
Description: Text Data