Skip to content

Commit

Permalink
fix overwriting of OverlappingRanges by mergo
Browse files Browse the repository at this point in the history
  • Loading branch information
toelke committed Aug 19, 2022
1 parent 98bc2ce commit de639f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ func LoadIPAMConfig(bytes []byte, envArgs string, extraConfigPaths ...string) (*

// Now let's try to merge the configurations...
// NB: Don't try to do any initialization before this point or it won't account for merged flat file.
var OverlappingRanges bool = n.IPAM.OverlappingRanges
if err := mergo.Merge(&n, flatipam); err != nil {
logging.Errorf("Merge error with flat file: %s", err)
}
n.IPAM.OverlappingRanges = OverlappingRanges

// Logging
if n.IPAM.LogFile != "" {
Expand Down

0 comments on commit de639f1

Please sign in to comment.