(out-name (format " *kubed-get-%Ss*" resource))
(err-name (format " *kubed-get-%Ss-stderr*" resource))
(dlt-errb (format " *kubed-%Ss-execute-stderr*" resource))
- (cmd-name (intern (format "kubed-display-%S" resource)))
+ (dsp-name (intern (format "kubed-display-%S" resource)))
(edt-name (intern (format "kubed-edit-%S" resource)))
(dlt-name (intern (format "kubed-delete-%Ss" resource)))
(mod-name (intern (format "kubed-%Ss-mode" resource)))
(crt-name (intern (format "kubed-create-%S" resource)))
+ (map-name (intern (format "kubed-%S-prefix-map" resource)))
(crt-spec nil)
(namespaced t)
(keyword nil))
(if multi split (car split)))))
,(if namespaced
- `(defun ,cmd-name (,resource &optional k8sns)
+ `(defun ,dsp-name (,resource &optional k8sns)
,(format "Display Kubernetes %S %s."
resource (upcase (symbol-name resource)))
(interactive (if kubed-all-namespaces-mode
(,read-nms "Display")
(list (,read-fun "Display"))))
(display-buffer (,desc-fun ,resource k8sns)))
- `(defun ,cmd-name (,resource)
+ `(defun ,dsp-name (,resource)
,(format "Display Kubernetes %S %s."
resource (upcase (symbol-name resource)))
(interactive (list (,read-fun "Display")))
,(format "List Kubernetes %Ss." resource)
(interactive)
(,sure-fun)
- (pop-to-buffer (,buff-fun ,list-var))))))
+ (pop-to-buffer (,buff-fun ,list-var)))
+
+ (defvar-keymap ,map-name
+ :doc ,(format "Prefix keymap for Kubed %s commands."
+ (symbol-name resource))
+ :prefix ',map-name
+ "l" #',list-cmd
+ "c" #',crt-name
+ "e" #',edt-name
+ "d" #',dlt-name
+ "g" #',dsp-name))))
(defvar tramp-kubernetes-namespace)
;;;###autoload (autoload 'kubed-delete-pods "kubed" nil t)
;;;###autoload (autoload 'kubed-list-pods "kubed" nil t)
;;;###autoload (autoload 'kubed-create-pod "kubed" nil t)
+;;;###autoload (autoload 'kubed-pod-prefix-map "kubed" nil t 'keymap)
(kubed-define-resource pod
((phase ".status.phase" 10) (starttime ".status.startTime" 20))
(dired "C-d" "Start Dired in home directory of first container of"
;;;###autoload (autoload 'kubed-delete-namespaces "kubed" nil t)
;;;###autoload (autoload 'kubed-list-namespaces "kubed" nil t)
;;;###autoload (autoload 'kubed-create-namespace "kubed" nil t)
+;;;###autoload (autoload 'kubed-namespace-prefix-map "kubed" nil t 'keymap)
(kubed-define-resource namespace
((phase ".status.phase" 10)
(creationtimestamp ".metadata.creationTimestamp" 20))
;;;###autoload (autoload 'kubed-delete-persistentvolumes "kubed" nil t)
;;;###autoload (autoload 'kubed-list-persistentvolumes "kubed" nil t)
;;;###autoload (autoload 'kubed-create-persistentvolume "kubed" nil t)
+;;;###autoload (autoload 'kubed-persistentvolume-prefix-map "kubed" nil t 'keymap)
(kubed-define-resource persistentvolume () :namespaced nil)
;;;###autoload (autoload 'kubed-display-service "kubed" nil t)
;;;###autoload (autoload 'kubed-delete-services "kubed" nil t)
;;;###autoload (autoload 'kubed-list-services "kubed" nil t)
;;;###autoload (autoload 'kubed-create-service "kubed" nil t)
+;;;###autoload (autoload 'kubed-service-prefix-map "kubed" nil t 'keymap)
(kubed-define-resource service)
;;;###autoload (autoload 'kubed-display-secret "kubed" nil t)
;;;###autoload (autoload 'kubed-delete-secrets "kubed" nil t)
;;;###autoload (autoload 'kubed-list-secrets "kubed" nil t)
;;;###autoload (autoload 'kubed-create-secret "kubed" nil t)
+;;;###autoload (autoload 'kubed-secret-prefix-map "kubed" nil t 'keymap)
(kubed-define-resource secret
((type ".type" 32) (creationtimestamp ".metadata.creationTimestamp" 20)))
;;;###autoload (autoload 'kubed-delete-jobs "kubed" nil t)
;;;###autoload (autoload 'kubed-list-jobs "kubed" nil t)
;;;###autoload (autoload 'kubed-create-job "kubed" nil t)
+;;;###autoload (autoload 'kubed-job-prefix-map "kubed" nil t 'keymap)
(kubed-define-resource job
((status ".status.conditions[0].type" 10) (starttime ".status.startTime" 20)))
;;;###autoload (autoload 'kubed-delete-deployments "kubed" nil t)
;;;###autoload (autoload 'kubed-list-deployments "kubed" nil t)
;;;###autoload (autoload 'kubed-create-deployment "kubed" nil t)
+;;;###autoload (autoload 'kubed-deployment-prefix-map "kubed" nil t 'keymap)
(kubed-define-resource deployment
((reps ".status.replicas" 4
(lambda (l r) (< (string-to-number l) (string-to-number r)))
;;;###autoload (autoload 'kubed-delete-replicasets "kubed" nil t)
;;;###autoload (autoload 'kubed-list-replicasets "kubed" nil t)
;;;###autoload (autoload 'kubed-create-replicaset "kubed" nil t)
+;;;###autoload (autoload 'kubed-replicateset-prefix-map "kubed" nil t 'keymap)
(kubed-define-resource replicaset
((reps ".status.replicas" 4
(lambda (l r) (< (string-to-number l) (string-to-number r)))
;;;###autoload (autoload 'kubed-delete-statefulsets "kubed" nil t)
;;;###autoload (autoload 'kubed-list-statefulsets "kubed" nil t)
;;;###autoload (autoload 'kubed-create-statefulset "kubed" nil t)
+;;;###autoload (autoload 'kubed-statefulset-prefix-map "kubed" nil t 'keymap)
(kubed-define-resource statefulset
((reps ".status.replicas" 4
(lambda (l r) (< (string-to-number l) (string-to-number r)))