]> git.eshelyaron.com Git - kubed.git/commit
Fix handling of context names with non-alphanumeric characters
authorEshel Yaron <me@eshelyaron.com>
Tue, 10 Jun 2025 17:04:11 +0000 (19:04 +0200)
committerEshel Yaron <me@eshelyaron.com>
Tue, 10 Jun 2025 17:42:28 +0000 (19:42 +0200)
commit64be034b72f2b2d9c29d609dd0eceda080d9b754
tree112231d187f0e0e6735336f8e535ede06b04724d
parent50f7d4162ddbb73896096cbb7a1892ad327d7010
Fix handling of context names with non-alphanumeric characters

Hex-encode most non-alphanumeric characters in kubectl context names
in Tramp file names.  This allows our Tramp method to work with
context names that contain characters which are not allowed in the
host name part of Tramp file names, such as ':'.

This (hopefully) fixes the issue reported at
https://lists.sr.ht/~eshel/kubed-devel/%3C87ldqz70a6.fsf@gmail.com%3E

* kubed-common.el (kubed-tramp-method): Bump to v2.
* kubed-tramp.el (kubed-tramp--unhex)
(kubed-tramp--decode-context-name)
(kubed-tramp--v2-context): New functions.
(kubed-tramp-context, kubed-tramp-enable): Adjust.
* kubed.el (kubed--hex-encoding-table)
(kubed--hex-allowed-chars-table): New constants.
(kubed--encode-context-name): New function.
(kubed-remote-file-name): Use it.
kubed-common.el
kubed-tramp.el
kubed.el