Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
liu4480 committed Mar 30, 2023
1 parent bf50320 commit 6fa38f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions addons/pkg/config/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func (o *Options) Complete(configFile string) error {
o.ConfigFile = configFile
}
if len(o.ConfigFile) > 0 {
o.Log.Info("config file is", o.ConfigFile)
err := o.loadConfigFromFile(o.ConfigFile)
if err != nil {
return err
Expand All @@ -57,9 +58,11 @@ func (o *Options) setDefaults() {
func (o *Options) loadConfigFromFile(file string) error {
data, err := os.ReadFile(file)
if err != nil {
o.Log.Error(err, "failed to read file", file)
return err
}

o.Log.Info("read config from file", file, string(data))
err = yaml.UnmarshalStrict(data, o.Config)
if err != nil {
return err
Expand Down

0 comments on commit 6fa38f0

Please sign in to comment.