trinodb / charts

Apache License 2.0
151 stars 173 forks source link

Add templating support in `additionalConfigFiles` #240

Closed sdaberdaku closed 1 month ago

sdaberdaku commented 1 month ago

With this feature we now can do sth like this: In values.yaml

...
groupProvider:
  refreshPeriod: 60s
  groups:
    group_1:
      - user_1
      - user_2
      - user_3
    group_2:
      - user_4
...
coordinator:
  additionalConfigFiles:
    group-provider.properties: |-
      group-provider.name=file
      file.group-file={{ .Values.server.config.path }}/group-provider.db
      file.refresh-period={{ .Values.groupProvider.refreshPeriod }}

    group-provider.db: |-
      {{- range $k, $v := .Values.groupProvider.groups }}
      {{- printf "%s:%s\n" $k (join "," $v) }}
      {{- end }}

Closes #237