Skip to content

Commit a07c73d

Browse files
authored
Merge pull request kubernetes#74371 from rajansandeep/testhealthcheck
Add health plugin for CoreDNS in the DNS tests
2 parents b9565bc + 0172019 commit a07c73d

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

test/e2e/network/dns_configmap.go

+11-6
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ func (t *dnsFederationsConfigMapTest) run() {
6666
t.labels = []string{"abc", "ghi"}
6767
valid1 := map[string]string{
6868
"Corefile": fmt.Sprintf(`.:53 {
69+
health
6970
kubernetes %v in-addr.arpa ip6.arpa {
7071
pods insecure
7172
upstream
@@ -74,12 +75,13 @@ func (t *dnsFederationsConfigMapTest) run() {
7475
federation %v {
7576
abc def.com
7677
}
77-
proxy . /etc/resolv.conf
78+
forward . /etc/resolv.conf
7879
}`, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterDNSDomain)}
7980
valid1m := map[string]string{t.labels[0]: "def.com"}
8081

8182
valid2 := map[string]string{
8283
"Corefile": fmt.Sprintf(`:53 {
84+
health
8385
kubernetes %v in-addr.arpa ip6.arpa {
8486
pods insecure
8587
upstream
@@ -88,7 +90,7 @@ func (t *dnsFederationsConfigMapTest) run() {
8890
federation %v {
8991
ghi xyz.com
9092
}
91-
proxy . /etc/resolv.conf
93+
forward . /etc/resolv.conf
9294
}`, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterDNSDomain)}
9395
valid2m := map[string]string{t.labels[1]: "xyz.com"}
9496

@@ -228,15 +230,16 @@ func (t *dnsNameserverTest) run(isIPv6 bool) {
228230
if t.name == "coredns" {
229231
t.setConfigMap(&v1.ConfigMap{Data: map[string]string{
230232
"Corefile": fmt.Sprintf(`.:53 {
233+
health
231234
kubernetes %v in-addr.arpa ip6.arpa {
232235
pods insecure
233236
upstream
234237
fallthrough in-addr.arpa ip6.arpa
235238
}
236-
proxy . %v
239+
forward . %v
237240
}
238241
acme.local:53 {
239-
proxy . %v
242+
forward . %v
240243
}`, framework.TestContext.ClusterDNSDomain, t.dnsServerPod.Status.PodIP, t.dnsServerPod.Status.PodIP),
241244
}})
242245

@@ -325,12 +328,13 @@ func (t *dnsPtrFwdTest) run(isIPv6 bool) {
325328
if t.name == "coredns" {
326329
t.setConfigMap(&v1.ConfigMap{Data: map[string]string{
327330
"Corefile": fmt.Sprintf(`.:53 {
331+
health
328332
kubernetes %v in-addr.arpa ip6.arpa {
329333
pods insecure
330334
upstream
331335
fallthrough in-addr.arpa ip6.arpa
332336
}
333-
proxy . %v
337+
forward . %v
334338
}`, framework.TestContext.ClusterDNSDomain, t.dnsServerPod.Status.PodIP),
335339
}})
336340

@@ -434,12 +438,13 @@ func (t *dnsExternalNameTest) run(isIPv6 bool) {
434438
if t.name == "coredns" {
435439
t.setConfigMap(&v1.ConfigMap{Data: map[string]string{
436440
"Corefile": fmt.Sprintf(`.:53 {
441+
health
437442
kubernetes %v in-addr.arpa ip6.arpa {
438443
pods insecure
439444
upstream
440445
fallthrough in-addr.arpa ip6.arpa
441446
}
442-
proxy . %v
447+
forward . %v
443448
}`, framework.TestContext.ClusterDNSDomain, t.dnsServerPod.Status.PodIP),
444449
}})
445450

0 commit comments

Comments
 (0)