Quick and dirty hack to get interpolated dns values working
This commit is contained in:
parent
6449ba8d41
commit
960e192359
|
@ -1041,10 +1041,14 @@ func (tr *TaskRunner) buildTaskConfig() *drivers.TaskConfig {
|
|||
if alloc.AllocatedResources != nil && len(alloc.AllocatedResources.Shared.Networks) > 0 {
|
||||
allocDNS := alloc.AllocatedResources.Shared.Networks[0].DNS
|
||||
if allocDNS != nil {
|
||||
// could potentially interpolate here
|
||||
interpolatedNetworks := taskenv.InterpolateNetworks(env, alloc.AllocatedResources.Shared.Networks)
|
||||
tr.logger.Info("allocDNS is set", "dnsserver", allocDNS.Servers)
|
||||
tr.logger.Info("interpolatedDNS is set", "dnsserver", interpolatedNetworks[0].DNS.Servers)
|
||||
dns = &drivers.DNSConfig{
|
||||
Servers: allocDNS.Servers,
|
||||
Searches: allocDNS.Searches,
|
||||
Options: allocDNS.Options,
|
||||
Servers: interpolatedNetworks[0].DNS.Servers,
|
||||
Searches: interpolatedNetworks[0].DNS.Searches,
|
||||
Options: interpolatedNetworks[0].DNS.Options,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue