[go: up one dir, main page]

Skip to content
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

ipam/crd: Add new flag for configuring custom resource update rate #23017

Conversation

jaffcheng
Copy link
Contributor
@jaffcheng jaffcheng commented Jan 10, 2023

In crd ipam modes, the current agent side custom resource update rate is hardcoded as 15 seconds, which might be too big in burst pod creation cases. e.g. when a large number of pods are scheduled to a single node, let's say 25 pods and the pre-allocate is set to 5, a maximum of 5 IPs can be allocated every 15 seconds (update of used IPs are rate limited), which causes some pods to wait too long.

This commit adds a new agent flag ipam-cilium-node-update-rate to configure the ciliumnode custom resource update rate.

Signed-off-by: Jaff Cheng jaff.cheng.sh@gmail.com

ipam/crd: Add new flag for configuring CiliumNode update rate

@jaffcheng jaffcheng requested review from a team as code owners January 10, 2023 12:20
@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 Jan 10, 2023
@github-actions github-actions bot added the kind/community-contribution This was a contribution made by a community member. label Jan 10, 2023
@gandro gandro added release-note/minor This PR changes functionality that users may find relevant to operating Cilium. sig/ipam IP address management, including cloud IPAM labels Jan 10, 2023
@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 Jan 10, 2023
Copy link
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! I'm overall fine with the proposal. I think we should reconsider the name though.

Also: Should we add Helm variables for this as well?

pkg/option/config.go Outdated Show resolved Hide resolved
@jaffcheng jaffcheng force-pushed the configurize-custom-resource-update-rate-upstream branch from 027318d to 1669d48 Compare January 12, 2023 11:00
@jaffcheng jaffcheng requested review from a team as code owners January 12, 2023 11:00
@jaffcheng
Copy link
Contributor Author

@gandro Thanks for the comment! Please take another look.

daemon/cmd/daemon_main.go Outdated Show resolved Hide resolved
@jaffcheng jaffcheng force-pushed the configurize-custom-resource-update-rate-upstream branch from 1669d48 to d1af6e4 Compare January 12, 2023 13:16
@gandro
Copy link
Member
gandro commented Jan 12, 2023

/test

Copy link
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.

Looks good to me, thank you!

pkg/option/config.go Outdated Show resolved Hide resolved
pkg/option/config.go Outdated Show resolved Hide resolved
In crd ipam modes, the current agent side ciliumnode update rate
is hardcoded as 15 seconds, which might be too big in burst pod creation cases.
e.g. when a large number of pods are scheduled to a single node,
let's say 25 pods and the `pre-allocate` is set to 5, a maximum of 5 IPs can
be allocated every 15 seconds (update of used IPs are rate limited),
which causes some pods to wait too long.

This commit adds a new agent flag `ipam-cilium-node-update-rate`
to configure the ciliumnode custom resource update rate.

Signed-off-by: Jaff Cheng <jaff.cheng.sh@gmail.com>
@jaffcheng jaffcheng force-pushed the configurize-custom-resource-update-rate-upstream branch from d1af6e4 to 8fea8f1 Compare January 16, 2023 11:45
@thorn3r
Copy link
Contributor
thorn3r commented Jan 17, 2023

/test

Copy link
Contributor
@tommyp1ckles tommyp1ckles left a comment

Choose a reason for hiding this comment

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

nice change, thanks

Copy link
Contributor
@thorn3r thorn3r left a comment

Choose a reason for hiding this comment

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

LGTM!

@aanm aanm merged commit 562203e into cilium:master Jan 29, 2023
@jaffcheng jaffcheng deleted the configurize-custom-resource-update-rate-upstream branch January 30, 2023 02:48
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. release-note/minor This PR changes functionality that users may find relevant to operating Cilium. sig/ipam IP address management, including cloud IPAM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants