merging with latest
parent
49f6f7234a
commit
39bf09c66c
|
|
@ -182,7 +182,7 @@ benchmarks:
|
|||
K9s uses aliases to navigate most K8s resources.
|
||||
|
||||
| Command | Result | Example |
|
||||
|-----------------------|----------------------------------------------------|----------------------------|
|
||||
| --------------------- | -------------------------------------------------- | -------------------------- |
|
||||
| `:`alias`<ENTER>` | View a Kubernetes resource aliases | `:po<ENTER>` |
|
||||
| `?` | Show keyboard shortcuts and help | |
|
||||
| `Ctrl-a` | Show all available resource alias | select+`<ENTER>` to view |
|
||||
|
|
@ -196,7 +196,8 @@ K9s uses aliases to navigate most K8s resources.
|
|||
|
||||
## Demo Video
|
||||
|
||||
1. [K9s Demo](https://youtu.be/k7zseUhaXeU)
|
||||
1. [K9s v0 Demo](https://youtu.be/k7zseUhaXeU)
|
||||
2. [K9s v0.7.0 Features](https://youtu.be/83jYehwlql8)
|
||||
|
||||
|
||||
## Screenshots
|
||||
|
|
@ -377,7 +378,7 @@ k9s:
|
|||
Available color names are defined below:
|
||||
|
||||
| Color Names | | | | |
|
||||
|----------------------|----------------|------------------|-------------------|-----------------|
|
||||
| -------------------- | -------------- | ---------------- | ----------------- | --------------- |
|
||||
| black | maroon | green | olive | navy |
|
||||
| purple | teal | silver | gray | red |
|
||||
| lime | yellow | blue | fuchsia | aqua |
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ I always seem to get this wrong... Does Labor Day weekend mean you get to work o
|
|||
|
||||
I am very excited about this drop and hopefully won't be hunamimous on this? 🐭
|
||||
|
||||
For the impatients watch this! [K9s v0.7.0 Features](https://youtu.be/83jYehwlql8)
|
||||
|
||||
### Service Traversals
|
||||
|
||||
Provided your K8s services are head(Full), you can now navigate to the pods that match the service selector. So you will be able to traverse Pods/Containers directly from a service just like other resources like deployment, cron, sts...
|
||||
|
|
|
|||
|
|
@ -384,7 +384,7 @@ func (a *appView) fwdCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
return evt
|
||||
}
|
||||
|
||||
a.inject(newForwardView(a))
|
||||
a.inject(newForwardView("", a, nil))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ type benchView struct {
|
|||
actions keyActions
|
||||
}
|
||||
|
||||
func newBenchView(app *appView) *benchView {
|
||||
func newBenchView(_ string, app *appView, _ resource.List) resourceViewer {
|
||||
v := benchView{
|
||||
Pages: tview.NewPages(),
|
||||
actions: make(keyActions),
|
||||
|
|
@ -69,6 +69,11 @@ func newBenchView(app *appView) *benchView {
|
|||
return &v
|
||||
}
|
||||
|
||||
func (v *benchView) setEnterFn(enterFn) {}
|
||||
func (v *benchView) setColorerFn(colorerFn) {}
|
||||
func (v *benchView) setDecorateFn(decorateFn) {}
|
||||
func (v *benchView) setExtraActionsFn(actionsFn) {}
|
||||
|
||||
// Init the view.
|
||||
func (v *benchView) init(ctx context.Context, _ string) {
|
||||
if err := v.watchBenchDir(ctx); err != nil {
|
||||
|
|
|
|||
|
|
@ -63,10 +63,10 @@ func (c *command) run(cmd string) bool {
|
|||
c.app.inject(newHelpView(c.app))
|
||||
return true
|
||||
case cmd == "pf":
|
||||
c.app.inject(newForwardView(c.app))
|
||||
c.app.inject(newForwardView("", c.app, nil))
|
||||
return true
|
||||
case cmd == "be":
|
||||
c.app.inject(newBenchView(c.app))
|
||||
c.app.inject(newBenchView("", c.app, nil))
|
||||
return true
|
||||
case cmd == "alias":
|
||||
c.app.inject(newAliasView(c.app))
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@ type forwardView struct {
|
|||
bench *benchmark
|
||||
}
|
||||
|
||||
func newForwardView(app *appView) *forwardView {
|
||||
var _ resourceViewer = &forwardView{}
|
||||
|
||||
func newForwardView(ns string, app *appView, list resource.List) resourceViewer {
|
||||
v := forwardView{
|
||||
Pages: tview.NewPages(),
|
||||
app: app,
|
||||
|
|
@ -50,6 +52,11 @@ func newForwardView(app *appView) *forwardView {
|
|||
return &v
|
||||
}
|
||||
|
||||
func (v *forwardView) setEnterFn(enterFn) {}
|
||||
func (v *forwardView) setColorerFn(colorerFn) {}
|
||||
func (v *forwardView) setDecorateFn(decorateFn) {}
|
||||
func (v *forwardView) setExtraActionsFn(actionsFn) {}
|
||||
|
||||
// Init the view.
|
||||
func (v *forwardView) init(ctx context.Context, _ string) {
|
||||
path := benchConfig(v.app.config.K9s.CurrentCluster)
|
||||
|
|
|
|||
|
|
@ -293,6 +293,16 @@ func resourceViews(c k8s.Connection) map[string]resCmd {
|
|||
api: "",
|
||||
viewFn: newSubjectView,
|
||||
},
|
||||
"pf": {
|
||||
title: "PortForward",
|
||||
api: "",
|
||||
viewFn: newForwardView,
|
||||
},
|
||||
"be": {
|
||||
title: "Benchmark",
|
||||
api: "",
|
||||
viewFn: newBenchView,
|
||||
},
|
||||
}
|
||||
|
||||
rev, ok, err := c.SupportsRes("autoscaling", []string{"v1", "v2beta1", "v2beta2"})
|
||||
|
|
|
|||
Loading…
Reference in New Issue