Use authentication token from config for communication with Nomad
This commit is contained in:

committed by
Jan-Eric Hellenberg

parent
23b726cef9
commit
3aa1227db6
@@ -45,7 +45,11 @@ func runServer(server *http.Server) {
|
||||
|
||||
func initServer() *http.Server {
|
||||
// API initialization
|
||||
nomadAPIClient, err := nomad.NewExecutorAPI(config.Config.NomadAPIURL(), config.Config.Nomad.Namespace)
|
||||
nomadAPIClient, err := nomad.NewExecutorAPI(
|
||||
config.Config.NomadAPIURL(),
|
||||
config.Config.Nomad.Namespace,
|
||||
config.Config.Nomad.Token,
|
||||
)
|
||||
if err != nil {
|
||||
log.WithError(err).WithField("nomad url", config.Config.NomadAPIURL()).Fatal("Error parsing the nomad url")
|
||||
}
|
||||
|
Reference in New Issue
Block a user