Skip to content

Commit

Permalink
Skip unknown fields in target allocator config (#2488)
Browse files Browse the repository at this point in the history
  • Loading branch information
swiatekm authored Jan 4, 2024
1 parent b632ad1 commit f508392
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/otel-allocator/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions cmd/otel-allocator/config/testdata/no_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# this is some random data to check if we skip unknown fields instead of rejecting them
some_key: some_value

0 comments on commit f508392

Please sign in to comment.