Unverified Commit a07c73d0 authored by Kubernetes Prow Robot's avatar Kubernetes Prow Robot Committed by GitHub

Merge pull request #74371 from rajansandeep/testhealthcheck

Add health plugin for CoreDNS in the DNS tests
parents b9565bc9 0172019d
...@@ -66,6 +66,7 @@ func (t *dnsFederationsConfigMapTest) run() { ...@@ -66,6 +66,7 @@ func (t *dnsFederationsConfigMapTest) run() {
t.labels = []string{"abc", "ghi"} t.labels = []string{"abc", "ghi"}
valid1 := map[string]string{ valid1 := map[string]string{
"Corefile": fmt.Sprintf(`.:53 { "Corefile": fmt.Sprintf(`.:53 {
health
kubernetes %v in-addr.arpa ip6.arpa { kubernetes %v in-addr.arpa ip6.arpa {
pods insecure pods insecure
upstream upstream
...@@ -74,12 +75,13 @@ func (t *dnsFederationsConfigMapTest) run() { ...@@ -74,12 +75,13 @@ func (t *dnsFederationsConfigMapTest) run() {
federation %v { federation %v {
abc def.com abc def.com
} }
proxy . /etc/resolv.conf forward . /etc/resolv.conf
}`, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterDNSDomain)} }`, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterDNSDomain)}
valid1m := map[string]string{t.labels[0]: "def.com"} valid1m := map[string]string{t.labels[0]: "def.com"}
valid2 := map[string]string{ valid2 := map[string]string{
"Corefile": fmt.Sprintf(`:53 { "Corefile": fmt.Sprintf(`:53 {
health
kubernetes %v in-addr.arpa ip6.arpa { kubernetes %v in-addr.arpa ip6.arpa {
pods insecure pods insecure
upstream upstream
...@@ -88,7 +90,7 @@ func (t *dnsFederationsConfigMapTest) run() { ...@@ -88,7 +90,7 @@ func (t *dnsFederationsConfigMapTest) run() {
federation %v { federation %v {
ghi xyz.com ghi xyz.com
} }
proxy . /etc/resolv.conf forward . /etc/resolv.conf
}`, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterDNSDomain)} }`, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterDNSDomain)}
valid2m := map[string]string{t.labels[1]: "xyz.com"} valid2m := map[string]string{t.labels[1]: "xyz.com"}
...@@ -228,15 +230,16 @@ func (t *dnsNameserverTest) run(isIPv6 bool) { ...@@ -228,15 +230,16 @@ func (t *dnsNameserverTest) run(isIPv6 bool) {
if t.name == "coredns" { if t.name == "coredns" {
t.setConfigMap(&v1.ConfigMap{Data: map[string]string{ t.setConfigMap(&v1.ConfigMap{Data: map[string]string{
"Corefile": fmt.Sprintf(`.:53 { "Corefile": fmt.Sprintf(`.:53 {
health
kubernetes %v in-addr.arpa ip6.arpa { kubernetes %v in-addr.arpa ip6.arpa {
pods insecure pods insecure
upstream upstream
fallthrough in-addr.arpa ip6.arpa fallthrough in-addr.arpa ip6.arpa
} }
proxy . %v forward . %v
} }
acme.local:53 { acme.local:53 {
proxy . %v forward . %v
}`, framework.TestContext.ClusterDNSDomain, t.dnsServerPod.Status.PodIP, t.dnsServerPod.Status.PodIP), }`, framework.TestContext.ClusterDNSDomain, t.dnsServerPod.Status.PodIP, t.dnsServerPod.Status.PodIP),
}}) }})
...@@ -325,12 +328,13 @@ func (t *dnsPtrFwdTest) run(isIPv6 bool) { ...@@ -325,12 +328,13 @@ func (t *dnsPtrFwdTest) run(isIPv6 bool) {
if t.name == "coredns" { if t.name == "coredns" {
t.setConfigMap(&v1.ConfigMap{Data: map[string]string{ t.setConfigMap(&v1.ConfigMap{Data: map[string]string{
"Corefile": fmt.Sprintf(`.:53 { "Corefile": fmt.Sprintf(`.:53 {
health
kubernetes %v in-addr.arpa ip6.arpa { kubernetes %v in-addr.arpa ip6.arpa {
pods insecure pods insecure
upstream upstream
fallthrough in-addr.arpa ip6.arpa fallthrough in-addr.arpa ip6.arpa
} }
proxy . %v forward . %v
}`, framework.TestContext.ClusterDNSDomain, t.dnsServerPod.Status.PodIP), }`, framework.TestContext.ClusterDNSDomain, t.dnsServerPod.Status.PodIP),
}}) }})
...@@ -434,12 +438,13 @@ func (t *dnsExternalNameTest) run(isIPv6 bool) { ...@@ -434,12 +438,13 @@ func (t *dnsExternalNameTest) run(isIPv6 bool) {
if t.name == "coredns" { if t.name == "coredns" {
t.setConfigMap(&v1.ConfigMap{Data: map[string]string{ t.setConfigMap(&v1.ConfigMap{Data: map[string]string{
"Corefile": fmt.Sprintf(`.:53 { "Corefile": fmt.Sprintf(`.:53 {
health
kubernetes %v in-addr.arpa ip6.arpa { kubernetes %v in-addr.arpa ip6.arpa {
pods insecure pods insecure
upstream upstream
fallthrough in-addr.arpa ip6.arpa fallthrough in-addr.arpa ip6.arpa
} }
proxy . %v forward . %v
}`, framework.TestContext.ClusterDNSDomain, t.dnsServerPod.Status.PodIP), }`, framework.TestContext.ClusterDNSDomain, t.dnsServerPod.Status.PodIP),
}}) }})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment