Commit 65c1811 Thomas Wunderlich
committed
1 parent aeff83b commit 65c1811 Copy full SHA for 65c1811
File tree 1 file changed +7
-3
lines changed
client/allocrunner/taskrunner
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1041,10 +1041,14 @@ func (tr *TaskRunner) buildTaskConfig() *drivers.TaskConfig {
1041
1041
if alloc .AllocatedResources != nil && len (alloc .AllocatedResources .Shared .Networks ) > 0 {
1042
1042
allocDNS := alloc .AllocatedResources .Shared .Networks [0 ].DNS
1043
1043
if allocDNS != nil {
1044
+ // could potentially interpolate here
1045
+ interpolatedNetworks := taskenv .InterpolateNetworks (env , alloc .AllocatedResources .Shared .Networks )
1046
+ tr .logger .Info ("allocDNS is set" , "dnsserver" , allocDNS .Servers )
1047
+ tr .logger .Info ("interpolatedDNS is set" , "dnsserver" , interpolatedNetworks [0 ].DNS .Servers )
1044
1048
dns = & drivers.DNSConfig {
1045
- Servers : allocDNS .Servers ,
1046
- Searches : allocDNS .Searches ,
1047
- Options : allocDNS .Options ,
1049
+ Servers : interpolatedNetworks [ 0 ]. DNS .Servers ,
1050
+ Searches : interpolatedNetworks [ 0 ]. DNS .Searches ,
1051
+ Options : interpolatedNetworks [ 0 ]. DNS .Options ,
1048
1052
}
1049
1053
}
1050
1054
}
You can’t perform that action at this time.
0 commit comments