INNER CODE UNIT · Go
func
kuberhealthy/kuberhealthy · cmd/kuberhealthy/config.go:107
func (c *Config) LoadFromEnv() error {
// override listen address when an alternate value is provided
listenAddress := os.Getenv("KH_LISTEN_ADDRESS")
if listenAddress != "" {
c.ListenAddress = listenAddress
}
// override the TLS listener address from the environment
listenAddressTLS := os.Getenv("KH_LISTEN_ADDRESS_TLS")
if listenAddressTLS != "" {
c.ListenAddressTLS = listenAddressTLS
}
// allow configuring the global log level with KH_LOG_LEVEL
logLevel := os.Getenv("KH_LOG_LEVEL")
if logLevel != "" {
c.LogLevel = logLevel
}