From 1afe55c9ed9210f4bfa8c6c6988295b55b7af475 Mon Sep 17 00:00:00 2001 From: zhuofeng Date: Fri, 12 Jan 2024 17:42:12 +0800 Subject: [PATCH] [ingester] fix get node name failed --- server/ingester/config/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()