Fix collectorDataSource retention env var conditions#336
Merged
mittal-ishaan merged 2 commits intoopencost:mainfrom Feb 20, 2026
Merged
Conversation
The condition checks for retention10m, retention1h, and retention1d were incorrectly checking for non-existent field names (retentionResolution10m, retentionResolution1h, retentionResolution1d), causing the env vars to never be set even when the values were configured in values.yaml.
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in the Helm chart template where environment variables for collector data source retention settings were never being set due to incorrect field name references in the conditional checks. The template was checking for non-existent fields (retentionResolution10m, retentionResolution1h, retentionResolution1d) instead of the actual field names defined in values.yaml (retention10m, retention1h, retention1d).
Changes:
- Fixed three conditional checks in the deployment template to reference the correct field names that match the
values.yamlschema
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mittal-ishaan
approved these changes
Feb 19, 2026
Member
|
Thank you @dag-andersen , |
Contributor
Author
|
@mittal-ishaan done 🚀 |
mittal-ishaan
approved these changes
Feb 20, 2026
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
retention10m,retention1h, andretention1din the deployment templateretentionResolution10m,retentionResolution1h,retentionResolution1d)COLLECTOR_RESOLUTION_*_RETENTIONenvironment variables to never be set, even when values were configuredProblem
The
values.yamldefines:But the template was checking for:
Instead of:
Alternative fix
Alternatively, the field names in
values.yamlcould be changed to match the template conditions:I went with fixing the template since the
values.yamlfield names (retention10m, etc.) are more concise and consistent with the existing naming style in the file. But happy to change if you prefer the other approach.Impact
Users configuring
collectorDataSource.retention*values would not see any effect, as the environment variables were never set. The workaround was to useextraEnvto set the variables directly.