-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 [0.2] Exclude conversion-data annotation when MD reconciles #3010
🐛 [0.2] Exclude conversion-data annotation when MD reconciles #3010
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vincepri The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold |
/milestone v0.2.x |
/assign @ncdc |
We'll need to forward-port this fix as well |
Without this change v1alpha2 MachineDeployments in a management cluster running capi-webhooks would fail to resize, update. |
@vincepri can you explain the details about the fighting? I also think a comment in the code about why we're including this annotation in the skip list would be helpful for future-us 😄 |
@ncdc updated the first post explaining my findings, I'll update and add a comment to the code as well |
Signed-off-by: Vince Prignano <[email protected]>
1990ab5
to
688528e
Compare
/hold cancel |
/lgtm |
Signed-off-by: Vince Prignano [email protected]
What this PR does / why we need it:
This PR fixes an issue that was causing controller to fight with each other when a management cluster had both v1alpha2 and v1alpha3 running.
The MachineDeployment controller has has logic to sync annotations from a MachineDeployment to its linked MachineSets as seen in:
cluster-api/controllers/machinedeployment_sync.go
Line 112 in a799265
The
SetNewMachineSetAnnotations
(regardless of what the names says) actually syncs up annotations on a new MachineSet or an existing one, in particular when this function is calledcluster-api/controllers/mdutil/util.go
Line 202 in a799265
All annotations are usually copied, with the exception for some listed in
cluster-api/controllers/mdutil/util.go
Lines 141 to 147 in a799265
With the release of v1alpha3, we added the
conversion-data
annotation that is used internally to restore fields that would otherwise be lost during the conversion to an older version. This annotation caused the MD to always think that a change needs to be made:conversion-data
value (because it's set from the conversion webhook)conversion-data
(as shown above), increases the revision historycluster-api/controllers/mdutil/util.go
Line 241 in a799265
conversion-data
fieldcluster-api/util/conversion/conversion.go
Line 125 in a799265
conversion-data
field.