chore(helm): set sensible resource defaults and drop CPU limits#2911
Open
rzala wants to merge 1 commit intoaquasecurity:mainfrom
Open
chore(helm): set sensible resource defaults and drop CPU limits#2911rzala wants to merge 1 commit intoaquasecurity:mainfrom
rzala wants to merge 1 commit intoaquasecurity:mainfrom
Conversation
Helm deep-merges dictionaries, which means consumers using ArgoCD or
extra values files can never remove individual keys from resource
specs — only change their values. Ship production-tested defaults so
users don't have to fight this behaviour:
- operator pod: add concrete requests/limits instead of empty `{}`
- trivy server: lower requests to match real-world usage
- all components: comment out CPU limits to allow burstable scheduling
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.
Summary
resources: {})Motivation
Helm deep-merges dictionaries, so consumers using ArgoCD or extra values overlays cannot remove individual keys from resource specs — they can only change values. Lists are replaced entirely, but dict keys are permanent once set in
values.yaml.This means if the chart ships with
resources.requests.cpu: 200mand a user doesn't want a CPU request at all (e.g. for burstable QoS), there's no way to remove that key via values overrides.Alternative approach
If setting static defaults is not desirable, replacing the current resource blocks with
resources: {}would also solve the merge problem — consumers can then define exactly the keys they need without inheriting any they can't remove. Happy to adjust the PR either way.Changes
resources(operator){}trivy.resources(scan jobs)cpu: 500mlimit activetrivy.server.resourcescpu: 1limitTest plan
helm templaterenders correct resource blocks for operator deploymenthelm templaterenders correct resource blocks for trivy server statefulset