This is added as a form of convention over configuration.
The convention adopted is that in Kubernetes environment variables can be exposed:
POD_NAME
POD_NAMESPACE
POD_VERSION
POD_IP
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
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) andappEnvironment
(copied from POD_NAMESPACE).If there is a POD_NAME env var then we can use that to set
appName
andappInstanceId
. If there is a POD_NAMESPACE env var then we set that asappEnvironment
If POD_IP then we setappIp
If POD_VERSION then setappVersion