charts icon indicating copy to clipboard operation
charts copied to clipboard

values.yaml has wrong types defined for env + envRaw

Open JVMartin opened this issue 4 years ago • 2 comments

The values.yaml file has: https://github.com/KongZ/charts/blob/a721b8366afbcc837f848f83774538045da8f3bb/charts/graylog/values.yaml#L70 https://github.com/KongZ/charts/blob/a721b8366afbcc837f848f83774538045da8f3bb/charts/graylog/values.yaml#L83

However, these need to be arrays:

env: []
envRaw: []

They are unusable as objects.

e.g., with these values:

graylog:
  envRaw:
    - name: TEST
      value: test

We get the errors:

cannot overwrite table with non table for envRaw (map[])"

JVMartin avatar Dec 15 '21 20:12 JVMartin

creating the env vars like so works for me:

env:
          GRAYLOG_OUTPUT_BATCH_SIZE: 8000
          GRAYLOG_OUTPUTBUFFER_PROCESSORS: 6
          GRAYLOG_PROCESSBUFFER_PROCESSORS: 10

In my opinion list is more accurate, but its work anyway :)

tamirhad avatar Jan 09 '22 22:01 tamirhad

creating the env vars like so works for me:

env:
          GRAYLOG_OUTPUT_BATCH_SIZE: 8000
          GRAYLOG_OUTPUTBUFFER_PROCESSORS: 6
          GRAYLOG_PROCESSBUFFER_PROCESSORS: 10

In my opinion list is more accurate, but its work anyway :)

This might be true for static environment variable definitions, but won't work with dynamic ones, e.g. like so:

env:
- name: POD_NAME
  valueFrom:
    fieldRef:
      fieldPath: metadata.name

matthiasguentert avatar May 23 '23 11:05 matthiasguentert