diff --git a/server/ingester/config/config.go b/server/ingester/config/config.go index 51aaa4a381f..481ed3bb922 100644 --- a/server/ingester/config/config.go +++ b/server/ingester/config/config.go @@ -270,8 +270,8 @@ func (c *Config) Validate() error { } c.NodeIP = nodeIP } - - myNodeName, exist := os.LookupEnv(EnvK8sNodeName) + var exist bool + myNodeName, exist = os.LookupEnv(EnvK8sNodeName) if !exist { log.Errorf("Can't get node name env %s", EnvK8sNodeName) sleepAndExit()