Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement general-purpose annotation function for resources #42

Open
jinnovation opened this issue Jan 6, 2023 · 2 comments
Open

Implement general-purpose annotation function for resources #42

jinnovation opened this issue Jan 6, 2023 · 2 comments

Comments

@jinnovation
Copy link
Owner

jinnovation commented Jan 6, 2023

This could display things like:

  • The GroupVersion;
  • The Kind;
  • Whether the resource is namespaced
@jinnovation jinnovation converted this from a draft issue Jan 6, 2023
jinnovation added a commit that referenced this issue Jan 9, 2023
…O classes (#46)

Contributes to #45.
Contributes to #42.

There are significant parallels in the mechanisms for kubeconfig +
discovery cache loading and synchronization that we "formalize" here.
Practically speaking, this gives us clean and scalable room to expand,
say, the discovery cache to populate and maintain specialized "views" of
the data without creating variable + method sprawl in the top-level
namespace.
jinnovation added a commit that referenced this issue Jan 21, 2023
@jinnovation
Copy link
Owner Author

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
Copy link
Owner Author

jinnovation commented Jun 9, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant