Skip to content

Commit

Permalink
Fix upgrade issue with DNS controllerconfig field
Browse files Browse the repository at this point in the history
The initial implementation of this had incorrect logic for handling
merges of configs. Because DNS is a new field, the existing one will
always be nil on upgrade. We need to remove the nil check for the
existing object so that it can be populated with the new object.
  • Loading branch information
cybertron committed Dec 16, 2020
1 parent d4dab2e commit 7483b31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/resourcemerge/machineconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func ensureControllerConfigSpec(modified *bool, existing *mcfgv1.ControllerConfi
*modified = true
}

if existing.DNS != nil && required.DNS != nil && !equality.Semantic.DeepEqual(existing.DNS, required.DNS) {
if required.DNS != nil && !equality.Semantic.DeepEqual(existing.DNS, required.DNS) {
*modified = true
existing.DNS = required.DNS
}
Expand Down

0 comments on commit 7483b31

Please sign in to comment.