bramble icon indicating copy to clipboard operation
bramble copied to clipboard

Read Configuration from Environment Variable

Open yaronp opened this issue 3 years ago • 1 comments

Allow to inject configuration JSON block as environment variable.

This will allow us to setup parameters dynamically in manifest.

yaronp avatar Feb 28 '22 12:02 yaronp

@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.

pkqk avatar Jun 10 '22 00:06 pkqk