FAForever / server

The servercode for the Forged Alliance Forever lobby
http://www.faforever.com
GNU General Public License v3.0
67 stars 62 forks source link

Get default config values from environment #998

Closed Askaholic closed 7 months ago

Askaholic commented 7 months ago

@Brutus5000 requested this feature to make managing secrets easier in kubernetes. This way values like the database password which are never going to change dynamically anyway can be stored in a Secret object and mapped to the environment while non-sensitive data can be stored in a ConfigMap and mapped to a volume that will be able to trigger the dynamic changes. Since kubernetes doesn't really support merging those two things into a single file, this feature will make setting up the configuration a lot easier and more idiomatic.

NOTE: This will only work for values which are expected to be strings! This should not be a problem since this feature is only intended to be used for passwords.

Brutus5000 commented 7 months ago

Is refresh guaranteed to be called on startup?

Askaholic commented 7 months ago

Yep, it’s called in the constructor