mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
switch kubeconfig types to internal map[string]*struct
This commit is contained in:
@@ -81,8 +81,12 @@ func (o createContextOptions) run() error {
|
||||
return err
|
||||
}
|
||||
|
||||
context := o.modifyContext(config.Contexts[o.name])
|
||||
config.Contexts[o.name] = context
|
||||
startingStanza, exists := config.Contexts[o.name]
|
||||
if !exists {
|
||||
startingStanza = clientcmdapi.NewContext()
|
||||
}
|
||||
context := o.modifyContext(*startingStanza)
|
||||
config.Contexts[o.name] = &context
|
||||
|
||||
if err := ModifyConfig(o.configAccess, *config); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user