initial commit

This commit is contained in:
2024-06-11 21:08:44 +02:00
commit d8433ffbd8
391 changed files with 37223 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
# kubernetes
Show the kubernetes current context and namespace in use. This is usefull when you are operating multiple kube clusters and/or namespaces.
![](kubernetes.png)
# Dependencies
*kubectl* must be install and accessible under your *$PATH*
# Config
```
[kubernetes]
command=$SCRIPT_DIR/kubernetes
interval=10
```

View File

@@ -0,0 +1,3 @@
[kubernetes]
command=$SCRIPT_DIR/kubernetes
interval=10

View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
KCONTEXT=$(kubectl config current-context 2>/dev/null)
if [[ $?=="0" ]]; then
CC=$(kubectl config view -ojsonpath='{..current-context}')
KNAMESPACE=$(kubectl config view -ojsonpath="{.Contexts[?(@.Name==\"$CC\")]..namespace}")
echo "☸ $KCONTEXT/$KNAMESPACE ☸"
echo "☸ $KCONTEXT/$KNAMESPACE ☸"
echo \#4040FF # color
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB