perf: strip data fields from all ConfigMaps except operator configs#2677
Merged
simar7 merged 1 commit intoaquasecurity:mainfrom Jul 31, 2025
Merged
perf: strip data fields from all ConfigMaps except operator configs#2677simar7 merged 1 commit intoaquasecurity:mainfrom
simar7 merged 1 commit intoaquasecurity:mainfrom
Conversation
To reduce memory usage and avoid operator restarts due to large ConfigMap objects, this change disables caching of `data` and `binaryData` fields for all ConfigMaps except `trivy-operator-policies-config` and `trivy-operator-trivy-config`.
simar7
approved these changes
Jul 30, 2025
Member
simar7
left a comment
There was a problem hiding this comment.
LGTM, I have verified the results independently with these changes using a small PoC https://github.com/simar7/k8s-informer-poc
Member
|
@afdesk could you also take another look? |
afdesk
approved these changes
Jul 30, 2025
Contributor
afdesk
left a comment
There was a problem hiding this comment.
LGTM!
I played with this change, it works correctly:
$ helm install trivy-operator aquasecurity/trivy-operator --create-namespace --namespace trivy-system \
--set image.repository=afdesk/trivy-operator --set image.tag=2677 \
--set trivy.resources.limits.memory=1Gi
Contributor
|
this PR fixes #2541, right? |
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.
To reduce memory usage and avoid operator restarts due to large ConfigMap objects, this change disables caching of
dataandbinaryDatafields for all ConfigMaps excepttrivy-operator-policies-configandtrivy-operator-trivy-config.Fixes: #2541