mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
jobspec: support cluster field for Vault block (#18408)
This field supports the upcoming ENT-only multiple Vault clusters feature. The job validation and mutation hooks will come in a separate PR. Ref: https://github.com/hashicorp/team-nomad/issues/404
This commit is contained in:
@@ -1292,6 +1292,7 @@ func ApiTaskToStructsTask(job *structs.Job, group *structs.TaskGroup,
|
||||
Role: apiTask.Vault.Role,
|
||||
Policies: apiTask.Vault.Policies,
|
||||
Namespace: *apiTask.Vault.Namespace,
|
||||
Cluster: apiTask.Vault.Cluster,
|
||||
Env: *apiTask.Vault.Env,
|
||||
DisableFile: *apiTask.Vault.DisableFile,
|
||||
ChangeMode: *apiTask.Vault.ChangeMode,
|
||||
|
||||
@@ -3214,6 +3214,7 @@ func TestJobs_ApiJobToStructsJob(t *testing.T) {
|
||||
Vault: &structs.Vault{
|
||||
Role: "nomad-task",
|
||||
Namespace: "ns1",
|
||||
Cluster: "default",
|
||||
Policies: []string{"a", "b", "c"},
|
||||
Env: true,
|
||||
DisableFile: false,
|
||||
|
||||
Reference in New Issue
Block a user