Guard the auto-join functionality behind its `consul.server_auto_join` tunable

This commit is contained in:
Sean Chittenden 2016-06-14 15:27:15 -07:00
parent 5e0ced2ae7
commit 324af8d7f1
No known key found for this signature in database
GPG Key ID: 4EBC9DC16C2E5E16
1 changed files with 3 additions and 1 deletions

View File

@ -469,7 +469,9 @@ func (s *Server) setupConsulSyncer() error {
return nil
}
s.consulSyncer.AddPeriodicHandler("Nomad Server Fallback Server Handler", bootstrapFn)
if s.config.ConsulConfig.ServerAutoJoin {
s.consulSyncer.AddPeriodicHandler("Nomad Server Fallback Server Handler", bootstrapFn)
}
return nil
}