New Release V0.2.11
Kubectl-ice v0.2.11 has been released!
Its been a while since the previous release (I have been working on other projects) but I have finally added colours to the table output of ice “woohoo”, please bear in mind I have only tested this on linux so it might break the output on other systems (if it does then please raise a ticket detailing the comand you used, your os and a screen grab of the output) and yes I know it looks like I’m mixing the spelling of colour with color but I set the flag to the Americian spelling as thats what im used to when working on the command line and the most common spelling across various other programs, I grew up in london so alwas spelt using the queens english.
The new --colors argument
flag lets you colour the output based on a provided string, doing this allows the us to choose the one we prefer if your a fan of having each column a different colour, you can using the columns
argument. if on the other had you only want to colour to help identify which resources in the cpu output are above 75% used then you can use the errors
argument which displays 0-74% in green, 75-89% in yellow and 90-100% as red, anything left in the base colour means ice was unable to collect enough data to make an assumption (or I messed up the code somewhere). I then decided it would be nice to allow mixing of the above schemes so I added the mix
argument which sets colours as columns but then adds the green/yellow/red to percentages and states as needed, giving more of a blended look to the output
On top of the above arguments I also decided it would be useful to allow users to specify there own colour schemes, so I added the custom
argument this is a “;” seperated list with each element being x.y with x being the modifier (bold/underline/flashing) and y being the colour (these are standard ansi colour codes). I’ll add the colour table below. While I was testing this I also added the ability to change the good/warn/bad colours by prefixing the custom colour with “g”, “w” and “b”, which when detected ice switches to an internal custom mix setting so it can display the table with a custom colour in each column whilst also changing the errors colour for a few % related columns.
you can also set the environment variable ICE_COLOR to argument so ice will always use that unless overridden using the color flag
Colour codes
Default 39 Black 30 Dark red 31 Dark green 32 Dark yellow 33 Dark blue 34 Dark magenta 35 Dark cyan 36 Light gray 37 Dark gray 90 Red 91 Green 92 Orange 93 Blue 94 Magenta 95 Cyan 96 White 97
Modifiers
brighter 1 underlined 4 flashing 5
Examples
each column is a different colour
kubectl-ice status --color column
choosing the colour of each column (colours repeat if there are more columns than colours) in this case the colours are blue, magenta, cyan, blue, magenta, cyan, etc
kubectl-ice status --color "custom;0.94;0.95;0.96"
showing the columns in colour with cpu usage coloured as good (green), warning (yellow) and bad (red)
kubectl-ice cpu --color mix
and finally memory output with custom colours for each column but warning is flashing yellow and bad is flashing red
kubectl-ice memory --colour "custom;0.33;0.34;0.35;0.36;0.90;0.93;0.94;g1.92;w5.33;b5.91"
in the above command the “w5.33” the w means to set the warning colour 5 is flash the text and 33 is the colour yellow
as usual full details are in the documentation
NimbleArchitect