fix(opentelemetry-kube-stack): quote env var values in Instrumentation template - #2155
Merged
TylerHelmuth merged 3 commits intoApr 22, 2026
Conversation
…n template Numeric env var values passed to the Instrumentation resource caused validation errors because they were rendered as bare integers instead of strings. This is especially common when using the chart as a subchart, where YAML type coercion strips quotes from numeric strings. Two fixes: - Quote the value in the renderenvs template helper - Accept both string and number types in the EnvVar JSON schema Fixes open-telemetry#1888 Signed-off-by: Nick Nikolakakis <nonicked@protonmail.com>
Signed-off-by: Nick Nikolakakis <nonicked@protonmail.com>
TylerHelmuth
approved these changes
Apr 22, 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.
Fixes #1888
Summary
Numeric env var values (e.g.
value: 4317) passed to theInstrumentationresource caused validation errors:This is especially common when using the chart as a subchart, where YAML type coercion strips quotes from numeric strings.
Changes
templates/_helpers.tpl: Added| quoteto thevalueoutput in therenderenvshelper, ensuring all values are rendered as quoted stringsvalues.schema.json: Changed theEnvVar.valuetype from"string"to["string", "number"]so numeric values pass schema validation before the template quotes themChart.yaml: Version bump 0.14.11 -> 0.14.12Testing
helm templatewith integer env var values renders them as quoted stringshelm templatewith string env var values still works correctly