mirror of
https://github.com/bvanroll/_dotfiles.git
synced 2025-08-29 20:12:42 +00:00
init
This commit is contained in:
17
.config/i3blocks/kubernetes/README.md
Normal file
17
.config/i3blocks/kubernetes/README.md
Normal 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.
|
||||
|
||||

|
||||
|
||||
# Dependencies
|
||||
|
||||
*kubectl* must be install and accessible under your *$PATH*
|
||||
|
||||
# Config
|
||||
|
||||
```
|
||||
[kubernetes]
|
||||
command=$SCRIPT_DIR/kubernetes
|
||||
interval=10
|
||||
```
|
3
.config/i3blocks/kubernetes/i3blocks.conf
Normal file
3
.config/i3blocks/kubernetes/i3blocks.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
[kubernetes]
|
||||
command=$SCRIPT_DIR/kubernetes
|
||||
interval=10
|
10
.config/i3blocks/kubernetes/kubernetes
Executable file
10
.config/i3blocks/kubernetes/kubernetes
Executable 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
|
||||
|
BIN
.config/i3blocks/kubernetes/kubernetes.png
Normal file
BIN
.config/i3blocks/kubernetes/kubernetes.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Reference in New Issue
Block a user