[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/kubed 03c0121c64 18/70: Add argument SILENT to 'kubed-u
From: |
ELPA Syncer |
Subject: |
[elpa] externals/kubed 03c0121c64 18/70: Add argument SILENT to 'kubed-update-RESOURCEs' commands |
Date: |
Tue, 6 Aug 2024 06:58:27 -0400 (EDT) |
branch: externals/kubed
commit 03c0121c64dfe2ba2802e90727d44ce83388927d
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
Add argument SILENT to 'kubed-update-RESOURCEs' commands
* kubed.el (kubed-define-resource): Add optional argument
SILENT to generated 'kubed-update-RESOURCEs' commands. Use
it when update is triggered by user initiated operation.
---
kubed.el | 31 ++++++++++++++++++-------------
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/kubed.el b/kubed.el
index 874a66e7c3..b60e3f5eb9 100644
--- a/kubed.el
+++ b/kubed.el
@@ -290,8 +290,10 @@ Other keyword arguments that go between PROPERTIES and
COMMANDS are:
,(format "Populate `%S', if not already populated." list-var)
(unless (or ,list-var (process-live-p ,proc-var)) (,updt-cmd)))
- (defun ,updt-cmd ()
- ,(format "Update `%S'." list-var)
+ (defun ,updt-cmd (&optional silent)
+ ,(format "Update `%S'.
+Non-nil optional argument SILENT says to inhibit progress messages."
+ list-var)
(interactive)
(when (process-live-p ,proc-var) (delete-process ,proc-var))
(with-current-buffer (get-buffer-create ,out-name)
@@ -373,13 +375,15 @@ Other keyword arguments that go between PROPERTIES and
COMMANDS are:
(setq ,list-var new
,proc-var nil)
(run-hooks ',hook-var)
- (message ,(format "Updated Kubernetes %S." plrl-var))))
+ (unless silent
+ (message ,(format "Updated Kubernetes %S."
plrl-var)))))
((string= status "exited abnormally with code 1\n")
(with-current-buffer ,err-name
(goto-char (point-max))
(insert "\n" status))
(display-buffer ,err-name))))))
- (minibuffer-message ,(format "Updating Kubernetes %S..." plrl-var)))
+ (unless silent
+ (minibuffer-message ,(format "Updating Kubernetes %S..."
plrl-var))))
(defun ,affx-fun (,plrl-var)
,(format "Return Kubernetes %s with completion affixations."
@@ -668,7 +672,7 @@ Optional argument DEFAULT is the minibuffer default
argument." resource)
(symbol-name resource)
" `%s' in namespace `%s'.")
name
space))
- (,updt-cmd))
+ (,updt-cmd t))
((string= status "exited
abnormally with code 1\n")
(with-current-buffer
,dlt-errb
(goto-char (point-max))
@@ -695,7 +699,7 @@ Optional argument DEFAULT is the minibuffer default
argument." resource)
(message (format ,(concat "Deleted
%d marked Kubernetes "
(symbol-name plrl-var) ".")
(length
delete-list)))
- (,updt-cmd))
+ (,updt-cmd t))
((string= status "exited abnormally
with code 1\n")
(with-current-buffer ,dlt-errb
(goto-char (point-max))
@@ -721,7 +725,7 @@ Optional argument DEFAULT is the minibuffer default
argument." resource)
(message (format ,(concat "Deleted %d
marked Kubernetes "
(symbol-name
plrl-var) ".")
(length delete-list)))
- (,updt-cmd))
+ (,updt-cmd t))
((string= status "exited abnormally with
code 1\n")
(with-current-buffer ,dlt-errb
(goto-char (point-max))
@@ -735,7 +739,8 @@ Optional argument DEFAULT is the minibuffer default
argument." resource)
(symbol-name resource))
(interactive (list (kubed-read-resource-definition-file-name
,(symbol-name resource))))
- (kubed-create definition ,(symbol-name resource))))
+ (kubed-create definition ,(symbol-name resource))
+ (,updt-cmd t)))
,@(mapcar
(pcase-lambda (`(,suffix ,_key ,desc . ,body))
@@ -1026,7 +1031,7 @@ Switch to namespace `%s' and proceed?" k8sns))
"create" "namespace" name))
(user-error "Failed to create Kubernetes namespace with name `%s'" name))
(message "Created Kubernetes namespace with name `%s'." name)
- (kubed-update-namespaces))
+ (kubed-update-namespaces t))
(set "s" "Set current namespace to"
(save-excursion
(goto-char (point-min))
@@ -1143,7 +1148,7 @@ optional command to run in the images."
(when command (cons "--" command)))))
(user-error "Failed to create Kubernetes deployment `%s'" name))
(message "Created Kubernetes deployment `%s'." name)
- (kubed-update-deployments)))
+ (kubed-update-deployments t)))
;;;###autoload (autoload 'kubed-display-replicaset "kubed" nil t)
;;;###autoload (autoload 'kubed-edit-replicaset "kubed" nil t)
@@ -1226,7 +1231,7 @@ overrides the default command IMAGE runs."
(when command (cons "--" command)))))
(user-error "Failed to create Kubernetes cronjob `%s'" name))
(message "Created Kubernetes cronjob `%s'." name)
- (kubed-update-cronjobs)))
+ (kubed-update-cronjobs t)))
;;;###autoload (autoload 'kubed-display-ingressclass "kubed" nil t)
;;;###autoload (autoload 'kubed-edit-ingressclass "kubed" nil t)
@@ -1293,7 +1298,7 @@ DEFAULT-BACKEND is the service to use as a backend for
unhandled URLs."
annotations))))
(user-error "Failed to create Kubernetes ingress `%s'" name))
(message "Created Kubernetes ingress `%s'." name)
- (kubed-update-ingresses)))
+ (kubed-update-ingresses t)))
;; TODO: Events may be numerous. Need to only get a few.
;; ;;;###autoload (autoload 'kubed-list-events "kubed" nil t)
@@ -1556,7 +1561,7 @@ providing it with arguments."
(when args (cons "--" args)))))
(user-error "Failed to run image `%s'" image))
(message "Image `%s' is now running in pod `%s'." image pod))
- (kubed-update-pods))
+ (kubed-update-pods t))
(defun kubed-pod-containers (pod &optional k8sns)
"Return list of containers in Kubernetes pod POD in namespace K8SNS."
- [elpa] externals/kubed 22ba7fb525 03/70: ; * kubed.texi (Getting Started): Fix itemization, (continued)
- [elpa] externals/kubed 22ba7fb525 03/70: ; * kubed.texi (Getting Started): Fix itemization, ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 4725515591 05/70: ; Update .gitignore, ELPA Syncer, 2024/08/06
- [elpa] externals/kubed d1efd91fe8 08/70: * kubed.el (deployment): Add useful resource properties, ELPA Syncer, 2024/08/06
- [elpa] externals/kubed c5c03e9024 07/70: * kubed.el (service): Add useful resource properties, ELPA Syncer, 2024/08/06
- [elpa] externals/kubed eaf03ec7e2 09/70: Improve compatibility with Emacs 29, ELPA Syncer, 2024/08/06
- [elpa] externals/kubed d7a4f0d5ab 01/70: Initial commit, ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 524aebf3f6 06/70: ; * kubed.el: Silence warning about 'cobra-read-command-line'., ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 6996279938 11/70: Add context menus to resource list buffers, ELPA Syncer, 2024/08/06
- [elpa] externals/kubed aee9cddd59 13/70: ; Fix 'kubed-kubectl-command' error when 'transient' is not loaded, ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 324fc95325 10/70: ; Don't generate extra nils for non-namespaced resources, ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 03c0121c64 18/70: Add argument SILENT to 'kubed-update-RESOURCEs' commands,
ELPA Syncer <=
- [elpa] externals/kubed e2699427a9 20/70: New command 'kubed-cronjobs-toggle-suspension', ELPA Syncer, 2024/08/06
- [elpa] externals/kubed adbbefb6c2 21/70: ; README.md: Add figure showing help for resource fields, ELPA Syncer, 2024/08/06
- [elpa] externals/kubed e948eb9335 04/70: ; * kubed.texi (Usage): Populate with a few words., ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 38a8f984fb 15/70: ; Teach Imenu about 'kubed-define-resource', ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 2c90213b8e 16/70: ; (kubed-read-resource-field): Pass DEFAULT 'completing-read'., ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 88937ea900 17/70: Add general resource-reading functions, ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 3cc3d54e75 19/70: New commands for patching resources, ELPA Syncer, 2024/08/06
- [elpa] externals/kubed fd653d0458 22/70: ; README.md: Adjust figure., ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 932b0b2e88 24/70: ; * kubed.el (kubed-define-resource): Fix typos, ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 377bcbcbb9 29/70: New command 'kubed-restart-deployment', ELPA Syncer, 2024/08/06