feat: expose AMI cache TTL as runtime flag#9052
Open
chrisdoherty4 wants to merge 1 commit intoaws:mainfrom
Open
feat: expose AMI cache TTL as runtime flag#9052chrisdoherty4 wants to merge 1 commit intoaws:mainfrom
chrisdoherty4 wants to merge 1 commit intoaws:mainfrom
Conversation
Author
|
Looking deeper it seems a handful of reconcilers set a shorter TTL than the minimum requeue time for the AMI reconciler making the The cache TTL configurability does help reduce the API calls so that still feels like a worth while configuration option - longer cache windows are acceptable in our case. |
Operators running large fleets can generate significant DescribeImages API call volume due to frequent AMI reconciles. This change makes the AMI cache TTL configurable so operators can tune them for their workload without rebuilding. --ami-cache-ttl (env: AMI_CACHE_TTL, default: 1m) Default preserve existing behaviour.
a25243a to
d3b7986
Compare
Author
|
Modified the PR to only expose AMI cache TTL. Being able to tweak this for our use case greatly improves API calls and avoids hitting rate limits. |
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.
Fixes #N/A
Description
Operators running large fleets (15,000 nodes across 50+ clusters) with 10s of node classes can generate significant
DescribeImagesAPI call volume because the reconciler requeues periodically (order of 30s-1m) and uses a hardcoded 1-minute cache TTL. This change makes the cache TTL independently configurable so users can decide an appropriate AMI cache time for their usecase:--ami-cache-ttlAMI_CACHE_TTL1mDefault preserve existing behavior.
How was this change tested?
pkg/operator/options/suite_test.gocovering CLIflag override and env var fallback, and validation rejection of non-positive values.
Does this change impact docs?