jaegertracing / helm-charts

Helm Charts for Jaeger backend
Apache License 2.0
269 stars 347 forks source link

[Bug]: extraObjects accepts only string as templates #538

Open oncipriani opened 10 months ago

oncipriani commented 10 months ago

What happened?

I tried to use the "extraObjects" to create a Pod Disruption Budget object, but I could not find any way to add the proper labels, because apparently all templated values inside the "extraObjects" list must be quoted. That means that only simple string literals can be generated by the templates.

Even the example extrObject provided in the documentation does not work.

See #240 for more details.

Steps to reproduce

  1. Create a values.yml with at least one extraObject element containing at least one non-quoted template;
  2. Try to render the chart using helm template.

Expected behavior

The chart renders correctly, including the extra objects provided.

Relevant log output

No response

Screenshot

No response

Additional context

No response

Jaeger backend version

1.51.0

SDK

No response

Pipeline

No response

Stogage backend

No response

Operating system

No response

Deployment model

No response

Deployment configs

No response

Tomy8s commented 6 months ago

I made the same comment in #240, where you included an example, but this comment is more relevant to this issue.

You're seeing that error as values files must be valid YAML before being parsed by helm. The example in README.md was not valid YAML, and therefore did not work (I fixed this in #580). If you need to use helm templating in the variables file, you'll need to do something that still renders as valid YAML; sometimes no change is needed, sometimes adding quotes is enough, sometimes ugly hacks are necessary (as in your example in #240), possibly there are occasions where it is not possible.