@@ -49,8 +49,9 @@ var _ = SIGDescribe("DNS", func() {
49
49
namesToResolve := []string {
50
50
fmt .Sprintf ("kubernetes.default.svc.%s" , framework .TestContext .ClusterDNSDomain ),
51
51
}
52
- wheezyProbeCmd , wheezyFileNames := createProbeCommand (namesToResolve , nil , "" , "wheezy" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
53
- jessieProbeCmd , jessieFileNames := createProbeCommand (namesToResolve , nil , "" , "jessie" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
52
+ // TODO: Validate both IPv4 and IPv6 families for dual-stack
53
+ wheezyProbeCmd , wheezyFileNames := createProbeCommand (namesToResolve , nil , "" , "wheezy" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain , framework .ClusterIsIPv6 ())
54
+ jessieProbeCmd , jessieFileNames := createProbeCommand (namesToResolve , nil , "" , "jessie" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain , framework .ClusterIsIPv6 ())
54
55
ginkgo .By ("Running these commands on wheezy: " + wheezyProbeCmd + "\n " )
55
56
ginkgo .By ("Running these commands on jessie: " + jessieProbeCmd + "\n " )
56
57
@@ -70,8 +71,9 @@ var _ = SIGDescribe("DNS", func() {
70
71
namesToResolve = append (namesToResolve , "metadata" )
71
72
}
72
73
73
- wheezyProbeCmd , wheezyFileNames := createProbeCommand (namesToResolve , nil , "" , "wheezy" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
74
- jessieProbeCmd , jessieFileNames := createProbeCommand (namesToResolve , nil , "" , "jessie" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
74
+ // TODO: Validate both IPv4 and IPv6 families for dual-stack
75
+ wheezyProbeCmd , wheezyFileNames := createProbeCommand (namesToResolve , nil , "" , "wheezy" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain , framework .ClusterIsIPv6 ())
76
+ jessieProbeCmd , jessieFileNames := createProbeCommand (namesToResolve , nil , "" , "jessie" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain , framework .ClusterIsIPv6 ())
75
77
ginkgo .By ("Running these commands on wheezy: " + wheezyProbeCmd + "\n " )
76
78
ginkgo .By ("Running these commands on jessie: " + jessieProbeCmd + "\n " )
77
79
@@ -91,8 +93,9 @@ var _ = SIGDescribe("DNS", func() {
91
93
}
92
94
hostFQDN := fmt .Sprintf ("%s.%s.%s.svc.%s" , dnsTestPodHostName , dnsTestServiceName , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
93
95
hostEntries := []string {hostFQDN , dnsTestPodHostName }
94
- wheezyProbeCmd , wheezyFileNames := createProbeCommand (namesToResolve , hostEntries , "" , "wheezy" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
95
- jessieProbeCmd , jessieFileNames := createProbeCommand (namesToResolve , hostEntries , "" , "jessie" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
96
+ // TODO: Validate both IPv4 and IPv6 families for dual-stack
97
+ wheezyProbeCmd , wheezyFileNames := createProbeCommand (namesToResolve , hostEntries , "" , "wheezy" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain , framework .ClusterIsIPv6 ())
98
+ jessieProbeCmd , jessieFileNames := createProbeCommand (namesToResolve , hostEntries , "" , "jessie" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain , framework .ClusterIsIPv6 ())
96
99
ginkgo .By ("Running these commands on wheezy: " + wheezyProbeCmd + "\n " )
97
100
ginkgo .By ("Running these commands on jessie: " + jessieProbeCmd + "\n " )
98
101
@@ -110,8 +113,9 @@ var _ = SIGDescribe("DNS", func() {
110
113
framework .ConformanceIt ("should provide /etc/hosts entries for the cluster [LinuxOnly]" , func () {
111
114
hostFQDN := fmt .Sprintf ("%s.%s.%s.svc.%s" , dnsTestPodHostName , dnsTestServiceName , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
112
115
hostEntries := []string {hostFQDN , dnsTestPodHostName }
113
- wheezyProbeCmd , wheezyFileNames := createProbeCommand (nil , hostEntries , "" , "wheezy" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
114
- jessieProbeCmd , jessieFileNames := createProbeCommand (nil , hostEntries , "" , "jessie" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
116
+ // TODO: Validate both IPv4 and IPv6 families for dual-stack
117
+ wheezyProbeCmd , wheezyFileNames := createProbeCommand (nil , hostEntries , "" , "wheezy" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain , framework .ClusterIsIPv6 ())
118
+ jessieProbeCmd , jessieFileNames := createProbeCommand (nil , hostEntries , "" , "jessie" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain , framework .ClusterIsIPv6 ())
115
119
ginkgo .By ("Running these commands on wheezy: " + wheezyProbeCmd + "\n " )
116
120
ginkgo .By ("Running these commands on jessie: " + jessieProbeCmd + "\n " )
117
121
@@ -162,8 +166,9 @@ var _ = SIGDescribe("DNS", func() {
162
166
fmt .Sprintf ("_http._tcp.%s.%s.svc.%s" , regularService .Name , f .Namespace .Name , framework .TestContext .ClusterDNSDomain ),
163
167
}
164
168
165
- wheezyProbeCmd , wheezyFileNames := createProbeCommand (namesToResolve , nil , regularService .Spec .ClusterIP , "wheezy" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
166
- jessieProbeCmd , jessieFileNames := createProbeCommand (namesToResolve , nil , regularService .Spec .ClusterIP , "jessie" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
169
+ // TODO: Validate both IPv4 and IPv6 families for dual-stack
170
+ wheezyProbeCmd , wheezyFileNames := createProbeCommand (namesToResolve , nil , regularService .Spec .ClusterIP , "wheezy" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain , framework .ClusterIsIPv6 ())
171
+ jessieProbeCmd , jessieFileNames := createProbeCommand (namesToResolve , nil , regularService .Spec .ClusterIP , "jessie" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain , framework .ClusterIsIPv6 ())
167
172
ginkgo .By ("Running these commands on wheezy: " + wheezyProbeCmd + "\n " )
168
173
ginkgo .By ("Running these commands on jessie: " + jessieProbeCmd + "\n " )
169
174
@@ -212,8 +217,9 @@ var _ = SIGDescribe("DNS", func() {
212
217
fmt .Sprintf ("_http._tcp.%s.%s.svc" , regularService .Name , f .Namespace .Name ),
213
218
}
214
219
215
- wheezyProbeCmd , wheezyFileNames := createProbeCommand (namesToResolve , nil , regularService .Spec .ClusterIP , "wheezy" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
216
- jessieProbeCmd , jessieFileNames := createProbeCommand (namesToResolve , nil , regularService .Spec .ClusterIP , "jessie" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
220
+ // TODO: Validate both IPv4 and IPv6 families for dual-stack
221
+ wheezyProbeCmd , wheezyFileNames := createProbeCommand (namesToResolve , nil , regularService .Spec .ClusterIP , "wheezy" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain , framework .ClusterIsIPv6 ())
222
+ jessieProbeCmd , jessieFileNames := createProbeCommand (namesToResolve , nil , regularService .Spec .ClusterIP , "jessie" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain , framework .ClusterIsIPv6 ())
217
223
ginkgo .By ("Running these commands on wheezy: " + wheezyProbeCmd + "\n " )
218
224
ginkgo .By ("Running these commands on jessie: " + jessieProbeCmd + "\n " )
219
225
@@ -251,8 +257,9 @@ var _ = SIGDescribe("DNS", func() {
251
257
252
258
hostFQDN := fmt .Sprintf ("%s.%s.%s.svc.%s" , podHostname , serviceName , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
253
259
hostNames := []string {hostFQDN , podHostname }
254
- wheezyProbeCmd , wheezyFileNames := createProbeCommand (nil , hostNames , "" , "wheezy" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
255
- jessieProbeCmd , jessieFileNames := createProbeCommand (nil , hostNames , "" , "jessie" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
260
+ // TODO: Validate both IPv4 and IPv6 families for dual-stack
261
+ wheezyProbeCmd , wheezyFileNames := createProbeCommand (nil , hostNames , "" , "wheezy" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain , framework .ClusterIsIPv6 ())
262
+ jessieProbeCmd , jessieFileNames := createProbeCommand (nil , hostNames , "" , "jessie" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain , framework .ClusterIsIPv6 ())
256
263
ginkgo .By ("Running these commands on wheezy: " + wheezyProbeCmd + "\n " )
257
264
ginkgo .By ("Running these commands on jessie: " + jessieProbeCmd + "\n " )
258
265
@@ -293,8 +300,9 @@ var _ = SIGDescribe("DNS", func() {
293
300
hostFQDN := fmt .Sprintf ("%s.%s.%s.svc.%s" , podHostname , serviceName , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
294
301
subdomain := fmt .Sprintf ("%s.%s.svc.%s" , serviceName , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
295
302
namesToResolve := []string {hostFQDN , subdomain }
296
- wheezyProbeCmd , wheezyFileNames := createProbeCommand (namesToResolve , nil , "" , "wheezy" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
297
- jessieProbeCmd , jessieFileNames := createProbeCommand (namesToResolve , nil , "" , "jessie" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain )
303
+ // TODO: Validate both IPv4 and IPv6 families for dual-stack
304
+ wheezyProbeCmd , wheezyFileNames := createProbeCommand (namesToResolve , nil , "" , "wheezy" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain , framework .ClusterIsIPv6 ())
305
+ jessieProbeCmd , jessieFileNames := createProbeCommand (namesToResolve , nil , "" , "jessie" , f .Namespace .Name , framework .TestContext .ClusterDNSDomain , framework .ClusterIsIPv6 ())
298
306
ginkgo .By ("Running these commands on wheezy: " + wheezyProbeCmd + "\n " )
299
307
ginkgo .By ("Running these commands on jessie: " + jessieProbeCmd + "\n " )
300
308
@@ -365,8 +373,14 @@ var _ = SIGDescribe("DNS", func() {
365
373
}
366
374
})
367
375
framework .ExpectNoError (err , "failed to change service type to ClusterIP for service: %s" , serviceName )
368
- wheezyProbeCmd , wheezyFileName = createTargetedProbeCommand (hostFQDN , "A" , "wheezy" )
369
- jessieProbeCmd , jessieFileName = createTargetedProbeCommand (hostFQDN , "A" , "jessie" )
376
+ targetRecord := "A"
377
+ if framework .ClusterIsIPv6 () {
378
+ targetRecord = "AAAA"
379
+ }
380
+ // TODO: For dual stack we can run from here two createTargetedProbeCommand()
381
+ // one looking for an A record and another one for an AAAA record
382
+ wheezyProbeCmd , wheezyFileName = createTargetedProbeCommand (hostFQDN , targetRecord , "wheezy" )
383
+ jessieProbeCmd , jessieFileName = createTargetedProbeCommand (hostFQDN , targetRecord , "jessie" )
370
384
ginkgo .By ("Running these commands on wheezy: " + wheezyProbeCmd + "\n " )
371
385
ginkgo .By ("Running these commands on jessie: " + jessieProbeCmd + "\n " )
372
386
0 commit comments