Skip to content

Commit

Permalink
vault: set JobID in Vault metadata (#11397)
Browse files Browse the repository at this point in the history
Closes: #11395 .
  • Loading branch information
Mahmood Ali authored Oct 27, 2021
1 parent 56a7cc6 commit 54ca97f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/11397.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
vault: Add JobID and TaskGroup to Vault Token metadata
```
2 changes: 2 additions & 0 deletions nomad/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,8 @@ func (v *vaultClient) CreateToken(ctx context.Context, a *structs.Allocation, ta
Policies: taskVault.Policies,
Metadata: map[string]string{
"AllocationID": a.ID,
"JobID": a.JobID,
"TaskGroup": a.TaskGroup,
"Task": task,
"NodeID": a.NodeID,
"Namespace": namespaceForTask,
Expand Down

0 comments on commit 54ca97f

Please sign in to comment.