ory/k8s

Issues with some data types in `values.yaml`

rikkuness opened this issue · 1 comments

Preflight checklist

Describe the bug

When setting some values such as deployment.extraContainers the documentation and value set in values.yaml suggest the value should be an object here however the example shows a string and given the template here is using {{ tpl .Values.deployment.extraContainers }} I believe the correct value in values.yaml should be "".

There seems to be a few places where this is the case extraContainers, extraInitContainers and lifecycle in the Hydra Helm charts at least.

Reproducing the bug

Set the value of deployment.extraContainers to the example value as per https://github.com/ory/k8s/blob/master/helm/charts/hydra/values.yaml#L318-L320

Relevant log output

coalesce.go:220: warning: cannot overwrite table with non table for example.hydra.deployment.extraContainers (map[])
coalesce.go:220: warning: cannot overwrite table with non table for example.hydra.deployment.extraContainers (map[])
coalesce.go:220: warning: cannot overwrite table with non table for example.hydra.deployment.extraContainers (map[])

Relevant configuration

deployment:
  extraContainers:
    - name: example
      image: example/image

Version

v1.11.7

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Kubernetes with Helm

Additional Context

No response

Hi there!
The warning are as you noticed, mostly caused by the use of tpl functions which expect strings in places you would expect and object or array. I agree, that the default values.yaml should be updated to reflect that. It was probably missed when we were introducing tpl 😞