checkpoint
parent
5c0fc0845b
commit
782de04b42
65
README.md
65
README.md
|
|
@ -107,7 +107,7 @@ K9s uses aliases to navigate most K8s resources.
|
|||
| `Ctrl-a` | Show all available resource alias | select+`<ENTER>` to view |
|
||||
| `/`filter`ENTER` | Filter out a resource view given a filter | `/bumblebeetuna` |
|
||||
| `/`-l label-selector`ENTER` | Filter resource view by labels | `/-l app=fred` |
|
||||
| `<Esc>` | Bails out of command/filter mode | |
|
||||
| `<Esc>` | Bails out of view/command/filter mode | |
|
||||
| `d`,`v`, `e`, `l`,... | Key mapping to describe, view, edit, view logs,... | `d` (describes a resource) |
|
||||
| `:`ctx`<ENTER>` | To view and switch to another Kubernetes context | `:`+`ctx`+`<ENTER>` |
|
||||
| `:`ns`<ENTER>` | To view and switch to another Kubernetes namespace | `:`+`ns`+`<ENTER>` |
|
||||
|
|
@ -119,11 +119,12 @@ K9s uses aliases to navigate most K8s resources.
|
|||
|
||||
## K9s config file ($HOME/.k9s/config.yml)
|
||||
|
||||
K9s keeps its configurations in a dot file in your home directory.
|
||||
K9s keeps its configurations in a .k9s directory in your home directory.
|
||||
|
||||
> NOTE: This is still in flux and will change while in pre-release stage!
|
||||
|
||||
```yaml
|
||||
# config.yml
|
||||
k9s:
|
||||
# Indicates api-server poll intervals.
|
||||
refreshRate: 2
|
||||
|
|
@ -159,7 +160,7 @@ K9s uses aliases to navigate most K8s resources.
|
|||
---
|
||||
## Aliases
|
||||
|
||||
In K9s you can define your own command aliases (shortnames) to access your resources. In your `$HOME/.k9s` define a file called `alias.yml`. A K9s alias defines pairs of alias:gvr. A gvr represents a fully qualified Kubernetes resource identifier. Here is an example of an alias file:
|
||||
In K9s, you can define your own command aliases (shortnames) to access your resources. In your `$HOME/.k9s` define a file called `alias.yml`. A K9s alias defines pairs of alias:gvr. A gvr represents a fully qualified Kubernetes resource identifier. Here is an example of an alias file:
|
||||
|
||||
```yaml
|
||||
# $HOME/.k9s/alias.yml
|
||||
|
|
@ -168,7 +169,7 @@ alias:
|
|||
crb: rbac.authorization.k8s.io/v1/clusterrolebindings
|
||||
```
|
||||
|
||||
Using this alias file, you can now type pp/crb to list pods, clusterrolebindings respectively.
|
||||
Using this alias file, you can now type pp/crb to list pods or clusterrolebindings respectively.
|
||||
|
||||
---
|
||||
## Plugins
|
||||
|
|
@ -178,9 +179,10 @@ K9s allows you to define your own cluster commands via plugins. K9s will look at
|
|||
```yaml
|
||||
# $HOME/.k9s/plugin.yml
|
||||
plugin:
|
||||
# Defines a plugin to provide a `Ctrl-L` shorcut to tail the logs while in pod view.
|
||||
fred:
|
||||
shortCut: Ctrl-L
|
||||
description: "Pod logs"
|
||||
description: Pod logs
|
||||
scopes:
|
||||
- po
|
||||
command: /usr/local/bin/kubectl
|
||||
|
|
@ -197,7 +199,7 @@ plugin:
|
|||
|
||||
This defines a plugin for viewing logs on a selected pod using `CtrlL` mnemonic.
|
||||
|
||||
The shortcut option represents the command a user would type to activate the plugin. The command represents adhoc commands the plugin runs upon activation. The scopes defines a collection of views shortnames for which the plugin shortcut will be made available to the user.
|
||||
The shortcut option represents the command a user would type to activate the plugin. The command represents adhoc commands the plugin runs upon activation. The scopes defines a collection of resources names/shortnames for which the plugin shortcut will be made available to the user. You can specify all to provide this shortcut for all views.
|
||||
|
||||
K9s does provide additional environment variables for you to customize your plugins. Currently, the available environment variables are as follows:
|
||||
|
||||
|
|
@ -278,6 +280,41 @@ benchmarks:
|
|||
|
||||
---
|
||||
|
||||
## HotKeys
|
||||
|
||||
Entering the command mode and typing a resource name or alias, could be cumbersome for navigating thru often used resources. We're introducing hotkeys that allows a user to define their own hotkeys to activate their favorite resource views. In order to enable hotkeys please follow these steps:
|
||||
|
||||
1. In your .k9s home directory create a file named `hotkey.yml`
|
||||
2. Add the following to your `hotkey.yml`. You can use short names or resource name to specify a command ie same as typing it in command mode.
|
||||
|
||||
```yaml
|
||||
hotKey:
|
||||
shift-0:
|
||||
shortCut: Shift-0
|
||||
description: View pods
|
||||
command: pods
|
||||
shift-1:
|
||||
shortCut: Shift-1
|
||||
description: View deployments
|
||||
command: dp
|
||||
shift-2:
|
||||
shortCut: Shift-2
|
||||
description: View services
|
||||
command: service
|
||||
shift-3:
|
||||
shortCut: Shift-3
|
||||
description: View statefulsets
|
||||
command: sts
|
||||
```
|
||||
|
||||
Not feeling so hot? Your custom hotkeys list will be listed in the help view.`<?>`. Also your hotkey file will be automatically reloaded so you can readily use your hotkeys as you define them.
|
||||
|
||||
You can choose any keyboard shotcuts that make sense to you, provided they are not part of the standard K9s shortcuts list.
|
||||
|
||||
NOTE: This feature/configuration might change in future releases!
|
||||
|
||||
---
|
||||
|
||||
## K9s RBAC FU
|
||||
|
||||
On RBAC enabled clusters, you would need to give your users/groups capabilities so that they can use K9s to explore their Kubernetes cluster. K9s needs minimally read privileges at both the cluster and namespace level to display resources and metrics.
|
||||
|
|
@ -310,7 +347,7 @@ rules:
|
|||
- apiGroups: ["apiextensions.k8s.io"]
|
||||
resources: ["customresourcedefinitions"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
# Grants RO access to metric server
|
||||
# Grants RO access to metric server (if present)
|
||||
- apiGroups: ["metrics.k8s.io"]
|
||||
resources: ["nodes", "pods"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
|
|
@ -350,7 +387,7 @@ rules:
|
|||
verbs: ["get", "list", "watch"]
|
||||
# Grants RO access to metric server
|
||||
- apiGroups: ["metrics.k8s.io"]
|
||||
resources: ["pods"]
|
||||
resources: ["pods", "nodes"]
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
|
|
@ -377,7 +414,7 @@ roleRef:
|
|||
|
||||
## Skins
|
||||
|
||||
You can style K9s based on your own sense of style and look. This is very much an experimental feature at this time, more will be added/modified if this feature has legs so thread accordingly!
|
||||
You can style K9s based on your own sense of look and style. This is very much an experimental feature at this time, more will be added/modified if this feature has legs so thread accordingly!
|
||||
|
||||
By default a K9s view displays resource information using the following coloring scheme:
|
||||
|
||||
|
|
@ -387,7 +424,8 @@ By default a K9s view displays resource information using the following coloring
|
|||
|
||||
Skins are YAML files, that enable a user to change K9s presentation layer. K9s skins are loaded from `$HOME/.k9s/skin.yml`. If a skin file is detected then the skin would be loaded if not the current stock skin remains in effect.
|
||||
|
||||
Below is a sample skin file, more skins would be available in the skins directory, just simply copy any of these in your user's home dir as `skin.yml`.
|
||||
You can also change K9s skins based on the cluster you are connecting too. In this case, you can specify the skin file name as `$HOME/.k9s/mycluster_skin.yml`
|
||||
Below is a sample skin file, more skins are available in the skins directory in this repo, just simply copy any of these in your user's home dir as `skin.yml`.
|
||||
|
||||
```yaml
|
||||
# InTheNavy Skin...
|
||||
|
|
@ -419,7 +457,8 @@ k9s:
|
|||
activeColor: skyblue
|
||||
# Resource status and update styles
|
||||
status:
|
||||
newColor: blue
|
||||
# You can also use hex colors!
|
||||
newColor: #0000ff
|
||||
modifyColor: powderblue
|
||||
addColor: lightskyblue
|
||||
errorColor: indianred
|
||||
|
|
@ -496,7 +535,7 @@ Available color names are defined below:
|
|||
|
||||
This initial drop is brittle. K9s will most likely blow up...
|
||||
|
||||
1. You're running older versions of Kubernetes. K9s works best Kubernetes 1.12+.
|
||||
1. You're running older versions of Kubernetes. K9s works best Kubernetes 1.15+.
|
||||
2. You don't have enough RBAC fu to manage your cluster.
|
||||
|
||||
---
|
||||
|
|
@ -511,7 +550,7 @@ dig this effort, please let us know that too!
|
|||
|
||||
## ATTA Girls/Boys!
|
||||
|
||||
K9s sits on top of many of opensource projects and libraries. Our *sincere*
|
||||
K9s sits on top of many open source projects and libraries. Our *sincere*
|
||||
appreciations to all the OSS contributors that work nights and weekends
|
||||
to make this project a reality!
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,88 @@
|
|||
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/k9s_small.png" align="right" width="200" height="auto"/>
|
||||
|
||||
# Release v0.10.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)
|
||||
|
||||
---
|
||||
|
||||
## Change Logs
|
||||
|
||||
First off, Happy 2020 to you and yours!! Best wishes for good health and good fortune!
|
||||
|
||||
This release represents a major overall of K9s core. It's been a long time coming and indeed a long day in the saddle ;( There has been many code changes and hopefully improvements from previous releases. I think some of it is better but I've probably borked a bunch of functionality in the process. I look to you to help me flesh out issues and bugs, so we can move on to bigger and exciting features in 2020! Please do thread lightly on this one and make sure to keep a previous release handy just in case... This was a boatload of work to make this happen, my hope is you'll enjoy some of the improvements... In any case, and as always, if you feel they're better ways or imperfections by all means please pipe in!
|
||||
|
||||
I would also like to take this opportunity to thank all of you for your kind PRs and issues and for your support and patience with K9s. I understand this release might be a bit torked, but I will work hard to make sure we reach stability quickly in the next few drops. Thank you for your understanding!!
|
||||
|
||||
## VatDoesDisDo?
|
||||
|
||||
Most of the refactors are around K8s resource fetching and viewing as well as navigation changes. Based on our observations this release might load resources a bit slower than usual but should make navigation much faster once the cache is primed. We've made some improvements to be more consistent with navigation and shortcuts management. We've got ride off the breadcrumbs navigation ie no more `p` to nav back. Crumbs are now just tracking a natural resoure navigation ie pod -> containers -> logs and no longer commands history. Each new command will now load a brand new breadcrumb. You can press `<esc>` to nav back to the previous page. We're also introducing a new hotkeys feature, that afforts creating shortcuts to navigate to your favorite resources ie shift-0 -> view pods, shift-1 -> view deployments (See HotKey section below). I know there were many outstanding PRS (Thank you to all that I've submitted!) and given the extent of the changes, I've resolved to incorporate them in manually vs having to deal with merge conflicts.
|
||||
|
||||
## Custom Skins Per Cluster
|
||||
|
||||
In this release, we've added support for skins at the cluster level. Do you want K9s to look differently based on which cluster you're connecting to? All you'll need is to name the skin file in the K9s home directory as follows `mycluster_skin.yml`. If no cluster specific skin file is found, the standard `skin.yml` file will be loaded if present. Please checkout the `skins` directory in this repo or PR me if you have cool skins you'd like to share with your fellow K9ers as they will be featured in these release notes and the project README.
|
||||
|
||||
## Hot(Ness)?
|
||||
|
||||
Feeling like you want to be able to quickly switch around your favorite resources with your very own shortcut? Wouldn't it be dandy to navigate to your deployments using shift-0 vs entering a command `:dp`? Here is what you'll need to do to add HotKeys to your K9s sessions:
|
||||
|
||||
1. In your .k9s home directory create a file named `hotkey.yml`
|
||||
2. For example add the following to your `hotkey.yml`. You can use short names or resource name to specify a command ie same as typing it in command mode.
|
||||
|
||||
```yaml
|
||||
hotKey:
|
||||
shift-0:
|
||||
shortCut: Shift-0
|
||||
description: View pods
|
||||
command: pods
|
||||
shift-1:
|
||||
shortCut: Shift-1
|
||||
description: View deployments
|
||||
command: dp
|
||||
shift-2:
|
||||
shortCut: Shift-2
|
||||
description: View services
|
||||
command: service
|
||||
shift-3:
|
||||
shortCut: Shift-3
|
||||
description: View statefulsets
|
||||
command: statefulsets
|
||||
```
|
||||
|
||||
Not feeling so hot? Your custom hotkeys list will be listed in the help view.`<?>`.
|
||||
|
||||
You can choose any keyboard shotcuts that make sense to you, provided they are not part of the standard K9s shortcuts list.
|
||||
|
||||
## PullRequests
|
||||
|
||||
* [PR #447](https://github.com/derailed/k9s/pull/447) K9s MacPorts support. Thank you! [Nils Breunese](https://github.com/breun)
|
||||
* [PR #446](https://github.com/derailed/k9s/pull/446) Same key invert sort. Big thanks!! [James Hiew](https://github.com/jameshiew)
|
||||
* [PR #445](https://github.com/derailed/k9s/pull/445) Use `?` to toggle help. Major thanks!! [Ramz](https://github.com/ageekymonk)
|
||||
* [PR #443](https://github.com/derailed/k9s/pull/443) Hex color skin support. Great work! [Gavin Ray](https://github.com/gavinray97)
|
||||
* [PR #442](https://github.com/derailed/k9s/pull/442) Full screen/Wrap support on log view. ATTA BOY! [Shiv3](https://github.com/shiv3)
|
||||
* [PR #412](https://github.com/derailed/k9s/pull/412) Simplify cruder interface. ATTA BOY!! (as always)[Gustavo Silva Paiva](https://github.com/paivagustavo)
|
||||
* [PR #350](https://github.com/derailed/k9s/pull/350) Sanitize file name before saving. All credits to [Tuomo Syvänperä](https://github.com/syvanpera)
|
||||
|
||||
---
|
||||
|
||||
## Resolved Bugs/Features
|
||||
|
||||
* [Issue #437](https://github.com/derailed/k9s/issues/437) Error when viewing cluster role on a role binding.
|
||||
* [Issue #434](https://github.com/derailed/k9s/issues/434) Same key `?` toggle help.
|
||||
* [Issue #432](https://github.com/derailed/k9s/issues/432) Add address field to port forwards.
|
||||
* [Issue #431](https://github.com/derailed/k9s/issues/431) Add LimitRange resource support.
|
||||
* [Issue #430](https://github.com/derailed/k9s/issues/430) Add HotKey support.
|
||||
* [Issue #426](https://github.com/derailed/k9s/issues/426) Address slow scroll while in table view.
|
||||
* [Issue #417](https://github.com/derailed/k9s/issues/417) Ensure code lints correctly. Thank you Gustavo!!
|
||||
* [Issue #415](https://github.com/derailed/k9s/issues/415) Add provisions to support longer clusterinfo/namespace header.
|
||||
* [Issue #408](https://github.com/derailed/k9s/issues/408) Same key toggle inverse sort.
|
||||
* [Issue #402](https://github.com/derailed/k9s/issues/402) Add `all` support to plugin scope.
|
||||
* [Issue #401](https://github.com/derailed/k9s/issues/401) Add support for custom plugins on all views.
|
||||
|
||||
---
|
||||
|
||||
<img src="https://raw.githubusercontent.com/derailed/k9s/master/assets/imhotep_logo.png" width="32" height="auto"/> © 2019 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
||||
34
go.sum
34
go.sum
|
|
@ -28,6 +28,7 @@ github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab/go.mod h1:3VYc5
|
|||
github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E=
|
||||
github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
|
||||
github.com/Microsoft/hcsshim v0.0.0-20190417211021-672e52e9209d/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg=
|
||||
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46 h1:lsxEuwrXEAokXB9qhlbKWPpo3KMLZQ5WB5WLQRW1uq0=
|
||||
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
|
||||
github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
|
|
@ -40,6 +41,7 @@ github.com/Rican7/retry v0.1.0/go.mod h1:FgOROf8P5bebcC1DS0PdOQiqGUridaZvikzUmkF
|
|||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
|
||||
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
|
||||
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
|
||||
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA=
|
||||
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
|
||||
github.com/atotto/clipboard v0.1.2 h1:YZCtFu5Ie8qX2VmVTBnrqLSiU9XOWwqNRmdT3gIQzbY=
|
||||
github.com/atotto/clipboard v0.1.2/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
|
||||
|
|
@ -47,8 +49,10 @@ github.com/auth0/go-jwt-middleware v0.0.0-20170425171159-5493cabe49f7/go.mod h1:
|
|||
github.com/aws/aws-sdk-go v1.16.26/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
|
||||
github.com/bazelbuild/bazel-gazelle v0.0.0-20181012220611-c728ce9f663e/go.mod h1:uHBSeeATKpVazAACZBDPL/Nk/UhQDDsJWDlqYJo8/Us=
|
||||
github.com/bazelbuild/buildtools v0.0.0-20180226164855-80c7f0d45d7e/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/bifurcation/mint v0.0.0-20180715133206-93c51c6ce115/go.mod h1:zVt7zX3K/aDCk9Tj+VM7YymsX66ERvzCJzw8rFCX2JU=
|
||||
github.com/blang/semver v3.5.0+incompatible h1:CGxCgetQ64DKk7rdZ++Vfnb1+ogGNnB17OJKJXD2Cfs=
|
||||
github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
|
||||
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
|
||||
github.com/caddyserver/caddy v1.0.3/go.mod h1:G+ouvOY32gENkJC+jhgl62TyhvqEsFaDiZ4uw0RzP1E=
|
||||
|
|
@ -70,13 +74,16 @@ github.com/coredns/corefile-migration v1.0.2/go.mod h1:OFwBp/Wc9dJt5cAZzHWMNhK1r
|
|||
github.com/coreos/bbolt v1.3.1-coreos.6/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/etcd v3.3.15+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/etcd v3.3.17+incompatible h1:f/Z3EoDSx1yjaIjLQGo1diYUlQYSBrrAQ5vP8NjwXwo=
|
||||
github.com/coreos/etcd v3.3.17+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
|
||||
github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
|
||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8=
|
||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea h1:n2Ltr3SrfQlf/9nOna1DoGKxLx3qTSI8Ttl6Xrqp6mw=
|
||||
github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
github.com/coreos/rkt v1.30.0/go.mod h1:O634mlH6U7qk87poQifK6M2rsFNt+FyUTWNMnP1hF1U=
|
||||
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
|
||||
|
|
@ -128,6 +135,7 @@ github.com/ghodss/yaml v0.0.0-20180820084758-c7ce16629ff4/go.mod h1:4dBDuWmgqj2H
|
|||
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
|
||||
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 h1:DujepqpGd1hyOd7aW59XpK7Qymp8iy83xq74fLr21is=
|
||||
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
|
||||
github.com/go-acme/lego v2.5.0+incompatible/go.mod h1:yzMNe9CasVUhkquNvti5nAtPmG94USbYxYrZfTkIn0M=
|
||||
github.com/go-bindata/go-bindata v3.1.1+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo=
|
||||
|
|
@ -135,9 +143,11 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7
|
|||
github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI=
|
||||
github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik=
|
||||
github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik=
|
||||
github.com/go-openapi/analysis v0.19.2 h1:ophLETFestFZHk3ji7niPEL4d466QjW+0Tdg5VyDq7E=
|
||||
github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk=
|
||||
github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0=
|
||||
github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0=
|
||||
github.com/go-openapi/errors v0.19.2 h1:a2kIyV3w+OS3S97zxUndRVD46+FhGOUBDFY7nmu4CsY=
|
||||
github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94=
|
||||
github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0=
|
||||
github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M=
|
||||
|
|
@ -152,8 +162,10 @@ github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwoh
|
|||
github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU=
|
||||
github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU=
|
||||
github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU=
|
||||
github.com/go-openapi/loads v0.19.2 h1:rf5ArTHmIJxyV5Oiks+Su0mUens1+AjpkPoWr5xFRcI=
|
||||
github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs=
|
||||
github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA=
|
||||
github.com/go-openapi/runtime v0.19.0 h1:sU6pp4dSV2sGlNKKyHxZzi1m1kG4WnYtWcJ+HYbygjE=
|
||||
github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64=
|
||||
github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc=
|
||||
github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI=
|
||||
|
|
@ -162,6 +174,7 @@ github.com/go-openapi/spec v0.19.2 h1:SStNd1jRcYtfKCN7R0laGNs80WYYvn5CbBjM2sOmCr
|
|||
github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY=
|
||||
github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU=
|
||||
github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU=
|
||||
github.com/go-openapi/strfmt v0.19.0 h1:0Dn9qy1G9+UJfRU7TR8bmdGxb4uifB7HNrJjOnV0yPk=
|
||||
github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY=
|
||||
github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I=
|
||||
github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg=
|
||||
|
|
@ -169,6 +182,7 @@ github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/
|
|||
github.com/go-openapi/swag v0.19.2 h1:jvO6bCMBEilGwMfHhrd61zIID4oIFdwb76V17SM88dE=
|
||||
github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
|
||||
github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4=
|
||||
github.com/go-openapi/validate v0.19.2 h1:ky5l57HjyVRrsJfd2+Ro5Z9PjGuKbsmftwyMtk8H7js=
|
||||
github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA=
|
||||
github.com/go-ozzo/ozzo-validation v3.5.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU=
|
||||
github.com/godbus/dbus v4.1.0+incompatible/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
|
||||
|
|
@ -176,6 +190,7 @@ github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d h1:3PaI8p3seN09Vjb
|
|||
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk=
|
||||
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.2.0 h1:28o5sBqPkBsMGnC6b4MvE2TzSr5/AT4c/1fLqVGIwlk=
|
||||
|
|
@ -202,6 +217,7 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi
|
|||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
|
||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
|
||||
|
|
@ -217,6 +233,7 @@ github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:Fecb
|
|||
github.com/gregjones/httpcache v0.0.0-20190212212710-3befbb6ad0cc h1:f8eY6cV/x1x+HLjOp4r72s/31/V2aTUtg5oKRRPf8/Q=
|
||||
github.com/gregjones/httpcache v0.0.0-20190212212710-3befbb6ad0cc/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v0.0.0-20190222133341-cfaf5686ec79/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.3.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=
|
||||
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
|
||||
|
|
@ -279,6 +296,7 @@ github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp
|
|||
github.com/mattn/go-runewidth v0.0.5 h1:jrGtp51JOKTWgvLFzfG6OtZOJcK2sEnzc/U+zw7TtbA=
|
||||
github.com/mattn/go-runewidth v0.0.5/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/mattn/go-shellwords v1.0.5/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/mesos/mesos-go v0.0.9/go.mod h1:kPYCMQ9gsOXVAle1OsoY4I1+9kPu8GHkf88aV59fDr4=
|
||||
github.com/mholt/certmagic v0.6.2-0.20190624175158-6a42ef9fe8c2/go.mod h1:g4cOPxcjV0oFq3qwpjSA30LReKD8AoIfwAY9VvG35NY=
|
||||
|
|
@ -288,6 +306,7 @@ github.com/mindprince/gonvml v0.0.0-20171110221305-fee913ce8fb2/go.mod h1:2eu9pR
|
|||
github.com/mistifyio/go-zfs v2.1.1+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
|
||||
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
|
|
@ -299,6 +318,7 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb
|
|||
github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
|
||||
github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
||||
github.com/mrunalp/fileutils v0.0.0-20160930181131-4ee1cc9a8058/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0=
|
||||
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d h1:7PxY7LVfSZm7PEeBTyK1rj1gABdCO2mbri6GKO1cMDs=
|
||||
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/mvdan/xurls v1.1.0/go.mod h1:tQlNn3BED8bE/15hnSL2HLkDeLWpNPAwtw7wkEq44oU=
|
||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
|
||||
|
|
@ -316,6 +336,7 @@ github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zM
|
|||
github.com/opencontainers/runc v1.0.0-rc2.0.20190611121236-6cc515888830/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
|
||||
github.com/opencontainers/runtime-spec v1.0.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
||||
github.com/opencontainers/selinux v1.2.2/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs=
|
||||
github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=
|
||||
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
|
||||
github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
|
|
@ -331,9 +352,13 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
|
|||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
|
||||
github.com/pquerna/ffjson v0.0.0-20180717144149-af8b230fcd20/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M=
|
||||
github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740=
|
||||
github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM=
|
||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8=
|
||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/common v0.0.0-20181126121408-4724e9255275 h1:PnBWHBf+6L0jOqq0gIVUe6Yk0/QMZ640k6NvkxcBf+8=
|
||||
github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
|
||||
github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a h1:9a8MnZMP0X2nLJdBg+pBmGgkJlSaKC2KaQmTCk1XDtE=
|
||||
github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/quobyte/api v0.1.2/go.mod h1:jL7lIHrmqQ7yh05OJ+eEEdHr0u/kmT1Ff9iHd+4H6VI=
|
||||
github.com/rakyll/hey v0.1.2 h1:XlGaKcBdmXJaPImiTnE+TGLDUWQ2toYuHCwdrylLjmg=
|
||||
|
|
@ -398,8 +423,11 @@ github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSf
|
|||
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
|
||||
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
|
||||
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
|
||||
go.uber.org/atomic v0.0.0-20181018215023-8dc6146f7569 h1:nSQar3Y0E3VQF/VdZ8PTAilaXpER+d7ypdABCrpwMdg=
|
||||
go.uber.org/atomic v0.0.0-20181018215023-8dc6146f7569/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/multierr v0.0.0-20180122172545-ddea229ff1df h1:shvkWr0NAZkg4nPuE3XrKP0VuBPijjk3TfX6Y6acFNg=
|
||||
go.uber.org/multierr v0.0.0-20180122172545-ddea229ff1df/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/zap v0.0.0-20180814183419-67bc79d13d15 h1:Z2sc4+v0JHV6Mn4kX1f2a5nruNjmV+Th32sugE8zwz8=
|
||||
go.uber.org/zap v0.0.0-20180814183419-67bc79d13d15/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
golang.org/x/crypto v0.0.0-20180426230345-b49d69b5da94/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
|
|
@ -505,9 +533,11 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
|
|||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873 h1:nfPFGzJkUDX6uBmpN/pSw7MbOAWegH5QDQuoXFHedLg=
|
||||
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
|
||||
google.golang.org/grpc v1.23.0 h1:AzbTB6ux+okLTzP8Ru1Xs41C303zdcfEht7MQnYJt5A=
|
||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
||||
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
|
@ -520,6 +550,7 @@ gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
|||
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/mcuadros/go-syslog.v2 v2.2.1/go.mod h1:l5LPIyOOyIdQquNg+oU6Z3524YwrcqEm0aKH+5zpt2U=
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
|
||||
gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
|
|
@ -544,6 +575,7 @@ k8s.io/apiextensions-apiserver v0.0.0-20190918161926-8f644eb6e783 h1:V6ndwCPoao1
|
|||
k8s.io/apiextensions-apiserver v0.0.0-20190918161926-8f644eb6e783/go.mod h1:xvae1SZB3E17UpV59AWc271W/Ph25N+bjPyR63X6tPY=
|
||||
k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655 h1:CS1tBQz3HOXiseWZu6ZicKX361CZLT97UFnnPx0aqBw=
|
||||
k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655/go.mod h1:nL6pwRT8NgfF8TT68DBI8uEePRt89cSvoXUVqbkWHq4=
|
||||
k8s.io/apiserver v0.0.0-20190918160949-bfa5e2e684ad h1:IMoNR9pilTBaCS5WpwWnAdmoVYVeXowOD3bLrwxIAtQ=
|
||||
k8s.io/apiserver v0.0.0-20190918160949-bfa5e2e684ad/go.mod h1:XPCXEwhjaFN29a8NldXA901ElnKeKLrLtREO9ZhFyhg=
|
||||
k8s.io/cli-runtime v0.0.0-20190918162238-f783a3654da8 h1:W3zT6wRwUKkEGnUu1OAAJFwcgETlCu1BLdNP/VCTFuM=
|
||||
k8s.io/cli-runtime v0.0.0-20190918162238-f783a3654da8/go.mod h1:WRliO+M6Osz7/zdOF0RI42IsJgSYHUwbLgqAWJPneSs=
|
||||
|
|
@ -552,6 +584,7 @@ k8s.io/client-go v0.0.0-20190918160344-1fbdaa4c8d90/go.mod h1:J69/JveO6XESwVgG53
|
|||
k8s.io/cloud-provider v0.0.0-20190918163234-a9c1f33e9fb9/go.mod h1:YfUBehfPUDgnhqAFcuXj8haXt/v86nhy8r4ZOuSvXhg=
|
||||
k8s.io/cluster-bootstrap v0.0.0-20190918163108-da9fdfce26bb/go.mod h1:mQVbtFRxlw/BzBqBaQwIMzjDTST1KrGtzWaR4CGlsTU=
|
||||
k8s.io/code-generator v0.0.0-20190912054826-cd179ad6a269/go.mod h1:V5BD6M4CyaN5m+VthcclXWsVcT1Hu+glwa1bi3MIsyE=
|
||||
k8s.io/component-base v0.0.0-20190918160511-547f6c5d7090 h1:0UWOjjag5IcVoAko0g+3qGhegdwWkRf4v4AHCIMVwnc=
|
||||
k8s.io/component-base v0.0.0-20190918160511-547f6c5d7090/go.mod h1:933PBGtQFJky3TEwYx4aEPZ4IxqhWh3R6DCmzqIn1hA=
|
||||
k8s.io/cri-api v0.0.0-20190828162817-608eb1dad4ac/go.mod h1:BvtUaNBr0fEpzb11OfrQiJLsLPtqbmulpo1fPwcpP6Q=
|
||||
k8s.io/csi-translation-lib v0.0.0-20190918163402-db86a8c7bb21/go.mod h1:Ja9f0K9MkTuUSyBgpjFt2am69TOjrmkQUN25WTF3CCM=
|
||||
|
|
@ -588,6 +621,7 @@ modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I=
|
|||
sigs.k8s.io/kustomize v2.0.3+incompatible h1:JUufWFNlI44MdtnjUqVnvh29rR37PQFzPbLXqhyOyX0=
|
||||
sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU=
|
||||
sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI=
|
||||
sigs.k8s.io/structured-merge-diff v0.0.0-20190817042607-6149e4549fca h1:6dsH6AYQWbyZmtttJNe8Gq1cXOeS1BdV3eW37zHilAQ=
|
||||
sigs.k8s.io/structured-merge-diff v0.0.0-20190817042607-6149e4549fca/go.mod h1:IIgPezJWb76P0hotTxzDbWsMYB8APh18qZnxkomBpxA=
|
||||
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
|
|
|
|||
|
|
@ -176,6 +176,7 @@ func loadPreferred(f Factory, m ResourceMetas) error {
|
|||
for _, r := range rr {
|
||||
for _, res := range r.APIResources {
|
||||
gvr := client.FromGVAndR(r.GroupVersion, res.Name)
|
||||
log.Debug().Msgf("GVR %s", gvr)
|
||||
res.Group, res.Version = gvr.ToG(), gvr.ToV()
|
||||
m[gvr] = res
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,4 +22,6 @@ const (
|
|||
KeySubjectName ContextKey = "subjectName"
|
||||
KeyNamespace ContextKey = "namespace"
|
||||
KeyCluster ContextKey = "cluster"
|
||||
KeyApp ContextKey = "app"
|
||||
KeyStyles ContextKey = "styles"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -166,6 +166,7 @@ func (t *Table) reconcile(ctx context.Context) error {
|
|||
m.Model = &Resource{}
|
||||
}
|
||||
m.Model.Init(t.namespace, string(t.gvr), factory)
|
||||
|
||||
oo, err := m.Model.List(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
@ -175,6 +176,13 @@ func (t *Table) reconcile(ctx context.Context) error {
|
|||
if err := m.Model.Hydrate(oo, rows, m.Renderer); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// if labelSelector in place might as well clear the model data.
|
||||
sel, ok := ctx.Value(internal.KeyLabels).(string)
|
||||
if ok && sel != "" {
|
||||
t.data.Clear()
|
||||
}
|
||||
|
||||
t.data.Update(rows)
|
||||
t.data.Namespace, t.data.Header = t.namespace, m.Renderer.Header(t.namespace)
|
||||
|
||||
|
|
|
|||
|
|
@ -5,10 +5,8 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
// ext "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
// "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// CustomResourceDefinition renders a K8s CustomResourceDefinition to screen.
|
||||
|
|
@ -34,15 +32,6 @@ func (CustomResourceDefinition) Render(o interface{}, ns string, r *Row) error {
|
|||
return fmt.Errorf("Expected CustomResourceDefinition, but got %T", o)
|
||||
}
|
||||
|
||||
// BOZO!!
|
||||
// log.Debug().Msgf("CRDO %#v", crd)
|
||||
// var cr ext.CustomResourceDefinition
|
||||
// err := runtime.DefaultUnstructuredConverter.FromUnstructured(o.(*unstructured.Unstructured).Object, &cr)
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// log.Debug().Msgf("\n%#v", cr)
|
||||
|
||||
meta, ok := crd.Object["metadata"].(map[string]interface{})
|
||||
if !ok {
|
||||
return fmt.Errorf("expecting an interface map but got %T", crd.Object["metadata"])
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ func (h HorizontalPodAutoscaler) Render(o interface{}, ns string, r *Row) error
|
|||
if !ok {
|
||||
return fmt.Errorf("Expected HorizontalPodAutoscaler, but got %T", o)
|
||||
}
|
||||
|
||||
var hpa autoscalingv1.HorizontalPodAutoscaler
|
||||
err := runtime.DefaultUnstructuredConverter.FromUnstructured(raw.Object, &hpa)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
package ui
|
||||
|
||||
type ContextKey string
|
||||
|
||||
const (
|
||||
// KeyApp designates an application context.
|
||||
KeyApp = ContextKey("app")
|
||||
|
||||
// KeyStyles designates the application styles.
|
||||
KeyStyles = ContextKey("styles")
|
||||
|
||||
// KeyNamespace designates a namespace context.
|
||||
KeyNamespace = ContextKey("ns")
|
||||
)
|
||||
|
|
@ -6,6 +6,7 @@ import (
|
|||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/derailed/k9s/internal"
|
||||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
|
@ -36,7 +37,7 @@ var (
|
|||
)
|
||||
|
||||
func mustExtractSyles(ctx context.Context) *config.Styles {
|
||||
styles, ok := ctx.Value(KeyStyles).(*config.Styles)
|
||||
styles, ok := ctx.Value(internal.KeyStyles).(*config.Styles)
|
||||
if !ok {
|
||||
log.Fatal().Msg("Expecting valid styles")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/derailed/k9s/internal"
|
||||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
|
|
@ -14,7 +15,7 @@ import (
|
|||
|
||||
func TestTableNew(t *testing.T) {
|
||||
v := ui.NewTable("fred")
|
||||
ctx := context.WithValue(context.Background(), ui.KeyStyles, config.NewStyles())
|
||||
ctx := context.WithValue(context.Background(), internal.KeyStyles, config.NewStyles())
|
||||
v.Init(ctx)
|
||||
|
||||
assert.Equal(t, "fred", v.BaseTitle)
|
||||
|
|
@ -22,7 +23,7 @@ func TestTableNew(t *testing.T) {
|
|||
|
||||
func TestTableUpdate(t *testing.T) {
|
||||
v := ui.NewTable("fred")
|
||||
ctx := context.WithValue(context.Background(), ui.KeyStyles, config.NewStyles())
|
||||
ctx := context.WithValue(context.Background(), internal.KeyStyles, config.NewStyles())
|
||||
v.Init(ctx)
|
||||
|
||||
v.Update(makeTableData())
|
||||
|
|
@ -33,7 +34,7 @@ func TestTableUpdate(t *testing.T) {
|
|||
|
||||
func TestTableSelection(t *testing.T) {
|
||||
v := ui.NewTable("fred")
|
||||
ctx := context.WithValue(context.Background(), ui.KeyStyles, config.NewStyles())
|
||||
ctx := context.WithValue(context.Background(), internal.KeyStyles, config.NewStyles())
|
||||
v.Init(ctx)
|
||||
m := &testModel{}
|
||||
v.SetModel(m)
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ func hotKeyActions(r Runner, aa ui.KeyActions) {
|
|||
|
||||
func gotoCmd(r Runner, cmd string) ui.ActionHandler {
|
||||
return func(evt *tcell.EventKey) *tcell.EventKey {
|
||||
if err := r.App().gotoResource(cmd); err != nil {
|
||||
if err := r.App().gotoResource(cmd, true); err != nil {
|
||||
r.App().Flash().Err(err)
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ func (a *Alias) gotoCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
if r != 0 {
|
||||
s := ui.TrimCell(a.GetTable().SelectTable, r, 1)
|
||||
tokens := strings.Split(s, ",")
|
||||
if err := a.App().gotoResource(tokens[0]); err != nil {
|
||||
if err := a.App().gotoResource(tokens[0], true); err != nil {
|
||||
a.App().Flash().Err(err)
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/derailed/k9s/internal"
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
|
|
@ -67,8 +68,8 @@ func (b *buffL) BufferActive(state bool, kind ui.BufferKind) {
|
|||
|
||||
func makeContext() context.Context {
|
||||
a := view.NewApp(config.NewConfig(ks{}))
|
||||
ctx := context.WithValue(context.Background(), ui.KeyApp, a)
|
||||
return context.WithValue(ctx, ui.KeyStyles, a.Styles)
|
||||
ctx := context.WithValue(context.Background(), internal.KeyApp, a)
|
||||
return context.WithValue(ctx, internal.KeyStyles, a.Styles)
|
||||
}
|
||||
|
||||
type ks struct{}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/derailed/k9s/internal"
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
|
|
@ -64,7 +65,7 @@ func (a *App) PrevCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
}
|
||||
|
||||
func (a *App) Init(version string, rate int) error {
|
||||
ctx := context.WithValue(context.Background(), ui.KeyApp, a)
|
||||
ctx := context.WithValue(context.Background(), internal.KeyApp, a)
|
||||
if err := a.Content.Init(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -127,10 +128,11 @@ func (a *App) StylesChanged(s *config.Styles) {
|
|||
|
||||
func (a *App) bindKeys() {
|
||||
a.AddActions(ui.KeyActions{
|
||||
ui.KeyH: ui.NewKeyAction("ToggleHeader", a.toggleHeaderCmd, false),
|
||||
ui.KeyHelp: ui.NewKeyAction("Help", a.helpCmd, false),
|
||||
tcell.KeyCtrlA: ui.NewKeyAction("Aliases", a.aliasCmd, false),
|
||||
ui.KeyH: ui.NewSharedKeyAction("ToggleHeader", a.toggleHeaderCmd, false),
|
||||
ui.KeyHelp: ui.NewSharedKeyAction("Help", a.helpCmd, false),
|
||||
tcell.KeyCtrlA: ui.NewSharedKeyAction("Aliases", a.aliasCmd, false),
|
||||
tcell.KeyEnter: ui.NewKeyAction("Goto", a.gotoCmd, false),
|
||||
tcell.KeyCtrlU: ui.NewSharedKeyAction("Clear Filter", a.clearCmd, false),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -289,7 +291,7 @@ func (a *App) switchCtx(name string, loadPods bool) error {
|
|||
log.Error().Err(err).Msg("Config save failed!")
|
||||
}
|
||||
a.Flash().Infof("Switching context to %s", name)
|
||||
if err := a.gotoResource("pods"); loadPods && err != nil {
|
||||
if err := a.gotoResource("pods", true); loadPods && err != nil {
|
||||
a.Flash().Err(err)
|
||||
}
|
||||
a.refreshClusterInfo()
|
||||
|
|
@ -383,9 +385,18 @@ func (a *App) toggleHeaderCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (a *App) clearCmd(evt *tcell.EventKey) *tcell.EventKey {
|
||||
if !a.CmdBuff().IsActive() {
|
||||
return evt
|
||||
}
|
||||
a.CmdBuff().Clear()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *App) gotoCmd(evt *tcell.EventKey) *tcell.EventKey {
|
||||
if a.CmdBuff().IsActive() && !a.CmdBuff().Empty() {
|
||||
if err := a.gotoResource(a.GetCmd()); err != nil {
|
||||
if err := a.gotoResource(a.GetCmd(), true); err != nil {
|
||||
log.Error().Err(err).Msgf("Goto resource for %q failed", a.GetCmd())
|
||||
a.Flash().Err(err)
|
||||
return nil
|
||||
|
|
@ -431,12 +442,12 @@ func (a *App) aliasCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (a *App) gotoResource(res string) error {
|
||||
return a.command.run(res)
|
||||
func (a *App) gotoResource(res string, clearStack bool) error {
|
||||
return a.command.run(res, clearStack)
|
||||
}
|
||||
|
||||
func (a *App) inject(c model.Component) error {
|
||||
ctx := context.WithValue(context.Background(), ui.KeyApp, a)
|
||||
ctx := context.WithValue(context.Background(), internal.KeyApp, a)
|
||||
if err := c.Init(ctx); err != nil {
|
||||
return fmt.Errorf("component init failed for %q %v", c.Name(), err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,5 +12,5 @@ func TestAppNew(t *testing.T) {
|
|||
a := view.NewApp(config.NewConfig(ks{}))
|
||||
a.Init("blee", 10)
|
||||
|
||||
assert.Equal(t, 11, len(a.GetActions()))
|
||||
assert.Equal(t, 12, len(a.GetActions()))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,25 +67,6 @@ func fileToSubject(path string) string {
|
|||
return ee[0] + "/" + ee[1]
|
||||
}
|
||||
|
||||
// BOZO!!
|
||||
// func (b *Benchmark) deleteCmd(evt *tcell.EventKey) *tcell.EventKey {
|
||||
// if !b.GetTable().RowSelected() {
|
||||
// return nil
|
||||
// }
|
||||
|
||||
// sel, file := b.GetTable().GetSelectedItem(), b.benchFile()
|
||||
// dir := filepath.Join(perf.K9sBenchDir, b.App().Config.K9s.CurrentCluster)
|
||||
// showModal(b.App().Content.Pages, fmt.Sprintf("Delete benchmark `%s?", file), func() {
|
||||
// if err := os.Remove(filepath.Join(dir, file)); err != nil {
|
||||
// b.App().Flash().Errf("Unable to delete file %s", err)
|
||||
// return
|
||||
// }
|
||||
// b.App().Flash().Infof("Benchmark %s deleted!", sel)
|
||||
// })
|
||||
|
||||
// return nil
|
||||
// }
|
||||
|
||||
func (b *Benchmark) benchFile() string {
|
||||
r := b.GetTable().GetSelectedRowIndex()
|
||||
return ui.TrimCell(b.GetTable().SelectTable, r, 7)
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ func (b *Browser) Init(ctx context.Context) error {
|
|||
}
|
||||
}
|
||||
|
||||
b.bindKeys()
|
||||
if b.bindKeysFn != nil {
|
||||
b.bindKeysFn(b.Actions())
|
||||
}
|
||||
|
|
@ -88,6 +89,13 @@ func (b *Browser) Init(ctx context.Context) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (b *Browser) bindKeys() {
|
||||
b.Actions().Add(ui.KeyActions{
|
||||
tcell.KeyEscape: ui.NewSharedKeyAction("Filter Reset", b.resetCmd, false),
|
||||
tcell.KeyEnter: ui.NewSharedKeyAction("Filter", b.filterCmd, false),
|
||||
})
|
||||
}
|
||||
|
||||
// Start initializes browser updates.
|
||||
func (b *Browser) Start() {
|
||||
b.Stop()
|
||||
|
|
@ -104,6 +112,42 @@ func (b *Browser) Start() {
|
|||
b.GetModel().Watch(ctx)
|
||||
}
|
||||
|
||||
func (b *Browser) resetCmd(evt *tcell.EventKey) *tcell.EventKey {
|
||||
if !b.SearchBuff().InCmdMode() {
|
||||
b.SearchBuff().Reset()
|
||||
return b.App().PrevCmd(evt)
|
||||
}
|
||||
|
||||
cmd := b.SearchBuff().String()
|
||||
b.App().Flash().Info("Clearing filter...")
|
||||
b.SearchBuff().Reset()
|
||||
|
||||
if ui.IsLabelSelector(cmd) {
|
||||
b.Start()
|
||||
} else {
|
||||
b.Refresh()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (b *Browser) filterCmd(evt *tcell.EventKey) *tcell.EventKey {
|
||||
if !b.SearchBuff().IsActive() {
|
||||
return evt
|
||||
}
|
||||
|
||||
b.SearchBuff().SetActive(false)
|
||||
|
||||
cmd := b.SearchBuff().String()
|
||||
if ui.IsLabelSelector(cmd) {
|
||||
b.Start()
|
||||
return nil
|
||||
}
|
||||
b.Refresh()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Stop terminates browser updates.
|
||||
func (b *Browser) Stop() {
|
||||
if b.cancelFn == nil {
|
||||
|
|
@ -256,10 +300,17 @@ func (b *Browser) describeResource(app *App, _, _, sel string) {
|
|||
}
|
||||
|
||||
details := NewDetails("Describe")
|
||||
ctx := context.WithValue(context.Background(), internal.KeyApp, b.App())
|
||||
if err := details.Init(ctx); err != nil {
|
||||
log.Error().Err(err).Msg("Details init failed")
|
||||
return
|
||||
}
|
||||
details.SetSubject(sel)
|
||||
details.SetTextColor(b.app.Styles.FgColor())
|
||||
details.SetText(colorizeYAML(b.app.Styles.Views().Yaml, yaml))
|
||||
details.ScrollToBeginning()
|
||||
details.Update(yaml)
|
||||
// BOZO!!
|
||||
// details.SetText(colorizeYAML(b.app.Styles.Views().Yaml, yaml))
|
||||
// details.ScrollToBeginning()
|
||||
if err := b.app.inject(details); err != nil {
|
||||
b.app.Flash().Err(err)
|
||||
}
|
||||
|
|
@ -397,7 +448,11 @@ func (b *Browser) defaultContext() context.Context {
|
|||
ctx = context.WithValue(ctx, internal.KeyFactory, b.app.factory)
|
||||
ctx = context.WithValue(ctx, internal.KeyGVR, string(b.gvr))
|
||||
ctx = context.WithValue(ctx, internal.KeyPath, b.Path)
|
||||
|
||||
ctx = context.WithValue(ctx, internal.KeyLabels, "")
|
||||
if ui.IsLabelSelector(b.SearchBuff().String()) {
|
||||
ctx = context.WithValue(ctx, internal.KeyLabels, ui.TrimLabelSelector(b.SearchBuff().String()))
|
||||
}
|
||||
ctx = context.WithValue(ctx, internal.KeyFields, "")
|
||||
ctx = context.WithValue(ctx, internal.KeyNamespace, b.App().Config.ActiveNamespace())
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ func (c *Command) Reset() error {
|
|||
}
|
||||
|
||||
func (c *Command) defaultCmd() error {
|
||||
return c.run(c.app.Config.ActiveView())
|
||||
return c.run(c.app.Config.ActiveView(), true)
|
||||
}
|
||||
|
||||
var canRX = regexp.MustCompile(`\Acan\s([u|g|s]):([\w-:]+)\b`)
|
||||
|
|
@ -94,7 +94,7 @@ func (c *Command) viewMetaFor(cmd string) (string, *MetaViewer, error) {
|
|||
}
|
||||
|
||||
// Exec the Command by showing associated display.
|
||||
func (c *Command) run(cmd string) error {
|
||||
func (c *Command) run(cmd string, clearStack bool) error {
|
||||
if c.specialCmd(cmd) {
|
||||
return nil
|
||||
}
|
||||
|
|
@ -110,7 +110,7 @@ func (c *Command) run(cmd string) error {
|
|||
return fmt.Errorf("context switch failed!")
|
||||
}
|
||||
view := c.componentFor(gvr, v)
|
||||
return c.exec(gvr, view)
|
||||
return c.exec(gvr, view, clearStack)
|
||||
default:
|
||||
// checks if Command includes a namespace
|
||||
ns := c.app.Config.ActiveNamespace()
|
||||
|
|
@ -120,7 +120,7 @@ func (c *Command) run(cmd string) error {
|
|||
if !c.app.switchNS(ns) {
|
||||
return fmt.Errorf("namespace switch failed for ns %q", ns)
|
||||
}
|
||||
return c.exec(gvr, c.componentFor(gvr, v))
|
||||
return c.exec(gvr, c.componentFor(gvr, v), clearStack)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ func (c *Command) componentFor(gvr string, v *MetaViewer) ResourceViewer {
|
|||
return view
|
||||
}
|
||||
|
||||
func (c *Command) exec(gvr string, comp model.Component) error {
|
||||
func (c *Command) exec(gvr string, comp model.Component, clearStack bool) error {
|
||||
if comp == nil {
|
||||
return fmt.Errorf("No component given for %s", gvr)
|
||||
}
|
||||
|
|
@ -154,7 +154,9 @@ func (c *Command) exec(gvr string, comp model.Component) error {
|
|||
if err := c.app.Config.Save(); err != nil {
|
||||
log.Error().Err(err).Msg("Config save failed!")
|
||||
}
|
||||
c.app.Content.Stack.ClearHistory()
|
||||
if clearStack {
|
||||
c.app.Content.Stack.ClearHistory()
|
||||
}
|
||||
|
||||
return c.app.inject(comp)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ func (c *Context) useCtx(app *App, _, res, path string) {
|
|||
app.Flash().Err(err)
|
||||
return
|
||||
}
|
||||
if err := app.gotoResource("po"); err != nil {
|
||||
if err := app.gotoResource("po", true); err != nil {
|
||||
app.Flash().Err(err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import (
|
|||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/tview"
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
const detailsTitleFmt = "[fg:bg:b] %s([hilite:bg:b]%s[fg:bg:-])[fg:bg:-] "
|
||||
|
|
@ -22,6 +21,7 @@ type Details struct {
|
|||
actions ui.KeyActions
|
||||
app *App
|
||||
title, subject string
|
||||
buff string
|
||||
}
|
||||
|
||||
// NewDetails returns a details viewer.
|
||||
|
|
@ -35,7 +35,6 @@ func NewDetails(title string) *Details {
|
|||
|
||||
// Init initializes the viewer.
|
||||
func (d *Details) Init(ctx context.Context) error {
|
||||
log.Debug().Msgf(">>>> Details INIT %s", d.title)
|
||||
var err error
|
||||
if d.app, err = extractApp(ctx); err != nil {
|
||||
return err
|
||||
|
|
@ -44,6 +43,8 @@ func (d *Details) Init(ctx context.Context) error {
|
|||
if d.title != "" {
|
||||
d.SetBorder(true)
|
||||
}
|
||||
d.SetBackgroundColor(d.app.Styles.BgColor())
|
||||
d.SetTextColor(d.app.Styles.FgColor())
|
||||
d.SetScrollable(true)
|
||||
d.SetWrap(true)
|
||||
d.SetDynamicColors(true)
|
||||
|
|
@ -56,10 +57,23 @@ func (d *Details) Init(ctx context.Context) error {
|
|||
d.app.Draw()
|
||||
})
|
||||
d.updateTitle()
|
||||
d.app.Styles.AddListener(d)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *Details) StylesChanged(s *config.Styles) {
|
||||
d.SetBackgroundColor(d.app.Styles.BgColor())
|
||||
d.SetTextColor(d.app.Styles.FgColor())
|
||||
d.Update(d.buff)
|
||||
}
|
||||
|
||||
func (d *Details) Update(buff string) {
|
||||
d.buff = buff
|
||||
d.SetText(colorizeYAML(d.app.Styles.Views().Yaml, buff))
|
||||
d.ScrollToBeginning()
|
||||
}
|
||||
|
||||
func (d *Details) Actions() ui.KeyActions {
|
||||
return d.actions
|
||||
}
|
||||
|
|
@ -68,18 +82,15 @@ func (d *Details) Actions() ui.KeyActions {
|
|||
func (d *Details) Name() string { return d.title }
|
||||
|
||||
// Start starts the view updater.
|
||||
func (d *Details) Start() {
|
||||
log.Debug().Msgf("---- Details START %s", d.title)
|
||||
}
|
||||
func (d *Details) Start() {}
|
||||
|
||||
// Stop terminates the updater.
|
||||
func (d *Details) Stop() {
|
||||
log.Debug().Msgf("<<<< Details STOPPED %s", d.title)
|
||||
d.app.Styles.RemoveListener(d)
|
||||
}
|
||||
|
||||
// Hints returns menu hints.
|
||||
func (d *Details) Hints() model.MenuHints {
|
||||
log.Debug().Msgf("Details hints %#v", d.actions.Hints())
|
||||
return d.actions.Hints()
|
||||
}
|
||||
|
||||
|
|
@ -98,7 +109,6 @@ func (d *Details) keyboard(evt *tcell.EventKey) *tcell.EventKey {
|
|||
}
|
||||
|
||||
if a, ok := d.actions[key]; ok {
|
||||
log.Debug().Msgf(">> DetailsView handled %s", tcell.KeyNames[key])
|
||||
return a.Action(evt)
|
||||
}
|
||||
return evt
|
||||
|
|
|
|||
|
|
@ -39,11 +39,13 @@ func (v *Help) Init(ctx context.Context) error {
|
|||
if err := v.Table.Init(ctx); err != nil {
|
||||
return nil
|
||||
}
|
||||
v.SetSelectable(false, false)
|
||||
v.resetTitle()
|
||||
v.SetBorder(true)
|
||||
v.SetBorderPadding(0, 0, 1, 1)
|
||||
v.bindKeys()
|
||||
v.build(v.app.Content.Top().Hints())
|
||||
v.SetBackgroundColor(v.App().Styles.BgColor())
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
@ -153,6 +155,10 @@ func (v *Help) showGeneral() model.MenuHints {
|
|||
Mnemonic: "Ctrl-r",
|
||||
Description: "Refresh",
|
||||
},
|
||||
{
|
||||
Mnemonic: "Ctrl-u",
|
||||
Description: "Clear command",
|
||||
},
|
||||
{
|
||||
Mnemonic: "h",
|
||||
Description: "Toggle Header",
|
||||
|
|
@ -183,6 +189,7 @@ func (v *Help) resetTitle() {
|
|||
func (v *Help) build(hh model.MenuHints) {
|
||||
v.Clear()
|
||||
sort.Sort(hh)
|
||||
|
||||
var col int
|
||||
v.addSection(col, "RESOURCE", hh)
|
||||
col += 2
|
||||
|
|
@ -197,12 +204,20 @@ func (v *Help) build(hh model.MenuHints) {
|
|||
v.addSection(col, "HELP", v.showHelp())
|
||||
}
|
||||
|
||||
func (v *Help) addSpacer(c int) {
|
||||
cell := tview.NewTableCell("")
|
||||
cell.SetBackgroundColor(v.App().Styles.BgColor())
|
||||
cell.SetExpansion(1)
|
||||
v.SetCell(0, c, cell)
|
||||
}
|
||||
|
||||
func (v *Help) addSection(c int, title string, hh model.MenuHints) {
|
||||
row := 0
|
||||
v.addSpacer(c)
|
||||
cell := tview.NewTableCell(title)
|
||||
cell.SetTextColor(tcell.ColorGreen)
|
||||
cell.SetAttributes(tcell.AttrBold)
|
||||
cell.SetExpansion(2)
|
||||
cell.SetExpansion(1)
|
||||
cell.SetAlign(tview.AlignLeft)
|
||||
v.SetCell(row, c+1, cell)
|
||||
row++
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package view_test
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/derailed/k9s/internal"
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/k9s/internal/view"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
|
@ -12,7 +12,7 @@ import (
|
|||
func TestHelp(t *testing.T) {
|
||||
ctx := makeCtx()
|
||||
|
||||
app := ctx.Value(ui.KeyApp).(*view.App)
|
||||
app := ctx.Value(internal.KeyApp).(*view.App)
|
||||
po := view.NewPod(client.GVR("v1/pods"))
|
||||
po.Init(ctx)
|
||||
app.Content.Push(po)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import (
|
|||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
|
@ -50,7 +49,7 @@ func podCtx(path, labelSel, fieldSel string) ContextFunc {
|
|||
}
|
||||
|
||||
func extractApp(ctx context.Context) (*App, error) {
|
||||
app, ok := ctx.Value(ui.KeyApp).(*App)
|
||||
app, ok := ctx.Value(internal.KeyApp).(*App)
|
||||
if !ok {
|
||||
return nil, errors.New("No application found in context")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ func (n *Namespace) bindKeys(aa ui.KeyActions) {
|
|||
|
||||
func (n *Namespace) switchNs(app *App, _, res, sel string) {
|
||||
n.useNamespace(sel)
|
||||
if err := app.gotoResource("po"); err != nil {
|
||||
if err := app.gotoResource("pods", true); err != nil {
|
||||
app.Flash().Err(err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ import (
|
|||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/derailed/k9s/internal"
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/derailed/k9s/internal/view"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
|
@ -23,5 +23,5 @@ func TestPodNew(t *testing.T) {
|
|||
|
||||
func makeCtx() context.Context {
|
||||
cfg := config.NewConfig(ks{})
|
||||
return context.WithValue(context.Background(), ui.KeyApp, view.NewApp(cfg))
|
||||
return context.WithValue(context.Background(), internal.KeyApp, view.NewApp(cfg))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/derailed/k9s/internal/client"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
func loadCustomViewers() MetaViewers {
|
||||
|
|
@ -122,11 +121,9 @@ func extRes(vv MetaViewers) {
|
|||
}
|
||||
|
||||
func showCRD(app *App, ns, gvr, path string) {
|
||||
log.Debug().Msgf(">>> CRD View %q -- %q -- %q", ns, gvr, path)
|
||||
_, crdGVR := client.Namespaced(path)
|
||||
log.Debug().Msgf("CRD %q", crdGVR)
|
||||
tokens := strings.Split(crdGVR, ".")
|
||||
if err := app.gotoResource(tokens[0]); err != nil {
|
||||
if err := app.gotoResource(tokens[0], false); err != nil {
|
||||
app.Flash().Err(err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/derailed/k9s/internal"
|
||||
"github.com/derailed/k9s/internal/ui"
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
|
@ -12,9 +13,8 @@ import (
|
|||
type Table struct {
|
||||
*ui.Table
|
||||
|
||||
app *App
|
||||
filterFn func(string)
|
||||
enterFn EnterFunc
|
||||
app *App
|
||||
enterFn EnterFunc
|
||||
}
|
||||
|
||||
func NewTable(gvr string) *Table {
|
||||
|
|
@ -28,7 +28,7 @@ func (t *Table) Init(ctx context.Context) (err error) {
|
|||
if t.app, err = extractApp(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
ctx = context.WithValue(ctx, ui.KeyStyles, t.app.Styles)
|
||||
ctx = context.WithValue(ctx, internal.KeyStyles, t.app.Styles)
|
||||
t.Table.Init(ctx)
|
||||
t.bindKeys()
|
||||
|
||||
|
|
@ -90,8 +90,7 @@ func (t *Table) bindKeys() {
|
|||
tcell.KeyCtrlSpace: ui.NewSharedKeyAction("Marks Clear", t.clearMarksCmd, false),
|
||||
tcell.KeyCtrlS: ui.NewSharedKeyAction("Save", t.saveCmd, false),
|
||||
ui.KeySlash: ui.NewSharedKeyAction("Filter Mode", t.activateCmd, false),
|
||||
tcell.KeyEscape: ui.NewSharedKeyAction("Filter Reset", t.resetCmd, false),
|
||||
tcell.KeyEnter: ui.NewSharedKeyAction("Filter", t.filterCmd, false),
|
||||
tcell.KeyCtrlU: ui.NewSharedKeyAction("Clear Filter", t.clearCmd, false),
|
||||
tcell.KeyBackspace2: ui.NewSharedKeyAction("Erase", t.eraseCmd, false),
|
||||
tcell.KeyBackspace: ui.NewSharedKeyAction("Erase", t.eraseCmd, false),
|
||||
tcell.KeyDelete: ui.NewSharedKeyAction("Erase", t.eraseCmd, false),
|
||||
|
|
@ -121,18 +120,11 @@ func (t *Table) clearMarksCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (t *Table) filterCmd(evt *tcell.EventKey) *tcell.EventKey {
|
||||
func (t *Table) clearCmd(evt *tcell.EventKey) *tcell.EventKey {
|
||||
if !t.SearchBuff().IsActive() {
|
||||
return evt
|
||||
}
|
||||
|
||||
t.SearchBuff().SetActive(false)
|
||||
cmd := t.SearchBuff().String()
|
||||
if ui.IsLabelSelector(cmd) && t.filterFn != nil {
|
||||
t.filterFn(ui.TrimLabelSelector(cmd))
|
||||
return nil
|
||||
}
|
||||
t.Refresh()
|
||||
t.SearchBuff().Clear()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
@ -145,22 +137,6 @@ func (t *Table) eraseCmd(evt *tcell.EventKey) *tcell.EventKey {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (t *Table) resetCmd(evt *tcell.EventKey) *tcell.EventKey {
|
||||
if !t.SearchBuff().InCmdMode() {
|
||||
t.SearchBuff().Reset()
|
||||
return t.app.PrevCmd(evt)
|
||||
}
|
||||
|
||||
if ui.IsLabelSelector(t.SearchBuff().String()) {
|
||||
t.filterFn("")
|
||||
}
|
||||
t.app.Flash().Info("Clearing filter...")
|
||||
t.SearchBuff().Reset()
|
||||
t.Refresh()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t *Table) activateCmd(evt *tcell.EventKey) *tcell.EventKey {
|
||||
log.Debug().Msgf("Table filter activated!")
|
||||
if t.app.InCmdMode() {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/derailed/k9s/internal"
|
||||
"github.com/derailed/k9s/internal/config"
|
||||
"github.com/derailed/k9s/internal/model"
|
||||
"github.com/derailed/k9s/internal/render"
|
||||
|
|
@ -64,10 +65,8 @@ func TestTableViewFilter(t *testing.T) {
|
|||
v.SetModel(&testTableModel{})
|
||||
v.SearchBuff().SetActive(true)
|
||||
v.SearchBuff().Set("blee")
|
||||
v.filterCmd(nil)
|
||||
v.Refresh()
|
||||
assert.Equal(t, 2, v.GetRowCount())
|
||||
v.resetCmd(nil)
|
||||
assert.Equal(t, 3, v.GetRowCount())
|
||||
}
|
||||
|
||||
func TestTableViewSort(t *testing.T) {
|
||||
|
|
@ -129,8 +128,8 @@ func makeTableData() render.TableData {
|
|||
|
||||
func makeContext() context.Context {
|
||||
a := NewApp(config.NewConfig(ks{}))
|
||||
ctx := context.WithValue(context.Background(), ui.KeyApp, a)
|
||||
return context.WithValue(ctx, ui.KeyStyles, a.Styles)
|
||||
ctx := context.WithValue(context.Background(), internal.KeyApp, a)
|
||||
return context.WithValue(ctx, internal.KeyStyles, a.Styles)
|
||||
}
|
||||
|
||||
type ks struct{}
|
||||
|
|
|
|||
Loading…
Reference in New Issue