diff --git a/cmd/otel-allocator/config/config.go b/cmd/otel-allocator/config/config.go index d91b057e19..c2d716b9de 100644 --- a/cmd/otel-allocator/config/config.go +++ b/cmd/otel-allocator/config/config.go @@ -119,7 +119,7 @@ func unmarshal(cfg *Config, configFile string) error { if err != nil { return err } - if err = yaml.UnmarshalStrict(yamlFile, cfg); err != nil { + if err = yaml.Unmarshal(yamlFile, cfg); err != nil { return fmt.Errorf("error unmarshaling YAML: %w", err) } return nil diff --git a/cmd/otel-allocator/config/testdata/no_config.yaml b/cmd/otel-allocator/config/testdata/no_config.yaml index e69de29bb2..9fa8275cec 100644 --- a/cmd/otel-allocator/config/testdata/no_config.yaml +++ b/cmd/otel-allocator/config/testdata/no_config.yaml @@ -0,0 +1,2 @@ +# this is some random data to check if we skip unknown fields instead of rejecting them +some_key: some_value