avaje / avaje-config

Application configuration / properties loading for JVM applications
https://avaje.io/config
Apache License 2.0
55 stars 8 forks source link

Add support for reading POD_NAME, POD_NAMESPACE, POD_VERSION, POD_ID #2

Closed rbygrave closed 4 years ago

rbygrave commented 4 years ago

This is added as a form of convention over configuration.

The convention adopted is that in Kubernetes environment variables can be exposed:

We use these to set system properties - the most useful are appName (derived from POD_NAME) and appEnvironment (copied from POD_NAMESPACE).


If there is a POD_NAME env var then we can use that to set appName and appInstanceId. If there is a POD_NAMESPACE env var then we set that as appEnvironment If POD_IP then we set appIp If POD_VERSION then set appVersion