From: Eshel Yaron Date: Tue, 23 Jul 2024 15:57:17 +0000 (+0200) Subject: ; * lisp/net/kubed.el (kubed-create): DRY X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f9c710047c4f25030cad06ec9d6ac32e576b3932;p=emacs.git ; * lisp/net/kubed.el (kubed-create): DRY --- diff --git a/lisp/net/kubed.el b/lisp/net/kubed.el index 64a887076cd..f36ebae9b23 100644 --- a/lisp/net/kubed.el +++ b/lisp/net/kubed.el @@ -1005,12 +1005,13 @@ completion candidates." "Create Kubernetes resource of kind KIND with definition DEFINITION." (interactive (list (kubed-read-resource-definition-file-name))) - (message "Creating Kubernetes %s with definition `%s'..." (or kind "resource") definition) - (message "Creating Kubernetes %s with definition `%s'... Done. New %s name is `%s'." - (or kind "resource") definition (or kind "resource") - (car (process-lines kubed-kubectl-executable - "create" "-f" (expand-file-name definition) - "-o" "jsonpath={.metadata.name}")))) + (let ((kind (or kind "resource"))) + (message "Creating Kubernetes %s with definition `%s'..." kind definition) + (message "Creating Kubernetes %s with definition `%s'... Done. New %s name is `%s'." + kind definition kind + (car (process-lines kubed-kubectl-executable + "create" "-f" (expand-file-name definition) + "-o" "jsonpath={.metadata.name}"))))) (defun kubed-pod-containers (pod &optional k8sns) "Return list of containers in Kubernetes pod POD in namespace K8SNS."