vectordotdev / helm-charts

Helm charts for Vector.
https://vector.dev
Mozilla Public License 2.0
102 stars 89 forks source link

Support templating for initContainers #392

Open dslynko-cma-se opened 1 month ago

dslynko-cma-se commented 1 month ago

In our case vector sends logs to clickhouse and init container is used for running liquibase migrations so we need to specify DB url/creds twice: in customConfig.sinks section and in init container env. If initContainers section was templated as customConfig, it would be simple to pass parameters using --set.

The change should be simple

{{- with .Values.initContainers }}
initContainers:
{{ tpl (toYaml .) $ | indent 2 }}
{{- end }}

in _pod.tpl