-
Notifications
You must be signed in to change notification settings - Fork 627
Helm: Allow users to override automatically calculated GOMAXPROCS #11983
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
Conversation
047d769
to
0d6949c
Compare
env: | ||
[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for the reviewers, the side effect of the changes is that the components render a default empty env, when there is no environment variables. This is valid; I don't have issues with that.
...ng-values-generated/mimir-distributed/templates/store-gateway/store-gateway-statefulset.yaml
Show resolved
Hide resolved
...charts/mimir-distributed/templates/graphite-proxy/graphite-querier/graphite-querier-dep.yaml
Outdated
Show resolved
Hide resolved
@narqo Can we please get this merged? |
🤖 Automated comment |
Thank you for this PR this is great work :) |
79b766e
to
50d67ac
Compare
@dimitarvdimitrov could you have a look at the latest version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are 9 more places which define their own env:
blocks. Any reason not to use this template there too?
operations/helm/charts/mimir-distributed/templates/lib/containerEnv.tpl
Outdated
Show resolved
Hide resolved
ingester: | ||
resources: | ||
requests: | ||
cpu: 1 # This would normally calculate GOMAXPROCS as (1 + max(min(1, 6), 3) + 1) = 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't there an extra +1
in the comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the formula in the ingester template is request + max(min(request, 6), 3) + 1
(and I think I know the person, who wrote this formula ;))
But you've asked to not touch places that don't have "GOMAXPROCS" (#11983 (comment)). So I've reverted these. Should I put them back? 😬 |
oh.. ok uhmmm, let's keep it as-is 🐒 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i haven't reviewed all files because it will take a long time feel free to merge
Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com>
Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com>
Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com>
Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com>
Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com>
Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com>
Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com>
Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com>
Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com>
Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com>
Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com>
Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com>
Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com>
c1723f0
to
06cb061
Compare
env: | ||
envFrom: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL, these tests were broken 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements functionality to allow users to override automatically calculated GOMAXPROCS environment variables in Helm chart deployments. The PR adds infrastructure to merge environment variables with proper precedence, enabling GOMAXPROCS override for distributor, ingester, querier, ruler-querier, and store-gateway components while maintaining backward compatibility.
- Adds reusable
mimir.lib.containerEnv
helper for merging environment variables with proper precedence - Standardizes environment variable syntax by removing unnecessary quotes around environment variable names
- Provides comprehensive test coverage demonstrating GOMAXPROCS override functionality
Reviewed Changes
Copilot reviewed 300 out of 399 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
Multiple test-generated YAML files | Generated test outputs showing standardized env variable syntax and new override capabilities |
test-gomaxprocs-override-values-generated | New test case demonstrating GOMAXPROCS override functionality with custom values |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...de-values-generated/mimir-distributed/templates/store-gateway/store-gateway-statefulset.yaml
Outdated
Show resolved
Hide resolved
Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com>
Summary
As raised in #6467 right now users have no way to override the default env variables some components define. This PR improves that.
• Add reusable
mimir.lib.containerEnv
helper to merge environment variables with proper precedence• Enable GOMAXPROCS override for distributor, ingester, querier, ruler-querier, and store-gateway components
• Maintain backward compatibility with existing automatic
GOMAXPROCS
calculations• Add comprehensive test coverage for override functionality
🤖 Generated with Claude Code