Charts: [stable/datadog] DD_TAGS in an unexpected format

Created on 12 Mar 2020  路  4Comments  路  Source: helm/charts

Describe the bug
I added some tags to via:

tags:
    - stage: staging
    - region: eu

These tags appear in DD UI as map_region and map_staging, which is counterintuitive to me. Looking at the generated template, it seems that the chart isn't reading the datadog.tags as an YAML array.

Version of Helm and Kubernetes:
Helm 3.1.1
Kubernets 1.14.9

Which chart:
stable/datadog

What happened:
Tags appear in DD UI as map_region and map_staging
Rendered template is:

name: DD_TAGS
value: [map[region:eu] map[stage:staging]]

What you expected to happen:
I expect my tags to appear exactly as written

Most helpful comment

I've ran into the same issue today and it took me some time to figure out what's wrong. Maybe the example in the values.yaml could be changed?

From:

  tags:
  #   - <KEY_1>:<VALUE_1>
  #   - <KEY_2>:<VALUE_2>

to

  tags:
  #   - "<KEY_1>:<VALUE_1>"
  #   - "<KEY_2>:<VALUE_2>"

which would make it a lot clearer that the values should be strings

All 4 comments

Hi @deiga
Thank you for opening this issue. the attended format of the tags field is a list of string but not a map[string]string.

tags:
  - "stage:staging"
  - "region:eu"

You can found more details about why we are using this format in this issue comment: https://github.com/helm/charts/issues/20842#issuecomment-590751486

Let me know if it make sens to you?

Cedric

Okay, yeah. Now I understand what was missing. It's just very confusing when you use YAML-like syntax but it's not YAML :)

yes that why we love [and|or] hate YAML :)

I've ran into the same issue today and it took me some time to figure out what's wrong. Maybe the example in the values.yaml could be changed?

From:

  tags:
  #   - <KEY_1>:<VALUE_1>
  #   - <KEY_2>:<VALUE_2>

to

  tags:
  #   - "<KEY_1>:<VALUE_1>"
  #   - "<KEY_2>:<VALUE_2>"

which would make it a lot clearer that the values should be strings

Was this page helpful?
0 / 5 - 0 ratings