Skip to content

Commit

Permalink
Add interpolation on service canarymeta
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgemarey authored and fredrikhgrelland committed Oct 22, 2020
1 parent 5e21ac4 commit 78cf0b9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions client/taskenv/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ func InterpolateServices(taskEnv *TaskEnv, services []*structs.Service) []*struc
service.Meta = meta
}

if len(service.CanaryMeta) > 0 {
canaryMeta := make(map[string]string, len(service.CanaryMeta))
for k, v := range service.CanaryMeta {
canaryMeta[k] = taskEnv.ReplaceEnv(v)
}
service.CanaryMeta = canaryMeta
}

interpolated[i] = service
}

Expand Down

0 comments on commit 78cf0b9

Please sign in to comment.