Commit d65a96a6 authored by Yifan Gu's avatar Yifan Gu

rkt: Override the config using the response from rkt api service.

parent ea805efa
......@@ -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
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment