From b0016aa36ad9bff43d4a58b339d5a7061af441ec Mon Sep 17 00:00:00 2001 From: tomhalo Date: Sun, 13 Oct 2024 13:01:36 +0300 Subject: [PATCH] Adding eks-node-viewer plugin --- plugins/eks-node-viewer.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 plugins/eks-node-viewer.yaml diff --git a/plugins/eks-node-viewer.yaml b/plugins/eks-node-viewer.yaml new file mode 100644 index 0000000000..4b04db0d00 --- /dev/null +++ b/plugins/eks-node-viewer.yaml @@ -0,0 +1,15 @@ +# plugin to easily open eks-node-viewer on viewed context +# requires eks-node-viewer installed on system +# https://github.com/awslabs/eks-node-viewer/ +plugins: + eks-node-viewer: + shortCut: Shift-X + description: "eks-node-viewer" + scopes: + - node + background: false + command: bash + args: + - -c + - | + env $(kubectl config view --context $CONTEXT --minify -o json | jq -r ".users[0].user.exec.env[] | select(.name == \"AWS_PROFILE\") | \"AWS_PROFILE=\" + .value" && kubectl config view --context $CONTEXT --minify -o json | jq -r ".users[0].user.exec.args | \"AWS_REGION=\" + .[1]") eks-node-viewer --context $CONTEXT --resources cpu,memory --extra-labels karpenter.sh/nodepool,eks-node-viewer/node-age --node-sort=creation=dsc