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

agent: Ratelimit calls to brupop apiserver #505

Merged
merged 4 commits into from
Aug 8, 2023

Conversation

cbgbt
Copy link
Contributor

@cbgbt cbgbt commented Aug 8, 2023

Issue number:
#478

Description of changes:

  • Adds a Brupop APIClient decorator that rate-limits requets
  • Adds rate-limiting to apiserver requests in the agent
  • Increases the length of the exponential backoff on requests from the agent
  • Improve the retry boundaries

Testing done:
Installed brupop without the CRD, per issues described in #478. Log messages related to the apiserver were significantly reduced after initial failures.

Limitations
The Kubernetes API watchers don't have appropriate backoff values for retries. Another PR will implement this.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

In the agent we have a few places where we check for the existence of a
resource and then create it if not exists. This commit moves the retry
boundary to surround the entire operation, rather than either or both
subcomponents.
Copy link
Contributor

@stmcginnis stmcginnis 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!

@cbgbt cbgbt merged commit 2d37c8d into bottlerocket-os:develop Aug 8, 2023
2 checks passed
@cbgbt cbgbt mentioned this pull request Aug 8, 2023
13 tasks
@cbgbt cbgbt deleted the apiserver-ratelimit branch August 10, 2023 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants