feat: add plugin to run `vector top` in vector.dev container, hotkey `h` (#3170)
parent
a8b75ef1e5
commit
0320ba387b
|
|
@ -20,6 +20,7 @@ Following is an example of some plugin files in this directory. Other files are
|
|||
| log_full.yaml | get full logs from pod/container | pods/containers | Ctrl-l | |
|
||||
| resource-recommendations.yaml | View recommendations for CPU/Memory requests based on historical data | deployments/daemonsets/statefulsets | Shift-k | [Robusta KRR](https://github.com/robusta-dev/krr) |
|
||||
| trace-dns.yaml | Trace DNS resolution using Inspektor Gadget (4) | containers/pods/nodes | Shift-d | |
|
||||
| vector-dev-top.yaml | Run `vector top` in vector.dev container | pods/container | h | [vector top](https://vector.dev/highlights/2020-12-23-vector-top/) |
|
||||
|
||||
[1]: https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/#ephemeral-container
|
||||
[2]: https://github.com/nicolaka/netshoot
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
# SPDX-FileCopyrightText: 2025 Robin Schneider <ypid@riseup.net>
|
||||
#
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
plugins:
|
||||
vector-top:
|
||||
# t hotkey is already used for "transfer" by k9s.
|
||||
# Using h because of health.
|
||||
shortCut: h
|
||||
confirm: false
|
||||
description: "Execute `vector top`"
|
||||
scopes:
|
||||
- pods
|
||||
command: sh
|
||||
background: false
|
||||
args:
|
||||
# Both works. I have not read through https://github.com/derailed/k9s/issues/1852 yet.
|
||||
# - -ic
|
||||
- -c
|
||||
- "kubectl exec --context=$CONTEXT --namespace=$NAMESPACE --stdin --tty $NAME -- vector top"
|
||||
|
||||
vector-top-container:
|
||||
# t hotkey is already used for "transfer" by k9s.
|
||||
shortCut: h
|
||||
confirm: false
|
||||
description: "Execute `vector top`"
|
||||
scopes:
|
||||
- containers
|
||||
command: sh
|
||||
background: false
|
||||
args:
|
||||
- -c
|
||||
- "kubectl exec --context=$CONTEXT --namespace=$NAMESPACE --stdin --tty $POD --container=$NAME -- vector top"
|
||||
Loading…
Reference in New Issue