If the command bar was activated with `:` before or during the splash
delay, the main page would steal focus from it, breaking the UI.
This patch re-focuses the command bar if its active after switching
focus to the main page.
Fixes issue #2178
* Switch to new default-container pod annotation
kubectl.kubernetes.io/default-logs-container has been deprecated and
removed in kubectl, see
3a9c6f2a2f
* Show the default container as the first entry
In container selections show the default container as the first entry of
the list.
We want to switch to the command specified by the flag, but only at startup.
Afterwards, we should be interactive and favor the user's command choices over the startup commandline switch.
* making some hard coded colors configurable via skins
* more flexible colors for logo messages
* correct color formatting per MR comments
* no need to convert to String
---------
Co-authored-by: Cason Adams <cadams@roku.com>
`exec.LookPath()` and `exec.Command()` aren't supposed to work with
binaries that are located in the current working directory:
fd208c8850:src/os/exec/exec.go
If `kubectl` is found in the current working directory, `LookPath()`
will return `ErrDot` even if it is also found in any other directory in
the `PATH`.
This patch detects this condition and shows a meaningful error message
in the log so that the user knows the reason why `kubectl` couldn't be
executed.
Related: https://github.com/derailed/k9s/issues/1787
The original check in ScanSA assumed the service account on the pod spec
was not blank. It can be blank and when it is kubernetes will default
to using the 'default' service account. This change extends the check
logic to also include that.
* bugfix for port forward costum containers not showing
#1844
* Adjust the port forward test key structure
Co-authored-by: Eugene <eugene.berger@dell.com>
* feat: add noLatestRevCheck flag to configure whether k9s should fetch the latest rev from the Github repo.
* refactor: rename "noLatestRevCheck" to more appropriate "skipLatestRevCheck"
Add the same policy view to ServiceAccounts as users/groups.
This also works under the xray view. This commit also fixes the
issue with role/rolebindings not having the same name not showing
up in Policy view.
When checking permissions to (un)suspend cronjobs, a user will always be
considered as unauthorized, because of the wrong arguments order when
calling the `CanI` function.
For `CanI` definition, see:
2f72441bac/internal/client/client.go (L138)
```
func (a *APIClient) CanI(ns, gvr string, verbs []string) (auth bool, err error)
```
* Update CronJob version to v1 (from v1beta1, unavaliable from 1.25 onwards).
* Try both batch/v1beta1 (for legacy) and batch/v1
* Revert previous commit. Use c.GVR() to find the correct version. Make
cronjob (un)suspend version aware.
* Simply changes by dropping support for deprecated batch/v1beta1 version
* Fix path when viewing ScreenDump
* Log save should use `CurrentCluster` iso `CurrentContext`
* Remove sanitizing of dir in ScreenDump dao
* Switch `CurrentCluster` to `CurrentContext` for SD
* Revert log saving to `CurrentContext`
* Save tables to `CurrentContext` iso `CurrentCluster`