Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override YAML configs with ENV vars #168

Open
tel opened this issue Mar 6, 2022 · 0 comments
Open

Override YAML configs with ENV vars #168

tel opened this issue Mar 6, 2022 · 0 comments

Comments

@tel
Copy link

tel commented Mar 6, 2022

Hi, I'd like to be able to declare overrides from environment variables in my YAML file. Generally, I'm interested in being able to set up an overrides file which inherits values from, say, a Kubernetes manifest declaring environment variables.

Ideally, the application would define a root config.yaml file which is loaded by the type provider and defines the configured values. Then, it would also include an override file which mirrors the structure of the inner config.yaml but declares environment variable overrides. The final values are then declared in a k8s manifest where they can inherit from k8s secrets and the like.

# /path/to/src/folder/config.yaml, included with the application code
Secrets:
  Provider:
    # documentation here describes the meaning and use of this key
    ApiKey: development_api_key
# /path/to/deploy/folder/local_config.yaml, available at the runtime location
Secrets:
  Provider:
    ApiKey: ${API_KEY}

This doesn't appear to work today as the YAML parsing does not interpolate env variables. I think the sufficient change would be to enable this functionality in YAML parsing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant