,(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)
(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."
(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))
(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))
(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))
(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))
"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))
(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)
(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)
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)
(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."