forked from derailed/k9s
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for resource recommendations using Robusta KRR (derailed#…
…2399) * Adding Robusta KRR as a K9s plugin * Fixed file extension * Updated details for simplicity * Updated Author and dependency details
- Loading branch information
1 parent
5ccef94
commit e123466
Showing
2 changed files
with
39 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
plugins: | ||
# Author: Daniel Rubin | ||
# Get recommendations for CPU/Memory requests and limits using Robusta KRR | ||
# Requires Prometheus in the Cluster and Robusta KRR (https://github.com/robusta-dev/krr) on your system | ||
# Open K9s in deployments/daemonsets/statefulsets view, then: | ||
# Shift-K to get recommendations | ||
krr: | ||
shortCut: Shift-K | ||
description: Get krr | ||
scopes: | ||
- deployments | ||
- daemonsets | ||
- statefulsets | ||
command: bash | ||
background: false | ||
confirm: false | ||
args: | ||
- -c | ||
- | | ||
LABELS=$(kubectl get $RESOURCE_NAME $NAME -n $NAMESPACE --context $CONTEXT --show-labels | awk '{print $NF}' | awk '{if(NR>1)print}') | ||
krr simple --cluster $CONTEXT --selector $LABELS | ||
echo "Press 'q' to exit" | ||
while : ; do | ||
read -n 1 k <&1 | ||
if [[ $k = q ]] ; then | ||
break | ||
fi | ||
done |