bramble
bramble copied to clipboard
Read Configuration from Environment Variable
Allow to inject configuration JSON block as environment variable.
This will allow us to setup parameters dynamically in manifest.
@yaronp are you using kubernetes or another orchestrator?
On our kubernetes setup we have a ConfigMap that contains the configuration files, we mount this as a volume into the container of the Deployment. Then if the ConfigMap is updated you can either roll out a restart of the Deployment or what we do is rely on the fact that fsnotify
will watch for updates of the config files, we update an annotation on the Deployment after updating the ConfigMap and this will trigger the volume mount to update based on the ConfigMap.
Given the size of the config file I wouldn't want to inject all of it in via an environment variable as it's difficult to escape JSON reliably in a json or yaml manifest file.