[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/kubed 7bc92fb116 43/70: Document resource lists and the
From: |
ELPA Syncer |
Subject: |
[elpa] externals/kubed 7bc92fb116 43/70: Document resource lists and their filters |
Date: |
Tue, 6 Aug 2024 06:58:30 -0400 (EDT) |
branch: externals/kubed
commit 7bc92fb116e98851ef027fbd7cedffacd9c8788c
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eshel Yaron <me@eshelyaron.com>
Document resource lists and their filters
* kubed.texi (Usage): Add anchor for 'kubed-prefix-map'.
(Browsing Resources): Populate.
(List Filter): New node.
---
.gitignore | 1 +
kubed.texi | 138 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 139 insertions(+)
diff --git a/.gitignore b/.gitignore
index 9755de3185..7a6d220a6b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
*~
*.elc
+*.info
kubed-pkg.el
kubed-autoloads.el
diff --git a/kubed.texi b/kubed.texi
index 7bc1621752..6ba2b2442b 100644
--- a/kubed.texi
+++ b/kubed.texi
@@ -130,6 +130,7 @@ The two most important entry points for Kubed are
@cindex prefix keymap, global commands
@cindex keymap, for global commands
@defvr Keymap kubed-prefix-map
+@anchor{Definition of kubed-prefix-map}
Keymap with bindings for many useful Kubed commands.
@end defvr
@@ -179,6 +180,143 @@ The following sections describe in detail the various
Kubed commands.
@node Browsing Resources
@section Browsing Resources
+Kubed gives you an interactive list of resources for each type, that
+you access with the @code{kubed-list-@var{resource}s} commands, such
+as @code{kubed-list-pods} which shows you the list of Kubernetes pods
+in buffer @file{*kubed-pods*}.
+
+These commands are bound to @kbd{l} in Kubed's type-specific prefix
+keymaps, most of which are accessible via the global
+@code{kubed-prefix-map} by default (@pxref{Definition of
+kubed-prefix-map}). So if you've bound @code{kubed-prefix-map} to
+@kbd{C-c k}, you can pop up the pods list with @kbd{C-c k p l}, the
+deployments list with @kbd{C-c k d l}, the namespaces list with
+@kbd{C-c k N l}, etc.
+
+Each resource type has its own major mode for list buffers with
+type-specific commands and operations, but they are all also derived
+from a shared parent mode. The @file{*kubed-pods*} buffer uses the
+@code{kubed-pods-mode} (@samp{Kubernetes Pods}) major mode, the list
+of Kubernetes deployments in buffer @file{*kubed-deployments*} uses
+@code{kubed-deployments-mode}, and so on.
+
+The common parent major mode is @code{kubed-list-mode}:
+
+@deffn {Major Mode} kubed-list-mode
+Major mode for listing generic Kubernetes resources.
+@end deffn
+
+This provides several commands for all type-specific derived modes:
+
+@table @kbd
+@kindex /
+@findex kubed-list-set-filter
+@item /
+Filter the current list of resources (@code{kubed-list-set-filter}).
+@xref{List Filter}.
+@kindex d
+@findex kubed-list-mark-for-deletion
+@item d
+Mark the resource at point for deletion
+(@code{kubed-list-mark-for-deletion}). Resources marked for deletion
+have a @samp{D} in the beginning of their line.
+@kindex u
+@findex kubed-list-unmark
+@item u
+Unmark from resource at point (@code{kubed-list-unmark}).
+@kindex A
+@findex kubed-all-namespaces-mode
+@item A
+Toggle @code{kubed-all-namespaces-mode}. When enabled, resource lists
+for namespaced resource types show resources from all namespaces, not
+just the current namespace.
+@kindex n
+@findex next-line
+@item n
+Move point to the next line (@code{next-line}).
+@kindex p
+@findex previous-line
+@item n
+Move point to the previous line (@code{previous-line}).
+@kindex @key{TAB}
+@findex kubed-list-next-column
+@item @key{TAB}
+Move point to the next column. If point is already at the last
+column, move to the first column of the next line instead
+(@code{kubed-list-next-column}).
+@kindex S-@key{TAB}
+@findex kubed-list-previous-column
+@item S-@key{TAB}
+Move point to the previous column. If point is already at the first
+column, move to the last column of the previous line instead
+(@code{kubed-list-previous-column}).
+@end table
+
+@menu
+* List Filter::
+@end menu
+
+@node List Filter
+@subsection Filtering Resource Lists
+
+In all Kubernetes resource list buffers, you can use @kbd{/}
+(@code{kubed-list-set-filter}) to @dfn{filter} the list of resources.
+This command sets the filter of the current buffer, which specifies
+conditions on resources (lines). Resources that don't satisfy the
+conditions are hidden, so you can focus on those that do.
+
+Filters can be simple (@dfn{atomic filters}) or complex (@dfn{composed
+filters}). In the simple case, you enter a filter in the minibuffer
+in the format @w{@samp{@var{op} @var{col} @var{val}}}, where @var{op}
+is a comparison operator, either @samp{=} or @samp{~}, @var{col} is a
+column name, and @var{val} is a value to compare to values of
+@var{col} with @var{op}.
+
+If @var{op} is @samp{=}, it says to keep only lines whose @code{col}
+equals @var{val}. If @var{op} is @samp{~}, it says to keep lines
+whose @code{col} matches the @var{val} as a regular expression. For
+example, the filter @samp{= Name foobar} keeps only resources whose
+name is @samp{foobar}. To include whitespace in @var{val}, wrap
+@var{val} in double quotes, like so: @samp{= Name "foo bar"}.
+
+You can use more refined filters by composing simple filters. To add
+another filter that resources must satisfy, wrap your two filters in
+parentheses and put them next to each other:
+
+@lisp
+(= Name foobar) (~ Namespace kube)
+@end lisp
+
+@noindent
+This filter keeps only resources whose name is @samp{foobar} in
+namespaces that include @samp{kube} as a substring, it expresses the
+conjunction of the two simple filters.
+
+To negate a simple filter, put a single quote ahead of it, like so:
+
+@lisp
+(= Name foobar) '(~ Namespace kube)
+@end lisp
+
+@noindent
+This matches resources named @samp{foobar} in namespaces that do
+@emph{not} contain @samp{kube}.
+
+To specify a disjunction of simple filters (and negated simple
+filters), add another level of nesting:
+
+@lisp
+((= Name spam) (= Name foobar)) '(~ Namespace kube)
+@end lisp
+
+@noindent
+This filter matches resources named either @samp{spam} or
+@samp{foobar}, in namespaces that do not contain @samp{kube}.
+
+While entering a filter in the minibuffer, @kbd{@key{TAB}} completion
+is available for column names and values. To clear the filter, just
+exit the minibuffer with an empty input.
+
@node Transient Menus
@section Transient Menus
- [elpa] externals/kubed e948eb9335 04/70: ; * kubed.texi (Usage): Populate with a few words., (continued)
- [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
- [elpa] externals/kubed 0c8e314d6f 31/70: ; Fix 'restart' command name in deployments list buffer, ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 9dcc880950 40/70: ; * kubed.el (kubed-list-read-filter): Also complete operators., ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 7bc92fb116 43/70: Document resource lists and their filters,
ELPA Syncer <=
- [elpa] externals/kubed 96dc9b821c 46/70: ; * kubed.texi (Browsing Resources): Tweak wording., ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 999ca10c35 50/70: (cobra-read-command-line): Fix handling of cons INITIAL arg, ELPA Syncer, 2024/08/06
- [elpa] externals/kubed fe844378f0 53/70: ; Add 'kubed-list-copy-as-kill' to context menus, ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 0e2c7c7dd9 54/70: Support bookmarking Kubernetes resource buffers, ELPA Syncer, 2024/08/06
- [elpa] externals/kubed e73a4ee0a4 55/70: Always display message when done updating resources, ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 7a14c155d5 68/70: (Browse Resources): Update common commands table., ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 485eae8409 23/70: Add global menu bar menu, ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 1ee8a943f6 25/70: ; * kubed.texi (Usage): Mention 'kubed-menu-bar-mode'., ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 0923d8031a 28/70: ; * kubed.el (kubed-define-resource): Remove extraneous quote., ELPA Syncer, 2024/08/06
- [elpa] externals/kubed 645845fcac 36/70: Add common parent mode for resource lists mode, ELPA Syncer, 2024/08/06