From 242f312b16c2041d875425599bece232a974d69c Mon Sep 17 00:00:00 2001 From: Anatoly Zherdev Date: Thu, 13 Aug 2020 19:58:28 +0300 Subject: [PATCH] Colors for 'kubectl get nodes' --- colout/colout_kubectlnodes.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 colout/colout_kubectlnodes.py diff --git a/colout/colout_kubectlnodes.py b/colout/colout_kubectlnodes.py new file mode 100644 index 0000000..bcb31af --- /dev/null +++ b/colout/colout_kubectlnodes.py @@ -0,0 +1,13 @@ + +def theme(context): + + return context, [ + ["(NAME|STATUS|ROLES|AGE|VERSION|INTERNAL-IP|EXTERNAL-IP|OS-IMAGE|KERNEL-VERSION|CONTAINER-RUNTIME)", + "white", "underline"], + ["^([^\s]+)", "blue"], + ["(Ready)", "green"], + ["(MemoryPressure|DiskPressure|PIDPressure|NetworkUnavailable|SchedulingDisabled)", "red"], + ["^[^\s]+\s+[^\s]+\s+([^\s]+)", "yellow"], + ["^[^\s]+\s+[^\s]+\s+([^\s]+)\s+([1-9]\d*)\s+", "red"], + ] +