Fix #1636: can't switch context with --kubeconfig flag (#1638)

Co-authored-by: Aleksei Romanenko <alex.romanenko@linkup.com>
mine
Aleksei Romanenko 2022-07-07 09:25:59 -05:00 committed by GitHub
parent 66c22f1c6f
commit 56c898fcb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -75,6 +75,7 @@ func (c *Config) SwitchContext(name string) error {
flags := genericclioptions.NewConfigFlags(UsePersistentConfig)
flags.Context = &name
flags.Timeout = c.flags.Timeout
flags.KubeConfig = c.flags.KubeConfig
c.flags = flags
return nil