"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)
: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