From de639f10e1a410b9e7e84ae9f89c8041eab2522c Mon Sep 17 00:00:00 2001 From: Philipp Riederer Date: Thu, 4 Aug 2022 11:18:32 +0200 Subject: [PATCH] fix overwriting of OverlappingRanges by mergo --- pkg/config/config.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/config/config.go b/pkg/config/config.go index 47c83490f..ac0223814 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -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 != "" {