added rel notes + cleanup

mine
derailed 2020-02-20 09:24:16 -07:00
parent bcbb24093b
commit 3614b3122b
9 changed files with 329 additions and 79 deletions

BIN
assets/k9s_doc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

View File

@ -0,0 +1,184 @@
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/k9s_small.png" align="right" width="200" height="auto"/>
# Release v0.16.0
## Notes
Thank you to all that contributed with flushing out issues and enhancements for K9s! I'll try to mark some of these issues as fixed. But if you don't mind grab the latest rev and see if we're happier with some of the fixes! If you've filed an issue please help me verify and close. Your support, kindness and awesome suggestions to make K9s better is as ever very much noticed and appreciated!
Also if you dig this tool, please make some noise on social! [@kitesurfer](https://twitter.com/kitesurfer)
On Slack? Please join us [K9slackers](https://join.slack.com/t/k9sers/shared_invite/enQtOTA5MDEyNzI5MTU0LWQ1ZGI3MzliYzZhZWEyNzYxYzA3NjE0YTk1YmFmNzViZjIyNzhkZGI0MmJjYzhlNjdlMGJhYzE2ZGU1NjkyNTM)
---
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/k9s_doc.png" align="center"/>
This is one of these drops that may make you wonder if you'll go from zero to hero or likely the reverse?? Will see how this goes... Please proceed with caution on this one as there could very well be much distrubances in the force...
Lots of code churns so could have totally hose some stuff, but like my GranPappy used to say `can't cook without making a mess!`
## Going Wide?
In this drop, we've enabled a new shortcut namely `wide` as `Ctrl-w`. On table views, you will be able to see more information about the resources such as labels or others depending on the viewed resource. This mnemonic works as a toggle so you can `narrow` the view by hitting it again.
## Zoom, Zoom, Zoom!
While viewing some resources that may contain errors, sorting on columns may not achieve the results you're seeking ie `show me all resources in an error state`. We've added a new option to achieve just that aka `zoom errors` as `ctrl-z`. This works as a toggle and will unveil resources that are need of some TLC on your part ;)
## Does Your Cluster Have A Pulse?
In this drop, we're introducing a brand new view aka `K9s Pulses`. This is a summary view listing the most sailient resources in your clusters and their current states. This view tracks two main metrics ie Ok and Toast on a 5sec beat. This view affords cluster activity and failure rates. BTW this is the zero to hero deal 🙀 Hopefully you'll dig it as this was much work to put together and I personally think it's the `ducks nuts`... If you like, please give me some luving on social or via GH sponsors as batteries are running low...
To navigate thru the various pulses, you can use `tab`/`backtab` or use the menu index (just like namespaces selectors). Once on a pulse view, you can press `enter` to see the resource table view. Pressing `esc` will nav you back.
As I've may have mentioned before, my front-end/UX FU is weak, so I've also added a way for you to skin the charts via skins yaml to your own liking. Please see the skin section below for an example on how to skin the pulses dials. BONUS you should be able to skin K9s live! How cool is that?
NOTE: Pulses are very much experimental and could totally bomb on your clusters! So please thread carefully and please do report (kindly!) back.
## BReaking Bad!
In this drop I've broken a few things (that I know off...), here is the list as I can recall...
1. Toggle header aka `my red headed step child`. Key moved (again!) now `Ctrl-e`
2. Skin yaml layout CHANGED! Moved table and xray sections under views and added charts section.
## Skins Updates!
The skin file format CHANGE! If you are running skins with K9s, please make sure to update your skin file. If not K9s could bomb coming up!
NOTE: I don't think I'll get around to update all the contributed skins in this repo `skins` dir. If you're looking for a way to help out and are UI inclined, please take a peek and make them cool!
```yaml
# my_cluster_skin.yml
# Styles...
foreground: &foreground "#f8f8f2"
background: &background "#282a36"
current_line: &current_line "#44475a"
selection: &selection "#44475a"
comment: &comment "#6272a4"
cyan: &cyan "#8be9fd"
green: &green "#50fa7b"
orange: &orange "#ffb86c"
pink: &pink "#ff79c6"
purple: &purple "#bd93f9"
red: &red "#ff5555"
yellow: &yellow "#f1fa8c"
# Skin...
k9s:
# General K9s styles
body:
fgColor: *foreground
bgColor: *background
logoColor: *purple
# ClusterInfoView styles.
info:
fgColor: *pink
sectionColor: *foreground
frame:
# Borders styles.
border:
fgColor: *selection
focusColor: *current_line
menu:
fgColor: *foreground
keyColor: *pink
# Used for favorite namespaces
numKeyColor: *purple
# CrumbView attributes for history navigation.
crumbs:
fgColor: *foreground
bgColor: *current_line
activeColor: *current_line
# Resource status and update styles
status:
newColor: *cyan
modifyColor: *purple
addColor: *green
errorColor: *red
highlightcolor: *orange
killColor: *comment
completedColor: *comment
# Border title styles.
title:
fgColor: *foreground
bgColor: *current_line
highlightColor: *orange
counterColor: *purple
filterColor: *pink
views:
charts:
bgColor: *background
dialBgColor: "#0A2239"
chartBgColor: "#0A2239"
defaultDialColors:
- "#1E3888"
- "#820101"
defaultChartColors:
- "#1E3888"
- "#820101"
resourceColors:
batch/v1/jobs:
- "#5D737E"
- "#820101"
v1/persistentvolumes:
- "#3E554A"
- "#820101"
cpu:
- "#6EA4BF"
- "#820101"
mem:
- "#17505B"
- "#820101"
v1/events:
- "#073B3A"
- "#820101"
v1/pods:
- "#487FFF"
- "#820101"
# TableView attributes.
table:
fgColor: *foreground
bgColor: *background
cursorColor: *current_line
# Header row styles.
header:
fgColor: *foreground
bgColor: *background
sorterColor: *cyan
# Xray view attributes.
xray:
fgColor: *foreground
bgColor: *background
cursorColor: *current_line
graphicColor: *purple
showIcons: true
# YAML info styles.
yaml:
keyColor: *pink
colonColor: *purple
valueColor: *foreground
# Logs styles.
logs:
fgColor: *foreground
bgColor: *background
```
## Resolved Bugs/Features/PRs
- [Issue #557](https://github.com/derailed/k9s/issues/557)
- [Issue #555](https://github.com/derailed/k9s/issues/555)
- [Issue #554](https://github.com/derailed/k9s/issues/554)
- [Issue #553](https://github.com/derailed/k9s/issues/553)
- [Issue #552](https://github.com/derailed/k9s/issues/552)
- [Issue #551](https://github.com/derailed/k9s/issues/551)
- [Issue #549](https://github.com/derailed/k9s/issues/549) A start with pulses...
- [Issue #540](https://github.com/derailed/k9s/issues/540)
- [Issue #421](https://github.com/derailed/k9s/issues/421)
- [Issue #351](https://github.com/derailed/k9s/issues/351) Solved by Pulses?
- [Issue #25](https://github.com/derailed/k9s/issues/25) Pulses? Oldie but goodie!
---
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/imhotep_logo.png" width="32" height="auto"/> © 2020 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0)

View File

@ -3,6 +3,7 @@ package client
import ( import (
"errors" "errors"
"fmt" "fmt"
"strings"
"sync" "sync"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
@ -177,13 +178,31 @@ func (c *Config) ClusterNames() ([]string, error) {
// CurrentGroupNames retrieves the active group names. // CurrentGroupNames retrieves the active group names.
func (c *Config) CurrentGroupNames() ([]string, error) { func (c *Config) CurrentGroupNames() ([]string, error) {
if c.flags.ImpersonateGroup != nil && len(*c.flags.ImpersonateGroup) != 0 { if areSet(c.flags.ImpersonateGroup) {
return *c.flags.ImpersonateGroup, nil return *c.flags.ImpersonateGroup, nil
} }
return []string{}, errors.New("unable to locate current group") return []string{}, errors.New("unable to locate current group")
} }
// ImpersonateGroups retrieves the active groupsif set on the CLI.
func (c *Config) ImpersonateGroups() (string, error) {
if areSet(c.flags.ImpersonateGroup) {
return strings.Join(*c.flags.ImpersonateGroup, ","), nil
}
return "", errors.New("no groups set")
}
// ImpersonateUser retrieves the active user name if set on the CLI.
func (c *Config) ImpersonateUser() (string, error) {
if isSet(c.flags.Impersonate) {
return *c.flags.Impersonate, nil
}
return "", errors.New("no user set")
}
// CurrentUserName retrieves the active user name. // CurrentUserName retrieves the active user name.
func (c *Config) CurrentUserName() (string, error) { func (c *Config) CurrentUserName() (string, error) {
if isSet(c.flags.Impersonate) { if isSet(c.flags.Impersonate) {
@ -311,3 +330,7 @@ func (c *Config) ensureConfig() {
func isSet(s *string) bool { func isSet(s *string) bool {
return s != nil && len(*s) != 0 return s != nil && len(*s) != 0
} }
func areSet(s *[]string) bool {
return s != nil && len(*s) != 0
}

View File

@ -32,11 +32,11 @@ func runK(a *App, opts shellOpts) bool {
return false return false
} }
var args []string var args []string
if u, err := a.Conn().Config().CurrentUserName(); err == nil { if u, err := a.Conn().Config().ImpersonateUser(); err == nil {
args = append(args, "--as", u) args = append(args, "--as", u)
} }
if g, err := a.Conn().Config().CurrentGroupNames(); err == nil { if g, err := a.Conn().Config().ImpersonateGroups(); err == nil {
args = append(args, "--as-group", strings.Join(g, ",")) args = append(args, "--as-group", g)
} }
args = append(args, "--context", a.Config.K9s.CurrentContext) args = append(args, "--context", a.Config.K9s.CurrentContext)
if cfg := a.Conn().Config().Flags().KubeConfig; cfg != nil && *cfg != "" { if cfg := a.Conn().Config().Flags().KubeConfig; cfg != nil && *cfg != "" {

View File

@ -45,22 +45,22 @@ k9s:
highlightColor: *active highlightColor: *active
counterColor: *text counterColor: *text
filterColor: *slate filterColor: *slate
table:
fgColor: *fg
bgColor: *bg
cursorColor: *fg
markColor: *mark
header:
fgColor: *dslate
bgColor: *bg
sorterColor: *fg
xray:
fgColor: *fg
bgColor: *bg
cursorColor: *ghost
graphicColor: gray
showIcons: false
views: views:
table:
fgColor: *fg
bgColor: *bg
cursorColor: *fg
markColor: *mark
header:
fgColor: *dslate
bgColor: *bg
sorterColor: *fg
xray:
fgColor: *fg
bgColor: *bg
cursorColor: *ghost
graphicColor: gray
showIcons: false
yaml: yaml:
keyColor: *ghost keyColor: *ghost
colorColor: *slate colorColor: *slate
@ -68,3 +68,11 @@ k9s:
logs: logs:
fgColor: *ghost fgColor: *ghost
bgColor: *bg bgColor: *bg
charts:
bgColor: default
defaultDialColors:
- *white
- *err
defaultChartColors:
- *white
- *err

View File

@ -54,24 +54,33 @@ k9s:
highlightColor: *orange highlightColor: *orange
counterColor: *purple counterColor: *purple
filterColor: *pink filterColor: *pink
# TableView attributes. views:
table: # Charts skins...
fgColor: *foreground charts:
bgColor: *background bgColor: default
cursorColor: *current_line defaultDialColors:
# Header row styles. - *purple
header: - *red
defaultChartColors:
- *purple
- *red
# TableView attributes.
table:
fgColor: *foreground fgColor: *foreground
bgColor: *background bgColor: *background
sorterColor: *cyan cursorColor: *current_line
# Xray view attributes. # Header row styles.
xray: header:
fgColor: *foreground fgColor: *foreground
bgColor: *background bgColor: *background
cursorColor: *current_line sorterColor: *cyan
graphicColor: *purple # Xray view attributes.
showIcons: false xray:
views: fgColor: *foreground
bgColor: *background
cursorColor: *current_line
graphicColor: *purple
showIcons: false
# YAML info styles. # YAML info styles.
yaml: yaml:
keyColor: *pink keyColor: *pink

View File

@ -53,22 +53,30 @@ k9s:
highlightColor: *sky highlightColor: *sky
counterColor: *slate counterColor: *slate
filterColor: *slate filterColor: *slate
table: views:
fgColor: *fg table:
bgColor: *bg
cursorColor: *aqua
markColor: *mslate
header:
fgColor: *fg fgColor: *fg
bgColor: *bg bgColor: *bg
sorterColor: *cadet cursorColor: *aqua
xray: markColor: *mslate
fgColor: *blue header:
bgColor: *dark fgColor: *fg
cursorColor: *aqua bgColor: *bg
graphicColor: *mslate sorterColor: *cadet
showIcons: false xray:
views: fgColor: *blue
bgColor: *dark
cursorColor: *aqua
graphicColor: *mslate
showIcons: false
charts:
bgColor: *bg
defaultDialColors:
- *aqua
- *err
defaultChartColors:
- *aqua
- *err
yaml: yaml:
keyColor: *steel keyColor: *steel
colorColor: *blue colorColor: *blue

View File

@ -32,22 +32,31 @@ k9s:
highlightColor: white highlightColor: white
counterColor: white counterColor: white
filterColor: "#57c7ff" filterColor: "#57c7ff"
table:
fgColor: "#57c7ff"
bgColor: "#282a36"
cursorColor: "#5af78e"
markColor: darkgoldenrod
header:
fgColor: white
bgColor: "#282a36"
sorterColor: orange
xray:
fgColor: "#57c7ff"
bgColor: "#282a36"
cursorColor: "#5af78e"
graphicColor: darkgoldenrod
showIcons: false
views: views:
# Charts skins...
charts:
bgColor: default
defaultDialColors:
- "#57c7ff"
- "#ff5c57"
defaultChartColors:
- "#57c7ff"
- "#ff5c57"
table:
fgColor: "#57c7ff"
bgColor: "#282a36"
cursorColor: "#5af78e"
markColor: darkgoldenrod
header:
fgColor: white
bgColor: "#282a36"
sorterColor: orange
xray:
fgColor: "#57c7ff"
bgColor: "#282a36"
cursorColor: "#5af78e"
graphicColor: darkgoldenrod
showIcons: false
yaml: yaml:
keyColor: "#ff5c57" keyColor: "#ff5c57"
colonColor: white colonColor: white

View File

@ -31,22 +31,31 @@ k9s:
highlightColor: fuchsia highlightColor: fuchsia
counterColor: papayawhip counterColor: papayawhip
filterColor: steelblue filterColor: steelblue
table:
fgColor: blue
bgColor: black
cursorColor: aqua
markColor: darkgoldenrod
header:
fgColor: white
bgColor: black
sorterColor: orange
xray:
fgColor: blue
bgColor: black
cursorColor: aqua
graphicColor: darkgoldenrod
showIcons: false
views: views:
# Charts skins...
charts:
bgColor: black
defaultDialColors:
- linegreen
- orangered
defaultChartColors:
- linegreen
- orangered
table:
fgColor: blue
bgColor: black
cursorColor: aqua
markColor: darkgoldenrod
header:
fgColor: white
bgColor: black
sorterColor: orange
xray:
fgColor: blue
bgColor: black
cursorColor: aqua
graphicColor: darkgoldenrod
showIcons: false
yaml: yaml:
keyColor: steelblue keyColor: steelblue
colonColor: white colonColor: white