]> git.eshelyaron.com Git - emacs.git/commitdiff
New command 'kubed-transient-create'
authorEshel Yaron <me@eshelyaron.com>
Wed, 24 Jul 2024 07:55:53 +0000 (09:55 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 24 Jul 2024 07:56:09 +0000 (09:56 +0200)
lisp/net/kubed-transient.el

index 8d47d5f92228e223b1d0186daf1de5a834749802..d53b42223a1d98d507ff0975f79ca2e0395352bd 100644 (file)
   "Prompt with PROMPT for Kubernetes namespace."
   (kubed-read-namespace prompt (kubed-current-namespace)))
 
+(defun kubed-transient-read-resource-definition-file-name
+    (_prompt _initial-input _history)
+  "Read and return Kubernetes resource definition file name."
+  (kubed-read-resource-definition-file-name))
+
+;;;###autoload
+(transient-define-prefix kubed-transient-create ()
+  "Create Kubernetes resource."
+  ["Options"
+   ("-f" "Definition file" "--filename="
+    :reader kubed-transient-read-resource-definition-file-name)]
+  ["Kinds"
+   ("d" "deployment" kubed-transient-create-deployment)
+   ("n" "namespace" kubed-create-namespace)]
+  ["Actions"
+   ("c" "Create" kubed-create)])
+
 ;;;###autoload
 (transient-define-prefix kubed-transient-create-deployment ()
-  "Create deployment."
+  "Create Kubernetes deployment."
   ["Options"
    ("-n" "Namespace" "--namespace="
     :prompt "Namespace" :reader kubed-transient-read-namespace)
@@ -49,8 +66,8 @@
     :prompt "Port to expose: " :reader transient-read-number-N+)
    ("--" "Command" "-- ="
     :prompt "Command: ")]
-  [""
-   ("c" "Create" kubed-create-deployment)])
+  ["Actions"
+   ("c" "Create" kubed-create)])
 
 (provide 'kubed-transient)
 ;;; kubed-transient.el ends here