From 6fa38f0bdc99a2006f9317fdf961b4f407edbdd8 Mon Sep 17 00:00:00 2001 From: Bin Liu Date: Thu, 30 Mar 2023 09:36:03 +0800 Subject: [PATCH] debug --- addons/pkg/config/options.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/pkg/config/options.go b/addons/pkg/config/options.go index f9c819a1c2e..4f67516e334 100644 --- a/addons/pkg/config/options.go +++ b/addons/pkg/config/options.go @@ -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 @@ -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