Skip to content

ipam: Support for static IP allocation in Azure#42219

Merged
qmonnet merged 1 commit intocilium:mainfrom
DataDog:ai/azure-static-ip
Oct 22, 2025
Merged

ipam: Support for static IP allocation in Azure#42219
qmonnet merged 1 commit intocilium:mainfrom
DataDog:ai/azure-static-ip

Conversation

@antonipp
Copy link
Copy Markdown
Contributor

@antonipp antonipp commented Oct 16, 2025

Description

This PR implements Public IP assignments functionality for Azure, it's exactly the same idea as #34622 for AWS.

This implementation relies on tagged Azure Public IP Prefixes. Users can specify Public IP Prefix tags in their CNI config and the Operator will automatically assign to the node a Public IP from a Prefix which matches.

The implementation works for both VMSS instances and standalone VM instances.

Testing

Backported to our 1.18.2 fork. Then created an Azure VMSS node in a public subnet (no NAT gateway). Set static-ip-tags in the CNI config for this node:

    "ipam": {
        "pre-allocate": 1,
        "min-allocate": 5,
        "static-ip-tags": {
          "pool-name": "anton-test"
        }

Afterwards, created an Azure Public IP Prefix with tags pool-name=anton-test. Then confirmed:

  • Cilium Operator created an IP in the pool I tagged:
image
  • The IP was successfully attached to the instance:
Screenshot 2025-10-16 at 18 19 43
  • When masquerading was enabled (thanks to Azure: add support for masquerading #42196), the pod was able to use that Public IP:

     anton-test-6d954ccf46-v2dg5:/# curl ifconfig.me
     20.XX.XX.XX 
    
  • When the instance was deleted, the IP was released



ipam: Support for public IP allocation in Azure

@antonipp antonipp requested review from a team as code owners October 16, 2025 16:24
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Oct 16, 2025
@antonipp
Copy link
Copy Markdown
Contributor Author

/test

Copy link
Copy Markdown
Member

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I just looked at the docs - can you please use the .. code-block directive with the relevant language for your snippets? Looks good otherwise.

@qmonnet qmonnet added release-note/minor This PR changes functionality that users may find relevant to operating Cilium. area/azure Impacts Azure based IPAM. area/ipam IP address management, including cloud IPAM labels Oct 17, 2025
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Oct 17, 2025
Copy link
Copy Markdown
Member

@pippolo84 pippolo84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Overall LGTM, left a couple of questions and a suggestion inline.

@antonipp
Copy link
Copy Markdown
Contributor Author

/test

Copy link
Copy Markdown
Member

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doc change looks good, thank you!

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Oct 20, 2025
@qmonnet qmonnet added the dont-merge/discussion A discussion is ongoing and should be resolved before merging, regardless of reviews & tests status. label Oct 21, 2025
This commit implements the AllocateStaticIP logic in the Azure Operator.
The Operator is now able to assign IPs from tagged Public IP Prefixes to standalone VM instances
and VMSS instances.

Signed-off-by: Anton Ippolitov <anton.ippolitov@datadoghq.com>
@antonipp
Copy link
Copy Markdown
Contributor Author

/test

Copy link
Copy Markdown
Member

@pippolo84 pippolo84 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 💯

@joestringer joestringer removed ready-to-merge This PR has passed all tests and received consensus from code owners to merge. dont-merge/discussion A discussion is ongoing and should be resolved before merging, regardless of reviews & tests status. labels Oct 21, 2025
@qmonnet qmonnet added this pull request to the merge queue Oct 22, 2025
Merged via the queue into cilium:main with commit a4e4324 Oct 22, 2025
75 checks passed
@maintainer-s-little-helper maintainer-s-little-helper bot added ready-to-merge This PR has passed all tests and received consensus from code owners to merge. labels Oct 22, 2025
@antonipp antonipp deleted the ai/azure-static-ip branch October 28, 2025 12:48
@cilium-release-bot cilium-release-bot bot moved this to Released in cilium v1.19.0 Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/azure Impacts Azure based IPAM. area/ipam IP address management, including cloud IPAM ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/minor This PR changes functionality that users may find relevant to operating Cilium.

Projects

No open projects
Status: Released

Development

Successfully merging this pull request may close these issues.

5 participants