jinnovation / kele.el

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

Menu bar: namespace-switching: fall back to verbatim completion when don't have namespace listing privileges #182

Open jinnovation opened 3 months ago

jinnovation commented 3 months ago

Overview

In #181 we fixed namespace completion for situations in which the user does not have permission to list namespaces. We need to do something similar for the menu bar.

image

For the menu bar, when the user doesn't have namespace-list permission, we should also provide an option for user to simply enter the namespace verbatim that they'd like to switch to.

jinnovation commented 3 months ago

We should do this in a way that does not require menu-bar-update-hook to spin up a proxy server every single time it runs.

This means caching can-i values.

jinnovation commented 3 months ago

caching can-i values

Can we use something like skeeto/emacs-memoize to handle caching? For can-i auth and other use cases in general.

For example, this could allow us to do away w/ the "create a specialized cache var" pattern we've been doing for stuff like namespace caching to date.