Handle PodSandboxConfig.DNSConfig.Options
DNSConfig can pass "options" settings in now, so add them to the resolv.conf that we're generating, too. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
parent
23d86cd866
commit
ec1bc4d6a8
2 changed files with 13 additions and 3 deletions
|
@ -162,8 +162,9 @@ func (s *Server) RunPodSandbox(ctx context.Context, req *pb.RunPodSandboxRequest
|
|||
// set DNS options
|
||||
dnsServers := req.GetConfig().GetDnsConfig().GetServers()
|
||||
dnsSearches := req.GetConfig().GetDnsConfig().GetSearches()
|
||||
dnsOptions := req.GetConfig().GetDnsConfig().GetOptions()
|
||||
resolvPath := fmt.Sprintf("%s/resolv.conf", podSandboxDir)
|
||||
err = parseDNSOptions(dnsServers, dnsSearches, resolvPath)
|
||||
err = parseDNSOptions(dnsServers, dnsSearches, dnsOptions, resolvPath)
|
||||
if err != nil {
|
||||
err1 := removeFile(resolvPath)
|
||||
if err1 != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue