diff --git a/README.md b/README.md index 0f5ef223..a111676b 100644 --- a/README.md +++ b/README.md @@ -70,13 +70,13 @@ K9s is available on Linux, macOS and Windows platforms. ``` * Via [Chocolatey](https://chocolatey.org/packages/k9s) for Windows - + ```shell choco install k9s ``` * Via a GO install - + ```shell # NOTE: The dev version will be in effect! go get -u github.com/derailed/k9s @@ -238,6 +238,8 @@ K9s uses aliases to navigate most K8s resources. k9s: # Represents ui poll intervals. Default 2secs refreshRate: 2 + # Enable mouse support. Default false + enableMouse: false # Set to true to hide K9s header. Default false headless: false # Indicates whether modification commands like delete/kill/edit are disabled. Default is false @@ -250,8 +252,8 @@ K9s uses aliases to navigate most K8s resources. tail: 200 # Defines the total number of log lines to allow in the view. Default 1000 buffer: 500 - # Represents how far to go back in the log timeline in seconds. Default is 5min - sinceSeconds: 300 + # Represents how far to go back in the log timeline in seconds. Default is 1min + sinceSeconds: 60 # Go full screen while displaying logs. Default false fullScreenLogs: false # Toggles log line wrap. Default false diff --git a/change_logs/release_v0.21.10.md b/change_logs/release_v0.21.10.md index da3654d2..db9226cc 100644 --- a/change_logs/release_v0.21.10.md +++ b/change_logs/release_v0.21.10.md @@ -43,6 +43,7 @@ k9s: * [PR #877](https://github.com/derailed/k9s/pull/877) Change character used for X in RBAC view. Thank you! [Torjus](https://github.com/torjue) * [PR #876](https://github.com/derailed/k9s/pull/876) Migrate to new sortorder import path. Big thanks to [fbbommel](https://github.com/fvbommel) +* [PR #873](https://github.com/derailed/k9s/pull/873) Fix default logger config, same as README. Thank you! [darklore](https://github.com/darklore) --- diff --git a/go.mod b/go.mod index 601d53f2..1f57d7a3 100644 --- a/go.mod +++ b/go.mod @@ -9,6 +9,7 @@ require ( github.com/drone/envsubst v1.0.2 // indirect github.com/fatih/color v1.9.0 github.com/fsnotify/fsnotify v1.4.7 + github.com/fvbommel/sortorder v1.0.1 github.com/gdamore/tcell v1.3.0 github.com/ghodss/yaml v1.0.0 github.com/golang/protobuf v1.4.2 // indirect @@ -40,5 +41,4 @@ require ( k8s.io/metrics v0.18.8 rsc.io/letsencrypt v0.0.3 // indirect sigs.k8s.io/yaml v1.2.0 - vbom.ml/util v0.0.0-20180919145318-efcd4e0f9787 ) diff --git a/go.sum b/go.sum index 39eaecd9..2c16ef52 100644 --- a/go.sum +++ b/go.sum @@ -147,12 +147,6 @@ github.com/denisenkom/go-mssqldb v0.0.0-20191001013358-cfbb681360f0/go.mod h1:xb github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/derailed/popeye v0.8.10 h1:V0767TmO+nOlzszU2zQIDwNzEg6Iw36RqciYL6/LvtA= github.com/derailed/popeye v0.8.10/go.mod h1:yjWFWX32SD1eaS5uXuPZJQQgJTUr/DkV81939yJoFzM= -github.com/derailed/tview v0.4.3 h1:etpvS/0FwUKMys0cCciNFl6xDTEcpV/3aoS4zxliOvs= -github.com/derailed/tview v0.4.3/go.mod h1:GJ3k/TIzEE+sj1L09/usk6HrkjsdadSsb03eHgPbcII= -github.com/derailed/tview v0.4.4 h1:uQAeuC6XGSayDETw6oSoMtoPTzoW90WJHNclDC6ZfX4= -github.com/derailed/tview v0.4.4/go.mod h1:GJ3k/TIzEE+sj1L09/usk6HrkjsdadSsb03eHgPbcII= -github.com/derailed/tview v0.4.5 h1:DY9JVuavEUo+cA4DLTrjoelXBlBVfwcmq/wBRiFPh00= -github.com/derailed/tview v0.4.5/go.mod h1:GJ3k/TIzEE+sj1L09/usk6HrkjsdadSsb03eHgPbcII= github.com/derailed/tview v0.4.6 h1:xCk6C0+/YQb9BWtn7n7Vp6JwJKKjq+zoRMc3XnoOOFM= github.com/derailed/tview v0.4.6/go.mod h1:GJ3k/TIzEE+sj1L09/usk6HrkjsdadSsb03eHgPbcII= github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= @@ -207,6 +201,8 @@ github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fvbommel/sortorder v1.0.1 h1:dSnXLt4mJYH25uDDGa3biZNQsozaUWDSWeKJ0qqFfzE= +github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7 h1:LofdAjjjqCSXMwLGgOgnE+rdPuvX9DxCqaHwKy7i/ko= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko= diff --git a/internal/client/gvr.go b/internal/client/gvr.go index 0c49b652..761e20c9 100644 --- a/internal/client/gvr.go +++ b/internal/client/gvr.go @@ -5,10 +5,10 @@ import ( "path" "strings" + "github.com/fvbommel/sortorder" "github.com/rs/zerolog/log" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" - "vbom.ml/util/sortorder" ) // GVR represents a kubernetes resource schema as a string. diff --git a/internal/config/config_test.go b/internal/config/config_test.go index b57aa88e..3fe0b58e 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -267,7 +267,7 @@ var expectedConfig = `k9s: logger: tail: 500 buffer: 800 - sinceSeconds: 5 + sinceSeconds: 300 fullScreenLogs: false textWrap: false showTime: false @@ -347,7 +347,7 @@ var resetConfig = `k9s: logger: tail: 200 buffer: 2000 - sinceSeconds: 5 + sinceSeconds: 300 fullScreenLogs: false textWrap: false showTime: false diff --git a/internal/config/logger.go b/internal/config/logger.go index 9f368fe9..dde8df68 100644 --- a/internal/config/logger.go +++ b/internal/config/logger.go @@ -10,7 +10,11 @@ const ( // MaxLogThreshold sets the max value for log size. MaxLogThreshold = 5000 // DefaultSinceSeconds tracks default log age. +<<<<<<< HEAD DefaultSinceSeconds = 60 // all logs +======= + DefaultSinceSeconds = 300 +>>>>>>> 8f7640a75993a24409d6b3d9dd2204c24b7ac1a1 ) // Logger tracks logger options diff --git a/internal/render/policy_test.go b/internal/render/policy_test.go index 24408821..1d39fc06 100644 --- a/internal/render/policy_test.go +++ b/internal/render/policy_test.go @@ -31,11 +31,11 @@ func TestPolicyRender(t *testing.T) { "[green::b] ✓ [::]", "[green::b] ✓ [::]", "[green::b] ✓ [::]", - "[orangered::b] 𐄂 [::]", - "[orangered::b] 𐄂 [::]", - "[orangered::b] 𐄂 [::]", - "[orangered::b] 𐄂 [::]", - "[orangered::b] 𐄂 [::]", + "[orangered::b] × [::]", + "[orangered::b] × [::]", + "[orangered::b] × [::]", + "[orangered::b] × [::]", + "[orangered::b] × [::]", "", "", }, r.Fields) diff --git a/internal/render/rbac.go b/internal/render/rbac.go index 24dde086..895d3c59 100644 --- a/internal/render/rbac.go +++ b/internal/render/rbac.go @@ -101,7 +101,7 @@ func toVerbIcon(ok bool) string { if ok { return "[green::b] ✓ [::]" } - return "[orangered::b] 𐄂 [::]" + return "[orangered::b] × [::]" } func hasVerb(verbs []string, verb string) bool { diff --git a/internal/render/row.go b/internal/render/row.go index dcafd20e..d974837d 100644 --- a/internal/render/row.go +++ b/internal/render/row.go @@ -6,7 +6,7 @@ import ( "strconv" "time" - "vbom.ml/util/sortorder" + "github.com/fvbommel/sortorder" ) // Fields represents a collection of row fields. diff --git a/internal/xray/tree_node.go b/internal/xray/tree_node.go index b9d744d3..b3b34ded 100644 --- a/internal/xray/tree_node.go +++ b/internal/xray/tree_node.go @@ -8,8 +8,8 @@ import ( "github.com/derailed/k9s/internal/client" "github.com/derailed/k9s/internal/dao" + "github.com/fvbommel/sortorder" "github.com/rs/zerolog/log" - "vbom.ml/util/sortorder" ) const (