Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated cherry pick of #74371: add health plugin in the DNS tests #74687

Merged
merged 1 commit into from
Mar 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 11 additions & 6 deletions test/e2e/network/dns_configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func (t *dnsFederationsConfigMapTest) run() {
t.labels = []string{"abc", "ghi"}
valid1 := map[string]string{
"Corefile": fmt.Sprintf(`.:53 {
health
kubernetes %v in-addr.arpa ip6.arpa {
pods insecure
upstream
Expand All @@ -74,12 +75,13 @@ func (t *dnsFederationsConfigMapTest) run() {
federation %v {
abc def.com
}
proxy . /etc/resolv.conf
forward . /etc/resolv.conf
}`, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterDNSDomain)}
valid1m := map[string]string{t.labels[0]: "def.com"}

valid2 := map[string]string{
"Corefile": fmt.Sprintf(`:53 {
health
kubernetes %v in-addr.arpa ip6.arpa {
pods insecure
upstream
Expand All @@ -88,7 +90,7 @@ func (t *dnsFederationsConfigMapTest) run() {
federation %v {
ghi xyz.com
}
proxy . /etc/resolv.conf
forward . /etc/resolv.conf
}`, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterDNSDomain)}
valid2m := map[string]string{t.labels[1]: "xyz.com"}

Expand Down Expand Up @@ -228,15 +230,16 @@ func (t *dnsNameserverTest) run(isIPv6 bool) {
if t.name == "coredns" {
t.setConfigMap(&v1.ConfigMap{Data: map[string]string{
"Corefile": fmt.Sprintf(`.:53 {
health
kubernetes %v in-addr.arpa ip6.arpa {
pods insecure
upstream
fallthrough in-addr.arpa ip6.arpa
}
proxy . %v
forward . %v
}
acme.local:53 {
proxy . %v
forward . %v
}`, framework.TestContext.ClusterDNSDomain, t.dnsServerPod.Status.PodIP, t.dnsServerPod.Status.PodIP),
}})

Expand Down Expand Up @@ -325,12 +328,13 @@ func (t *dnsPtrFwdTest) run(isIPv6 bool) {
if t.name == "coredns" {
t.setConfigMap(&v1.ConfigMap{Data: map[string]string{
"Corefile": fmt.Sprintf(`.:53 {
health
kubernetes %v in-addr.arpa ip6.arpa {
pods insecure
upstream
fallthrough in-addr.arpa ip6.arpa
}
proxy . %v
forward . %v
}`, framework.TestContext.ClusterDNSDomain, t.dnsServerPod.Status.PodIP),
}})

Expand Down Expand Up @@ -434,12 +438,13 @@ func (t *dnsExternalNameTest) run(isIPv6 bool) {
if t.name == "coredns" {
t.setConfigMap(&v1.ConfigMap{Data: map[string]string{
"Corefile": fmt.Sprintf(`.:53 {
health
kubernetes %v in-addr.arpa ip6.arpa {
pods insecure
upstream
fallthrough in-addr.arpa ip6.arpa
}
proxy . %v
forward . %v
}`, framework.TestContext.ClusterDNSDomain, t.dnsServerPod.Status.PodIP),
}})

Expand Down