color theme for kubectl get pods
This commit is contained in:
parent
91b2615ec0
commit
847a145ff3
1 changed files with 17 additions and 0 deletions
17
colout/colout_kubectlpods.py
Normal file
17
colout/colout_kubectlpods.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#encoding: utf-8
|
||||
|
||||
def theme(context):
|
||||
|
||||
return context, [
|
||||
["(NAME|READY|STATUS|RESTARTS|AGE|IP|NODE|NOMINATED|NODE|READINESS|GATES)",
|
||||
"white", "underline"],
|
||||
["^([^\s]+)", "blue"],
|
||||
["(\d+/\d+)",
|
||||
context['Selectors']['percent'](r'(\d+)/(\d+)', groups=2, ranges=(30,80), colors=("red", "yellow", "green"))
|
||||
],
|
||||
["(Running)", "green"],
|
||||
["(CrashLoopBackOff|RunContainerError|Error)", "red"],
|
||||
["^[^\s]+\s+[^\s]+\s+([^\s]+)", "yellow"],
|
||||
["^[^\s]+\s+[^\s]+\s+([^\s]+)\s+([1-9]\d*)\s+", "red"],
|
||||
]
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue