:prefix ("L" #'kubed-logs
"F" #'kubed-forward-port-to-pod)
(dired "C-d" "Start Dired in home directory of first container of"
- ;; FIXME: This doesn't really make sense for other namespaces,
- ;; we create the Dired buffer using the correct namespace, but
- ;; all subsequent operations in that buffer are outside the
- ;; scope of the let-binding and thus use the wrong namespace.
- ;; Ideally, we'd like to hardcode the namespace into filename.
- ;; There's work in progress towards enabling that in bug#59797.
- (let ((tramp-kubernetes-namespace k8sns))
- (dired (concat "/kubernetes:" pod ":"))))
+ (let ((ns (when k8sns (concat "%" k8sns))))
+ (dired (concat "/kubernetes:" pod ns ":"))))
(shell "s" "Start shell in home directory of first container of"
- (let ((tramp-kubernetes-namespace k8sns)
- (default-directory (concat "/kubernetes:" pod ":")))
+ (let* ((ns (when k8sns (concat "%" k8sns)))
+ (default-directory (concat "/kubernetes:" pod ns ":")))
(shell (format "*kubed-pod-%s-shell*" pod))))
(logs "l" "Show logs for a container of"
(kubed-logs pod (kubed-read-container pod "Container" t k8sns)))