mirror of
https://github.com/kemko/nomad.git
synced 2026-01-09 03:45:41 +03:00
service hook: get correct NS for task-level consul (#19242)
Ensure that the `ServiceProviderNamespace` correctly picks the task-level `consul.namespace` and falls back to the group if set.
This commit is contained in:
@@ -53,7 +53,7 @@ func (a *Allocation) ServiceProviderNamespace() string {
|
||||
case ServiceProviderNomad:
|
||||
return a.Job.Namespace
|
||||
default:
|
||||
return tg.Consul.GetNamespace()
|
||||
return a.ConsulNamespaceForTask(task.Name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user