jinnovation / kele.el

🥤 Spritzy Kubernetes cluster management for Emacs
https://jonathanj.in/kele.el/
Apache License 2.0
76 stars 4 forks source link

Implement general-purpose annotation function for resources #42

Open jinnovation opened 1 year ago

jinnovation commented 1 year ago

This could display things like:

jinnovation commented 1 year ago

At first glance, this'll primarily require a refinement to kele--fetch-resource-names and/or kele--list-resources.

That is, we can obviate the former by extending the latter to accept a collection of field references to narrow each element in the returned list down to. For example, the following might be used to replicate kele--fetch-resource-names functionality:

(kele--list-resources
  "apps"
  "v1"
  "deployments"
  :namespace "my-namespace"
  :context "my-context"
  :fields '(.metadata.name))
jinnovation commented 3 months ago

This is important now that M-x kele-get implicitly gets across all namespaces by default (see #221). Having e.g. the namespace as an annotation for completion candidates provides helpful context.