Skip to content

IPAM: Add CIDR label to IPAM capacity metric#44541

Merged
gandro merged 1 commit intocilium:mainfrom
soggiest:pr/soggy/metric-ipam-cidr
Mar 24, 2026
Merged

IPAM: Add CIDR label to IPAM capacity metric#44541
gandro merged 1 commit intocilium:mainfrom
soggiest:pr/soggy/metric-ipam-cidr

Conversation

@soggiest
Copy link
Copy Markdown
Contributor

@soggiest soggiest commented Feb 26, 2026

This commit adds a new metric label and assigns it to the Cilium agent's IPAM capacity metric. Tracking the capacity of CIDRs used across a cluster will be significantly easier with this label in place.

Please ensure your pull request adheres to the following guidelines:

  • For first time contributors, read Submitting a pull request
  • All code is covered by unit and/or runtime tests where feasible.
  • All commits contain a well written commit description including a title,
    description and a Fixes: #XXX line if the commit addresses a particular
    GitHub issue.
  • If your commit description contains a Fixes: <commit-id> tag, then
    please add the commit author[s] as reviewer[s] to this issue.
  • All commits are signed off. See the section Developer’s Certificate of Origin
  • Provide a title or release-note blurb suitable for the release notes.
  • Are you a user of Cilium? Please add yourself to the Users doc
  • Thanks for contributing!
IPAM: Add CIDR label to IPAM capacity metric

@soggiest soggiest requested review from a team as code owners February 26, 2026 17:41
@soggiest soggiest requested a review from chancez February 26, 2026 17:41
@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 Feb 26, 2026
@soggiest soggiest requested a review from gandro February 26, 2026 17:41
@github-actions github-actions bot added the kind/community-contribution This was a contribution made by a community member. label Feb 26, 2026
@soggiest soggiest force-pushed the pr/soggy/metric-ipam-cidr branch from 117d9ba to db2ce71 Compare February 26, 2026 18:20
@soggiest soggiest requested review from a team as code owners February 26, 2026 18:20
@soggiest soggiest requested a review from qmonnet February 26, 2026 18:20
Copy link
Copy Markdown
Contributor

@chancez chancez left a comment

Choose a reason for hiding this comment

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

CIDRs are basically configured by the user right? So it should be relatively bounded in the number of CIDRs we would expect to see? Just worried about metric cardinality. If this is user controlled it's probably fine. If CIDRs allocated/deallocated it could be an issue.

@soggiest soggiest force-pushed the pr/soggy/metric-ipam-cidr branch from db2ce71 to 0219dc0 Compare February 26, 2026 21:31
@soggiest
Copy link
Copy Markdown
Contributor Author

CIDRs are basically configured by the user right? So it should be relatively bounded in the number of CIDRs we would expect to see? Just worried about metric cardinality. If this is user controlled it's probably fine. If CIDRs allocated/deallocated it could be an issue.

After double checking the code it looks CIDRs are manually configured by the user except in the case of ENI IPAM in which the cloud controller configures CIDRs. However, these CIDRs can only come from the range of IP addresses available to the VPC which is user controlled. Therefore I don't think cardinality would be a concern here.

@joestringer joestringer added the release-note/minor This PR changes functionality that users may find relevant to operating Cilium. label Feb 26, 2026
@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 Feb 26, 2026
@joestringer joestringer removed the request for review from qmonnet February 26, 2026 22:13
@joestringer
Copy link
Copy Markdown
Member

I believe that a rebase against tip of main should fix the test failures.

@soggiest soggiest force-pushed the pr/soggy/metric-ipam-cidr branch from 0219dc0 to 40d2ef0 Compare March 3, 2026 22:52
Copy link
Copy Markdown
Member

@gandro gandro left a comment

Choose a reason for hiding this comment

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

Thanks! One small nit

@julianwiedmann
Copy link
Copy Markdown
Member

@soggiest this will need a rebase. Perfect opportunity to address Sebastian's nitpick :)

@soggiest soggiest force-pushed the pr/soggy/metric-ipam-cidr branch from 40d2ef0 to 2945272 Compare March 23, 2026 19:00
@soggiest
Copy link
Copy Markdown
Contributor Author

@soggiest this will need a rebase. Perfect opportunity to address Sebastian's nitpick :)

Finally back from vacation, took care of both :D

This commit adds a new metric label and assigns it to the Cilium agent's
IPAM capacity metric. Tracking the capacity of CIDRs used across a
cluster will be significantly easier with this label in place.

Signed-off-by: Soggiest <lanen@cisco.com>
@soggiest soggiest force-pushed the pr/soggy/metric-ipam-cidr branch from 2945272 to aa6f497 Compare March 23, 2026 22:11
@gandro
Copy link
Copy Markdown
Member

gandro commented Mar 24, 2026

/test

@gandro gandro enabled auto-merge March 24, 2026 10:29
@gandro gandro added this pull request to the merge queue Mar 24, 2026
@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 Mar 24, 2026
Merged via the queue into cilium:main with commit e5756a2 Mar 24, 2026
78 of 79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/community-contribution This was a contribution made by a community member. 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

None yet

Development

Successfully merging this pull request may close these issues.

6 participants