Added configmap option to disable IPv6 in nginx DNS resolver (#1992)
This commit is contained in:
parent
ad2238ca94
commit
42076e8ed0
7 changed files with 46 additions and 17 deletions
|
|
@ -28,6 +28,7 @@ import (
|
|||
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
|
||||
"k8s.io/ingress-nginx/internal/file"
|
||||
"k8s.io/ingress-nginx/internal/ingress"
|
||||
"k8s.io/ingress-nginx/internal/ingress/annotations/authreq"
|
||||
|
|
@ -352,7 +353,14 @@ func TestBuildResolvers(t *testing.T) {
|
|||
ipList := []net.IP{ipOne, ipTwo}
|
||||
|
||||
validResolver := "resolver 192.0.0.1 [2001:db8:1234::] valid=30s;"
|
||||
resolver := buildResolvers(ipList)
|
||||
resolver := buildResolvers(ipList, false)
|
||||
|
||||
if resolver != validResolver {
|
||||
t.Errorf("Expected '%v' but returned '%v'", validResolver, resolver)
|
||||
}
|
||||
|
||||
validResolver = "resolver 192.0.0.1 valid=30s ipv6=off;"
|
||||
resolver = buildResolvers(ipList, true)
|
||||
|
||||
if resolver != validResolver {
|
||||
t.Errorf("Expected '%v' but returned '%v'", validResolver, resolver)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue