Skip to content

Add support for glob-syntax in the config file environment variables

Created by: Trivernis

What

This change adds support for loading config files with glob syntax using the environment variables. For example to load all yaml-files one can configure the config path as *.{yml,yaml} using the environment variables. The files are merged in lexicographical order so a file 70_cfg.yaml have take priority over 00_cfg.yaml as it is applied later.

This PR additionally introduces the SHARKEY_CONFIG_YML environment variable to load the config from.

Why

This simplifies many automatic setups, like kubernetes deployments. For example it enables separation of sensitive configuration values (like database credentials) from common config options.

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

Merge request reports