--- /dev/null
+;;; kubed-transient.el --- Kubernetes transient menus -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2024 Eshel Yaron
+
+;; Author: Eshel Yaron <me@eshelyaron.com>
+;; Keywords: tools
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This library extends Kubed with transient menus for various
+;; Kubernetes operations.
+
+;;; Code:
+
+(require 'kubed)
+(require 'transient)
+
+(defclass kubed-transient-infix (transient-infix) ())
+
+(defun kubed-transient-read-namespace (prompt _initial-input _history)
+ "Prompt with PROMPT for Kubernetes namespace."
+ (kubed-read-namespace prompt (kubed-current-namespace)))
+
+;;;###autoload
+(transient-define-prefix kubed-transient-create-deployment ()
+ "Create deployment."
+ ["Options"
+ ("-n" "Namespace" "--namespace="
+ :prompt "Namespace" :reader kubed-transient-read-namespace)
+ ("-r" "Replicas" "--replicas="
+ :prompt "Number of replicas: " :reader transient-read-number-N+)
+ ("-i" "Image" "--image="
+ :prompt "Images to deploy: "
+ :multi-value repeat)
+ ("-p" "Port" "--port="
+ :prompt "Port to expose: " :reader transient-read-number-N+)
+ ("--" "Command" "-- ="
+ :prompt "Command: ")]
+ [""
+ ("c" "Create" kubed-create-deployment)])
+
+(provide 'kubed-transient)
+;;; kubed-transient.el ends here