]> git.eshelyaron.com Git - kubed.git/commitdiff
Fix 'kubed-list-delete-marked' in non-default context
authorEshel Yaron <me@eshelyaron.com>
Tue, 14 Jan 2025 17:44:31 +0000 (18:44 +0100)
committerEshel Yaron <me@eshelyaron.com>
Tue, 14 Jan 2025 17:44:31 +0000 (18:44 +0100)
* kubed.el (kubed-list-delete-marked): Respect
'kubed-list-context' and 'kubed-list-namespace'.

Fixes https://github.com/eshelyaron/kubed/issues/9

kubed.el

index 4352c92ec653902207fb5f44ad50c931d138f5af..7a0aa8e70cb5dbffe9e50192d832c06c2ac837c7 100644 (file)
--- a/kubed.el
+++ b/kubed.el
@@ -767,9 +767,14 @@ regardless of QUIET."
             (make-process
              :name "*kubed-list-delete-marked*"
              :stderr errb
-             :command (append
-                       (list kubed-kubectl-program "delete" kubed-list-type)
-                       delete-list)
+             :command (cons kubed-kubectl-program
+                            (append
+                             (when kubed-list-context
+                               (list "--context" kubed-list-context))
+                             (when kubed-list-namespace
+                               (list "--namespace" kubed-list-namespace))
+                             (list "delete" kubed-list-type)
+                             delete-list))
              :sentinel (lambda (_proc status)
                          (cond
                           ((string= status "finished\n")