Skip to content

Commit

Permalink
lib/resourcemerge: account for proxy changes
Browse files Browse the repository at this point in the history
`ensureControllerConfigSpec` wasn't accounting for any change for the
Proxy field which lead to the `modified` bool not flipping to true when
the Proxy did change. That causes any edits in the Proxy object to don't
trigger a resync because the new controllerconfig isn't updated with the
new proxy field. Fix all that by teaching `ensureControllerConfigSpec`
about Proxy field changes so the MCO _is_ resyncing once it changes.

Signed-off-by: Antonio Murdaca <[email protected]>
  • Loading branch information
runcom committed Oct 15, 2019
1 parent 57bae71 commit ffd241d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/resourcemerge/machineconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ func ensureControllerConfigSpec(modified *bool, existing *mcfgv1.ControllerConfi
setBytesIfSet(modified, &existing.RootCAData, required.RootCAData)
setBytesIfSet(modified, &existing.KubeAPIServerServingCAData, required.KubeAPIServerServingCAData)

if !equality.Semantic.DeepEqual(existing.Proxy, required.Proxy) {
*modified = true
existing.Proxy = required.Proxy
}

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

0 comments on commit ffd241d

Please sign in to comment.