helm-chart icon indicating copy to clipboard operation
helm-chart copied to clipboard

feat: enable configs values to be templated

Open Lowaiz opened this issue 2 years ago • 0 comments

Add the possibility to use template syntax inside the configs sub-values

Since the config file conf.php need credentials for database connection, we should be able to fetch these credentials via vault and be able to insert them inside the configuration.

Example of this feature inside Values.yaml file:

configs:
  conf.php: |-
    [main]
    ...
    [model]
    class = Database
    [model_options]
    dsn = "pgsql:host={{ $.Values.secrets.database.host }};dbname={{ $.Values.secrets.database.name }};charset=UTF8"
    tbl = "{{ $.Values.secrets.database.prefix }}"
    usr = "{{ $.Values.secrets.database.user }}"
    pwd = "{{ $.Values.secrets.database.password }}"
    opt[12] = true

Lowaiz avatar May 04 '22 12:05 Lowaiz