added support for impressionation
parent
668bc063ef
commit
1d0c9e3bb3
|
|
@ -0,0 +1,22 @@
|
||||||
|
# Release v0.1.9
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
Thank you to all that contributed with flushing out issues with 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.
|
||||||
|
|
||||||
|
Thank you so much for your support!!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Change Logs
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Resolved Bugs
|
||||||
|
|
||||||
|
* [Issue #83](https://github.com/derailed/k9s/issues/83)
|
||||||
|
* [Issue #84](https://github.com/derailed/k9s/issues/84)
|
||||||
|
|
@ -173,6 +173,20 @@ func initK8sFlags() {
|
||||||
"The name of the kubeconfig user to use",
|
"The name of the kubeconfig user to use",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
rootCmd.Flags().StringVar(
|
||||||
|
k8sFlags.Impersonate,
|
||||||
|
"as",
|
||||||
|
"",
|
||||||
|
"Username to impersonate for the operation",
|
||||||
|
)
|
||||||
|
|
||||||
|
rootCmd.Flags().StringArrayVar(
|
||||||
|
k8sFlags.ImpersonateGroup,
|
||||||
|
"as-group",
|
||||||
|
[]string{},
|
||||||
|
"Group to impersonate for the operation",
|
||||||
|
)
|
||||||
|
|
||||||
rootCmd.Flags().BoolVar(
|
rootCmd.Flags().BoolVar(
|
||||||
k8sFlags.Insecure,
|
k8sFlags.Insecure,
|
||||||
"insecure-skip-tls-verify",
|
"insecure-skip-tls-verify",
|
||||||
|
|
|
||||||
|
|
@ -168,6 +168,9 @@ func (c *Config) ClusterNames() ([]string, error) {
|
||||||
|
|
||||||
// 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) {
|
||||||
|
return *c.flags.Impersonate, nil
|
||||||
|
}
|
||||||
if isSet(c.flags.AuthInfoName) {
|
if isSet(c.flags.AuthInfoName) {
|
||||||
return *c.flags.AuthInfoName, nil
|
return *c.flags.AuthInfoName, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ type (
|
||||||
sortFn resource.SortFn
|
sortFn resource.SortFn
|
||||||
data resource.TableData
|
data resource.TableData
|
||||||
cmdBuff *cmdBuff
|
cmdBuff *cmdBuff
|
||||||
|
tableMX sync.Mutex
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -123,9 +124,13 @@ func (v *tableView) SetColorer(f colorerFn) {
|
||||||
|
|
||||||
// SetActions sets up keyboard action listener.
|
// SetActions sets up keyboard action listener.
|
||||||
func (v *tableView) setActions(aa keyActions) {
|
func (v *tableView) setActions(aa keyActions) {
|
||||||
for k, a := range aa {
|
v.tableMX.Lock()
|
||||||
v.actions[k] = a
|
{
|
||||||
|
for k, a := range aa {
|
||||||
|
v.actions[k] = a
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
v.tableMX.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hints options
|
// Hints options
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue