Add query options to Nomad API queries to make sure we query the correct namespace

This commit is contained in:
sirkrypt0
2021-05-31 16:07:18 +02:00
committed by Maximilian Pass
parent ce2b82d43d
commit 66821dbfc8
2 changed files with 11 additions and 7 deletions

View File

@@ -12,13 +12,13 @@ const (
// LoadJobList loads the list of jobs from the Nomad api.
func (nc *nomadApiClient) LoadJobList() (list []*nomadApi.JobListStub, err error) {
list, _, err = nc.client.Jobs().List(nil)
list, _, err = nc.client.Jobs().List(nc.queryOptions)
return
}
// JobScale returns the scale of the passed job.
func (nc *nomadApiClient) JobScale(jobId string) (jobScale uint, err error) {
status, _, err := nc.client.Jobs().ScaleStatus(jobId, nil)
status, _, err := nc.client.Jobs().ScaleStatus(jobId, nc.queryOptions)
if err != nil {
return
}