Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reload service registration configuration on SIGHUP #17598

3 changes: 3 additions & 0 deletions changelog/17598.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
core/config: reload service registration configuration on SIGHUP
```
9 changes: 9 additions & 0 deletions command/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1685,6 +1685,15 @@ func (c *ServerCommand) Run(args []string) int {
}
}

// notify ServiceRegistration that a configuration reload has occurred
if sr := coreConfig.GetServiceRegistration(); sr != nil {
var srConfig *map[string]string
if config.ServiceRegistration != nil {
srConfig = &config.ServiceRegistration.Config
}
sr.NotifyConfigurationReload(srConfig)
}

if err := core.ReloadCensus(); err != nil {
c.UI.Error(err.Error())
}
Expand Down
Loading
Loading