From: Eshel Yaron Date: Wed, 24 Jul 2024 07:55:53 +0000 (+0200) Subject: New command 'kubed-transient-create' X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a1c88029744ecdb23aed66a347a49ecbf01c6cc1;p=emacs.git New command 'kubed-transient-create' --- diff --git a/lisp/net/kubed-transient.el b/lisp/net/kubed-transient.el index 8d47d5f9222..d53b42223a1 100644 --- a/lisp/net/kubed-transient.el +++ b/lisp/net/kubed-transient.el @@ -34,9 +34,26 @@ "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