-
Notifications
You must be signed in to change notification settings - Fork 431
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
fix endless reconciliation on AKS system node labels #3975
Conversation
/milestone v1.11 |
I see now from the unit tests that this might break trying to delete all the node labels. Checking... |
Looks ok to me. Just needed one small tweak for the sake of the unit test. |
8ddb4d4
to
2ae2407
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #3975 +/- ##
==========================================
+ Coverage 56.26% 56.30% +0.04%
==========================================
Files 190 190
Lines 19447 19440 -7
==========================================
+ Hits 10941 10946 +5
+ Misses 7877 7865 -12
Partials 629 629
☔ View full report in Codecov by Sentry. |
/retest |
I had to do something similar in #3653 to deal with endless reconciliation. /lgtm |
LGTM label has been added. Git tree hash: ad02528dce225020af86f9204b0764a11c07d95a
|
/cherry-pick release-1.10 |
@nojnhuh: once the present PR merges, I will cherry-pick it on top of release-1.10 in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mboersma 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 |
/retest |
@nojnhuh: #3975 failed to apply on top of branch "release-1.10":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What type of PR is this?
/kind bug
/area managedclusters
What this PR does / why we need it:
When AKS labels agent pool nodes on its own (i.e. not labels specified by the user), e.g. when spot instances are being used, CAPZ has to carefully ignore those AKS labels when calculating whether or not an agent pool should be updated. The existing ignore mechanism only took effect when existing labels were specified on the node by the user. This PR fixes a bug where the combination of no user-specified labels and the presence of any AKS-specified values caused CAPZ to endless reconcile the AzureManagedMachinePool on a diff like this:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
To repro, apply any AzureManagedMachinePool using Spot instances without any
spec.nodeLabels
, such as something like this:The "found a diff" messages will appear in the logs and the MachinePool will flip between Provisioned and Scaling or Running every minute or so.
TODOs:
Release note: