mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
rkt: Override the config using the response from rkt api service.
This commit is contained in:
parent
ea805efa4f
commit
d65a96a600
@ -88,21 +88,21 @@ func (r *Runtime) getConfig(cfg *Config) (*Config, error) {
|
||||
|
||||
flags := resp.Info.GlobalFlags
|
||||
|
||||
if cfg.Dir == "" {
|
||||
if flags.Dir != "" {
|
||||
cfg.Dir = flags.Dir
|
||||
}
|
||||
if cfg.InsecureOptions == "" {
|
||||
cfg.InsecureOptions = flags.InsecureFlags
|
||||
}
|
||||
if cfg.LocalConfigDir == "" {
|
||||
if flags.LocalConfigDir != "" {
|
||||
cfg.LocalConfigDir = flags.LocalConfigDir
|
||||
}
|
||||
if cfg.UserConfigDir == "" {
|
||||
if flags.UserConfigDir != "" {
|
||||
cfg.UserConfigDir = flags.UserConfigDir
|
||||
}
|
||||
if cfg.SystemConfigDir == "" {
|
||||
if flags.SystemConfigDir != "" {
|
||||
cfg.SystemConfigDir = flags.SystemConfigDir
|
||||
}
|
||||
if flags.InsecureFlags != "" {
|
||||
cfg.InsecureOptions = fmt.Sprintf("%s,%s", cfg.InsecureOptions, flags.InsecureFlags)
|
||||
}
|
||||
|
||||
return cfg, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user