[ipam/azure] Avoid redundant CiliumNode status writes - #670
Closed
jaredledvina wants to merge 1 commit into
Closed
Conversation
Signed-off-by: Jared Ledvina <jared.ledvina@datadoghq.com>
jaredledvina
force-pushed
the
jared.ledvina/fixup-azure-ciliumnode-status-deepequal
branch
from
July 18, 2026 15:17
0d8f36e to
77c3885
Compare
Member
Author
|
Superseded by #672 and #673. This PR bundled two logically independent changes on disjoint files, so splitting them for clearer review and independent revertability:
No functional change from this PR — the two branches together reproduce this diff exactly. Closing in favor of #672 and #673. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Azure, the operator issued a CiliumNode
/statusupdate on essentially every 60s IPAM sync tick for every node, even when nothing changed (~333:1 status:spec write ratio on Azure vs ~2:1 on AWS/ENI). Two things defeated the operator'sDeepEqualwrite-skip gate:AzureInterface.DeepEqualcompared threejson:"-"fields (vmssName,vmID,resourceGroup) that are never serialized to the apiserver, so a freshly rebuilt in-memory interface always differed from the round-trippedorigNodecopy.Status.Azure.Interfaceswas built from non-deterministic Go map iteration, so its order changed every call and the index-by-indexAzureStatus.DeepEqualsaw a change even when the interface set was identical.Changes:
AzureInterface.DeepEqual(+deepequal-gen=falsemarkers + regeneration).Status.Azure.Interfacesin a deterministic, ID-sorted order via a newAzureStatus.SetInterfaces, with the ordering invariant documented on the field.deriveVpcCIDRs) to select from the interfaces actually backing the node's IPAM pool allocations (multi-subnet aware), with a pinned-interface preference, a deterministic smallest-ID fallback, and explicit logging of skipped/unparseable CIDRs.Adds unit tests for the deterministic ordering, the DeepEqual field exclusion (round-trip), and the CIDR selection paths. Azure-only; AWS/ENI is unaffected.