-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Loading plugins from plugin directory not working as expected #2571
Comments
On macOS, # NO name
shortCut: Shift-T
scopes:
- pods
command: bash
background: false
args:
- -c
- "echo test1" I think this is a bit unintuitive, I think we should read the plugins from |
Thanks for the explanation @wjiec. Regarding |
@norman-zon @wjiec Thank you both for your feedback! I am a bit torn on this deal ;( I think I understood Chris original intent on his PR ie managing plugins as separate files so they can be shared across an organization (via git or other) and may include either out-of-the-box or proprietary customizations. On the other hand, the typical flow (I think) is for a dev is to want to copy the plugins directly for this repo root and dump them into either a file or dirs. It seems we are currently in a no man's land as this repo plugins dir exhibits plugin maps vs plugin snippets. I also think if we were to intro a Does this make any sense? Open for suggestions here if you have other inclines... Thank you! /cc @cwrau |
I'm confused, what's the problem? 🤔
Huh, didn't expect this to be unintuitive, I would've assumed that support for multiple files meant a single plugin per file and the filename would be the plugin name, that's why I did it that way 😅
Not just organizations or proprietary stuff, but every kubernetes tool, backup/database/gitops/..., can put stuff into these folders. It just spawned out of our company's need to share plugins.
Yeah, that's what we'll be doing when we get to it, converting my
I don't remember, I think currently later defined plugins will completely overwrite the earlier definition, right? 🤔
What would such a command do? 🤔 |
@cwrau Thanks for weighting in! Makes sense. Plugins shortcut are indeed overwritten ie last load wins. |
This was a surprise to me too, I only figured it out after seeing this issue. I expected it to work in more of a For anyone else, here is the ansible ended up using to install the - name: Get the k9s cnpg plugin
become: false
run_once: true
local_action:
module: get_url
url: "https://cloudnative-pg.io/documentation/{{cnpg_minor_version}}/samples/k9s/plugins.yml"
dest: "/tmp/cnpg-plugins.yml"
- name: Install k9s cnpg plugin
vars:
plugins: "{{ (lookup('file', '/tmp/cnpg-plugins.yml')|from_yaml).plugins }}"
with_items: "{{ plugins.keys() }}"
copy:
dest: "/usr/share/k9s/plugins/{{item}}.yml"
content: "{{ plugins[item]|to_yaml }}" |
Mh, I can understand that 🤔
Tbh, they should include this file in their packages so the user can install them without hacks like this 😅 |
Yeah, I was thinking about that. Another option could be something like this:
|
Describe the bug
As of this PR (included in >= v0.29) loading plugins from
$XDG_DATA_DIRS/k9s/plugins/
instead of a$XDG_DATA_DIRS/k9s/plugins.yaml
is supposed to work.I can't get it to work though.
To Reproduce
Steps to reproduce the behavior:
$XDG_DATA_DIRS/k9s/plugins/
myplugins1.yaml
and
myplugins2.yaml
:Historical Documents
Interesting that
Plugins: /Users/myuser/.config/k9s/plugins.yaml
is setk9s -l debug
gives no info on plugins failing to loadExpected behavior
Plugins are loaded correctly
Versions:
The text was updated successfully, but these errors were encountered: