From d33dbb2515ab342883a86cc22b4ad664513c1f41 Mon Sep 17 00:00:00 2001 From: Alex Blackie Date: Wed, 9 Nov 2022 16:37:48 -0800 Subject: [PATCH] Change expected hostname env var name The HOSTNAME env is a common unix variable, and is set for things like containers in a Kubernetes cluster. This means that if you are using a file for config, the hostname in the config will be ignored and replaced with the machine or container name. This was not the intention. We should clarify the name of the environment variable we are looking for to `TARGET_HOSTNAME` to avoid this conflict. --- config/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/main.go b/config/main.go index f53a075..ab44dd9 100644 --- a/config/main.go +++ b/config/main.go @@ -31,7 +31,7 @@ func LoadConfig(configPath string) (*Config, error) { } } - if value, exists := os.LookupEnv("HOSTNAME"); exists { + if value, exists := os.LookupEnv("TARGET_HOSTNAME"); exists { config.Hostname = value }