Skip to content

Commit

Permalink
Refactor v1.14.0 (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
chuntaojun authored Feb 22, 2023
1 parent f0d191d commit 24660e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bootstrap/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,11 @@ func parseYamlConfig(configFile string, bootConfig *BootConfig) (*SidecarConfig,
}

func parseYamlContent(content []byte, sidecarConfig *SidecarConfig) error {
decoder := yaml.NewDecoder(bytes.NewBuffer(content))
data := []byte(os.ExpandEnv(string(content)))
decoder := yaml.NewDecoder(bytes.NewBuffer(data))
if err := decoder.Decode(sidecarConfig); nil != err {
return errors.New(fmt.Sprintf("parse yaml %s error:%s", content, err.Error()))
}
log.Infof("[sidecar] config content : %s", content)
return nil
}

0 comments on commit 24660e1

Please sign in to comment.