diff --git a/factory/factory.go b/factory/factory.go index 0e3b2a7..2678ea8 100644 --- a/factory/factory.go +++ b/factory/factory.go @@ -51,14 +51,6 @@ func InitConfigFactory(f string) error { if UdrConfig.Configuration.WebuiUri == "" { UdrConfig.Configuration.WebuiUri = "webui:9876" } - if os.Getenv("MANAGED_BY_CONFIG_POD") == "true" { - logger.InitLog.Infoln("MANAGED_BY_CONFIG_POD is true") - } else { - go func() { - logger.InitLog.Infoln("use helm chart config") - ConfigPodTrigger <- true - }() - } } return nil diff --git a/service/init.go b/service/init.go index 37826e9..4edebe7 100644 --- a/service/init.go +++ b/service/init.go @@ -90,6 +90,11 @@ func (udr *UDR) Initialize(c *cli.Context) error { if os.Getenv("MANAGED_BY_CONFIG_POD") == "true" { logger.InitLog.Infoln("MANAGED_BY_CONFIG_POD is true") go manageGrpcClient(factory.UdrConfig.Configuration.WebuiUri) + } else { + go func() { + logger.InitLog.Infoln("use helm chart config") + factory.ConfigPodTrigger <- true + }() } return nil