Skip to content

Commit

Permalink
move if clause to check MANAGED_BY_CONFIG_POD env value to service
Browse files Browse the repository at this point in the history
Signed-off-by: gatici <[email protected]>
  • Loading branch information
gatici committed Oct 27, 2024
1 parent ed7de6d commit 06d3c21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
8 changes: 0 additions & 8 deletions factory/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions service/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,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
Expand Down

0 comments on commit 06d3c21

Please sign in to comment.