|
|
|
@ -58,15 +58,13 @@ var _ = common.SIGDescribe("DNS", func() {
|
|
|
|
|
fmt.Sprintf("kubernetes.default.svc.%s", framework.TestContext.ClusterDNSDomain),
|
|
|
|
|
}
|
|
|
|
|
// TODO: Validate both IPv4 and IPv6 families for dual-stack
|
|
|
|
|
wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, nil, "", "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
jessieProbeCmd, jessieFileNames := createProbeCommand(namesToResolve, nil, "", "jessie", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands on wheezy: " + wheezyProbeCmd + "\n")
|
|
|
|
|
ginkgo.By("Running these commands on jessie: " + jessieProbeCmd + "\n")
|
|
|
|
|
probeCmd, fileNames := createProbeCommand(namesToResolve, nil, "", "dns", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands: " + probeCmd + "\n")
|
|
|
|
|
|
|
|
|
|
// Run a pod which probes DNS and exposes the results by HTTP.
|
|
|
|
|
ginkgo.By("creating a pod to probe DNS")
|
|
|
|
|
pod := createDNSPod(f.Namespace.Name, wheezyProbeCmd, jessieProbeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
validateDNSResults(ctx, f, pod, append(wheezyFileNames, jessieFileNames...))
|
|
|
|
|
pod := createDNSPod(f.Namespace.Name, probeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
validateDNSResults(ctx, f, pod, fileNames)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// Added due to #8512. This is critical for GCE and GKE deployments.
|
|
|
|
@ -80,15 +78,13 @@ var _ = common.SIGDescribe("DNS", func() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TODO: Validate both IPv4 and IPv6 families for dual-stack
|
|
|
|
|
wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, nil, "", "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
jessieProbeCmd, jessieFileNames := createProbeCommand(namesToResolve, nil, "", "jessie", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands on wheezy: " + wheezyProbeCmd + "\n")
|
|
|
|
|
ginkgo.By("Running these commands on jessie: " + jessieProbeCmd + "\n")
|
|
|
|
|
probeCmd, fileNames := createProbeCommand(namesToResolve, nil, "", "dns", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands: " + probeCmd + "\n")
|
|
|
|
|
|
|
|
|
|
// Run a pod which probes DNS and exposes the results by HTTP.
|
|
|
|
|
ginkgo.By("creating a pod to probe DNS")
|
|
|
|
|
pod := createDNSPod(f.Namespace.Name, wheezyProbeCmd, jessieProbeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
validateDNSResults(ctx, f, pod, append(wheezyFileNames, jessieFileNames...))
|
|
|
|
|
pod := createDNSPod(f.Namespace.Name, probeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
validateDNSResults(ctx, f, pod, fileNames)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// [LinuxOnly]: As Windows currently does not support resolving PQDNs.
|
|
|
|
@ -101,15 +97,13 @@ var _ = common.SIGDescribe("DNS", func() {
|
|
|
|
|
hostFQDN := fmt.Sprintf("%s.%s.%s.svc.%s", dnsTestPodHostName, dnsTestServiceName, f.Namespace.Name, framework.TestContext.ClusterDNSDomain)
|
|
|
|
|
hostEntries := []string{hostFQDN, dnsTestPodHostName}
|
|
|
|
|
// TODO: Validate both IPv4 and IPv6 families for dual-stack
|
|
|
|
|
wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, hostEntries, "", "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
jessieProbeCmd, jessieFileNames := createProbeCommand(namesToResolve, hostEntries, "", "jessie", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands on wheezy: " + wheezyProbeCmd + "\n")
|
|
|
|
|
ginkgo.By("Running these commands on jessie: " + jessieProbeCmd + "\n")
|
|
|
|
|
probeCmd, fileNames := createProbeCommand(namesToResolve, hostEntries, "", "dns", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands: " + probeCmd + "\n")
|
|
|
|
|
|
|
|
|
|
// Run a pod which probes DNS and exposes the results by HTTP.
|
|
|
|
|
ginkgo.By("creating a pod to probe DNS")
|
|
|
|
|
pod := createDNSPod(f.Namespace.Name, wheezyProbeCmd, jessieProbeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
validateDNSResults(ctx, f, pod, append(wheezyFileNames, jessieFileNames...))
|
|
|
|
|
pod := createDNSPod(f.Namespace.Name, probeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
validateDNSResults(ctx, f, pod, fileNames)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
@ -121,15 +115,13 @@ var _ = common.SIGDescribe("DNS", func() {
|
|
|
|
|
hostFQDN := fmt.Sprintf("%s.%s.%s.svc.%s", dnsTestPodHostName, dnsTestServiceName, f.Namespace.Name, framework.TestContext.ClusterDNSDomain)
|
|
|
|
|
hostEntries := []string{hostFQDN, dnsTestPodHostName}
|
|
|
|
|
// TODO: Validate both IPv4 and IPv6 families for dual-stack
|
|
|
|
|
wheezyProbeCmd, wheezyFileNames := createProbeCommand(nil, hostEntries, "", "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
jessieProbeCmd, jessieFileNames := createProbeCommand(nil, hostEntries, "", "jessie", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands on wheezy: " + wheezyProbeCmd + "\n")
|
|
|
|
|
ginkgo.By("Running these commands on jessie: " + jessieProbeCmd + "\n")
|
|
|
|
|
probeCmd, fileNames := createProbeCommand(nil, hostEntries, "", "dns", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands: " + probeCmd + "\n")
|
|
|
|
|
|
|
|
|
|
// Run a pod which probes /etc/hosts and exposes the results by HTTP.
|
|
|
|
|
ginkgo.By("creating a pod to probe /etc/hosts")
|
|
|
|
|
pod := createDNSPod(f.Namespace.Name, wheezyProbeCmd, jessieProbeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
validateDNSResults(ctx, f, pod, append(wheezyFileNames, jessieFileNames...))
|
|
|
|
|
pod := createDNSPod(f.Namespace.Name, probeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
validateDNSResults(ctx, f, pod, fileNames)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
@ -172,17 +164,15 @@ var _ = common.SIGDescribe("DNS", func() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TODO: Validate both IPv4 and IPv6 families for dual-stack
|
|
|
|
|
wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, nil, regularService.Spec.ClusterIP, "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
jessieProbeCmd, jessieFileNames := createProbeCommand(namesToResolve, nil, regularService.Spec.ClusterIP, "jessie", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands on wheezy: " + wheezyProbeCmd + "\n")
|
|
|
|
|
ginkgo.By("Running these commands on jessie: " + jessieProbeCmd + "\n")
|
|
|
|
|
probeCmd, fileNames := createProbeCommand(namesToResolve, nil, regularService.Spec.ClusterIP, "dns", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands: " + probeCmd + "\n")
|
|
|
|
|
|
|
|
|
|
// Run a pod which probes DNS and exposes the results by HTTP.
|
|
|
|
|
ginkgo.By("creating a pod to probe DNS")
|
|
|
|
|
pod := createDNSPod(f.Namespace.Name, wheezyProbeCmd, jessieProbeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
pod := createDNSPod(f.Namespace.Name, probeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
pod.ObjectMeta.Labels = testServiceSelector
|
|
|
|
|
|
|
|
|
|
validateDNSResults(ctx, f, pod, append(wheezyFileNames, jessieFileNames...))
|
|
|
|
|
validateDNSResults(ctx, f, pod, fileNames)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
@ -225,17 +215,15 @@ var _ = common.SIGDescribe("DNS", func() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TODO: Validate both IPv4 and IPv6 families for dual-stack
|
|
|
|
|
wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, nil, regularService.Spec.ClusterIP, "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
jessieProbeCmd, jessieFileNames := createProbeCommand(namesToResolve, nil, regularService.Spec.ClusterIP, "jessie", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands on wheezy: " + wheezyProbeCmd + "\n")
|
|
|
|
|
ginkgo.By("Running these commands on jessie: " + jessieProbeCmd + "\n")
|
|
|
|
|
probeCmd, fileNames := createProbeCommand(namesToResolve, nil, regularService.Spec.ClusterIP, "dns", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands: " + probeCmd + "\n")
|
|
|
|
|
|
|
|
|
|
// Run a pod which probes DNS and exposes the results by HTTP.
|
|
|
|
|
ginkgo.By("creating a pod to probe DNS")
|
|
|
|
|
pod := createDNSPod(f.Namespace.Name, wheezyProbeCmd, jessieProbeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
pod := createDNSPod(f.Namespace.Name, probeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
pod.ObjectMeta.Labels = testServiceSelector
|
|
|
|
|
|
|
|
|
|
validateDNSResults(ctx, f, pod, append(wheezyFileNames, jessieFileNames...))
|
|
|
|
|
validateDNSResults(ctx, f, pod, fileNames)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
@ -265,19 +253,17 @@ var _ = common.SIGDescribe("DNS", func() {
|
|
|
|
|
hostFQDN := fmt.Sprintf("%s.%s.%s.svc.%s", podHostname, serviceName, f.Namespace.Name, framework.TestContext.ClusterDNSDomain)
|
|
|
|
|
hostNames := []string{hostFQDN, podHostname}
|
|
|
|
|
// TODO: Validate both IPv4 and IPv6 families for dual-stack
|
|
|
|
|
wheezyProbeCmd, wheezyFileNames := createProbeCommand(nil, hostNames, "", "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
jessieProbeCmd, jessieFileNames := createProbeCommand(nil, hostNames, "", "jessie", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands on wheezy: " + wheezyProbeCmd + "\n")
|
|
|
|
|
ginkgo.By("Running these commands on jessie: " + jessieProbeCmd + "\n")
|
|
|
|
|
probeCmd, fileNames := createProbeCommand(nil, hostNames, "", "dns", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands: " + probeCmd + "\n")
|
|
|
|
|
|
|
|
|
|
// Run a pod which probes DNS and exposes the results by HTTP.
|
|
|
|
|
ginkgo.By("creating a pod to probe DNS")
|
|
|
|
|
pod1 := createDNSPod(f.Namespace.Name, wheezyProbeCmd, jessieProbeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
pod1 := createDNSPod(f.Namespace.Name, probeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
pod1.ObjectMeta.Labels = testServiceSelector
|
|
|
|
|
pod1.Spec.Hostname = podHostname
|
|
|
|
|
pod1.Spec.Subdomain = serviceName
|
|
|
|
|
|
|
|
|
|
validateDNSResults(ctx, f, pod1, append(wheezyFileNames, jessieFileNames...))
|
|
|
|
|
validateDNSResults(ctx, f, pod1, fileNames)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
@ -308,19 +294,17 @@ var _ = common.SIGDescribe("DNS", func() {
|
|
|
|
|
subdomain := fmt.Sprintf("%s.%s.svc.%s", serviceName, f.Namespace.Name, framework.TestContext.ClusterDNSDomain)
|
|
|
|
|
namesToResolve := []string{hostFQDN, subdomain}
|
|
|
|
|
// TODO: Validate both IPv4 and IPv6 families for dual-stack
|
|
|
|
|
wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, nil, "", "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
jessieProbeCmd, jessieFileNames := createProbeCommand(namesToResolve, nil, "", "jessie", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands on wheezy: " + wheezyProbeCmd + "\n")
|
|
|
|
|
ginkgo.By("Running these commands on jessie: " + jessieProbeCmd + "\n")
|
|
|
|
|
probeCmd, fileNames := createProbeCommand(namesToResolve, nil, "", "dns", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands: " + probeCmd + "\n")
|
|
|
|
|
|
|
|
|
|
// Run a pod which probes DNS and exposes the results by HTTP.
|
|
|
|
|
ginkgo.By("creating a pod to probe DNS")
|
|
|
|
|
pod1 := createDNSPod(f.Namespace.Name, wheezyProbeCmd, jessieProbeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
pod1 := createDNSPod(f.Namespace.Name, probeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
pod1.ObjectMeta.Labels = testServiceSelector
|
|
|
|
|
pod1.Spec.Hostname = podHostname
|
|
|
|
|
pod1.Spec.Subdomain = serviceName
|
|
|
|
|
|
|
|
|
|
validateDNSResults(ctx, f, pod1, append(wheezyFileNames, jessieFileNames...))
|
|
|
|
|
validateDNSResults(ctx, f, pod1, fileNames)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
@ -343,16 +327,14 @@ var _ = common.SIGDescribe("DNS", func() {
|
|
|
|
|
return f.ClientSet.CoreV1().Services(f.Namespace.Name).Delete(ctx, externalNameService.Name, metav1.DeleteOptions{})
|
|
|
|
|
})
|
|
|
|
|
hostFQDN := fmt.Sprintf("%s.%s.svc.%s", serviceName, f.Namespace.Name, framework.TestContext.ClusterDNSDomain)
|
|
|
|
|
wheezyProbeCmd, wheezyFileName := createTargetedProbeCommand(hostFQDN, "CNAME", "wheezy")
|
|
|
|
|
jessieProbeCmd, jessieFileName := createTargetedProbeCommand(hostFQDN, "CNAME", "jessie")
|
|
|
|
|
ginkgo.By("Running these commands on wheezy: " + wheezyProbeCmd + "\n")
|
|
|
|
|
ginkgo.By("Running these commands on jessie: " + jessieProbeCmd + "\n")
|
|
|
|
|
probeCmd, fileName := createTargetedProbeCommand(hostFQDN, "CNAME", "dns")
|
|
|
|
|
ginkgo.By("Running these commands: " + probeCmd + "\n")
|
|
|
|
|
|
|
|
|
|
// Run a pod which probes DNS and exposes the results by HTTP.
|
|
|
|
|
ginkgo.By("creating a pod to probe DNS")
|
|
|
|
|
pod1 := createDNSPod(f.Namespace.Name, wheezyProbeCmd, jessieProbeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
pod1 := createDNSPod(f.Namespace.Name, probeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
|
|
|
|
|
validateTargetedProbeOutput(ctx, f, pod1, []string{wheezyFileName, jessieFileName}, "foo.example.com.")
|
|
|
|
|
validateTargetedProbeOutput(ctx, f, pod1, []string{fileName}, "foo.example.com.")
|
|
|
|
|
|
|
|
|
|
// Test changing the externalName field
|
|
|
|
|
ginkgo.By("changing the externalName to bar.example.com")
|
|
|
|
@ -360,16 +342,14 @@ var _ = common.SIGDescribe("DNS", func() {
|
|
|
|
|
s.Spec.ExternalName = "bar.example.com"
|
|
|
|
|
})
|
|
|
|
|
framework.ExpectNoError(err, "failed to change externalName of service: %s", serviceName)
|
|
|
|
|
wheezyProbeCmd, wheezyFileName = createTargetedProbeCommand(hostFQDN, "CNAME", "wheezy")
|
|
|
|
|
jessieProbeCmd, jessieFileName = createTargetedProbeCommand(hostFQDN, "CNAME", "jessie")
|
|
|
|
|
ginkgo.By("Running these commands on wheezy: " + wheezyProbeCmd + "\n")
|
|
|
|
|
ginkgo.By("Running these commands on jessie: " + jessieProbeCmd + "\n")
|
|
|
|
|
probeCmd, fileName = createTargetedProbeCommand(hostFQDN, "CNAME", "dns")
|
|
|
|
|
ginkgo.By("Running these commands: " + probeCmd + "\n")
|
|
|
|
|
|
|
|
|
|
// Run a pod which probes DNS and exposes the results by HTTP.
|
|
|
|
|
ginkgo.By("creating a second pod to probe DNS")
|
|
|
|
|
pod2 := createDNSPod(f.Namespace.Name, wheezyProbeCmd, jessieProbeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
pod2 := createDNSPod(f.Namespace.Name, probeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
|
|
|
|
|
validateTargetedProbeOutput(ctx, f, pod2, []string{wheezyFileName, jessieFileName}, "bar.example.com.")
|
|
|
|
|
validateTargetedProbeOutput(ctx, f, pod2, []string{fileName}, "bar.example.com.")
|
|
|
|
|
|
|
|
|
|
// Test changing type from ExternalName to ClusterIP
|
|
|
|
|
ginkgo.By("changing the service to type=ClusterIP")
|
|
|
|
@ -386,19 +366,17 @@ var _ = common.SIGDescribe("DNS", func() {
|
|
|
|
|
}
|
|
|
|
|
// TODO: For dual stack we can run from here two createTargetedProbeCommand()
|
|
|
|
|
// one looking for an A record and another one for an AAAA record
|
|
|
|
|
wheezyProbeCmd, wheezyFileName = createTargetedProbeCommand(hostFQDN, targetRecord, "wheezy")
|
|
|
|
|
jessieProbeCmd, jessieFileName = createTargetedProbeCommand(hostFQDN, targetRecord, "jessie")
|
|
|
|
|
ginkgo.By("Running these commands on wheezy: " + wheezyProbeCmd + "\n")
|
|
|
|
|
ginkgo.By("Running these commands on jessie: " + jessieProbeCmd + "\n")
|
|
|
|
|
probeCmd, fileName = createTargetedProbeCommand(hostFQDN, targetRecord, "dns")
|
|
|
|
|
ginkgo.By("Running these commands: " + probeCmd + "\n")
|
|
|
|
|
|
|
|
|
|
// Run a pod which probes DNS and exposes the results by HTTP.
|
|
|
|
|
ginkgo.By("creating a third pod to probe DNS")
|
|
|
|
|
pod3 := createDNSPod(f.Namespace.Name, wheezyProbeCmd, jessieProbeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
pod3 := createDNSPod(f.Namespace.Name, probeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
|
|
|
|
|
svc, err := f.ClientSet.CoreV1().Services(f.Namespace.Name).Get(ctx, externalNameService.Name, metav1.GetOptions{})
|
|
|
|
|
framework.ExpectNoError(err, "failed to get service: %s", externalNameService.Name)
|
|
|
|
|
|
|
|
|
|
validateTargetedProbeOutput(ctx, f, pod3, []string{wheezyFileName, jessieFileName}, svc.Spec.ClusterIP)
|
|
|
|
|
validateTargetedProbeOutput(ctx, f, pod3, []string{fileName}, svc.Spec.ClusterIP)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
@ -570,10 +548,8 @@ var _ = common.SIGDescribe("DNS", func() {
|
|
|
|
|
hostFQDN := fmt.Sprintf("%s.%s.%s.svc.%s", dnsTestPodHostName, dnsTestServiceName, f.Namespace.Name, framework.TestContext.ClusterDNSDomain)
|
|
|
|
|
hostEntries := []string{hostFQDN, dnsTestPodHostName}
|
|
|
|
|
// TODO: Validate both IPv4 and IPv6 families for dual-stack
|
|
|
|
|
wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, hostEntries, "", "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
jessieProbeCmd, jessieFileNames := createProbeCommand(namesToResolve, hostEntries, "", "jessie", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands on wheezy: " + wheezyProbeCmd + "\n")
|
|
|
|
|
ginkgo.By("Running these commands on jessie: " + jessieProbeCmd + "\n")
|
|
|
|
|
probeCmd, fileNames := createProbeCommand(namesToResolve, hostEntries, "", "dns", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands: " + probeCmd + "\n")
|
|
|
|
|
|
|
|
|
|
ginkgo.By("Creating a pod with expanded DNS configuration to probe DNS")
|
|
|
|
|
testNdotsValue := "5"
|
|
|
|
@ -585,7 +561,7 @@ var _ = common.SIGDescribe("DNS", func() {
|
|
|
|
|
fmt.Sprintf("%038d.k8s.io", 5),
|
|
|
|
|
fmt.Sprintf("%038d.k8s.io", 6), // 260 characters
|
|
|
|
|
}
|
|
|
|
|
pod := createDNSPod(f.Namespace.Name, wheezyProbeCmd, jessieProbeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
pod := createDNSPod(f.Namespace.Name, probeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
pod.Spec.DNSPolicy = v1.DNSClusterFirst
|
|
|
|
|
pod.Spec.DNSConfig = &v1.PodDNSConfig{
|
|
|
|
|
Searches: testSearchPaths,
|
|
|
|
@ -596,7 +572,7 @@ var _ = common.SIGDescribe("DNS", func() {
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
validateDNSResults(ctx, f, pod, append(wheezyFileNames, jessieFileNames...))
|
|
|
|
|
validateDNSResults(ctx, f, pod, fileNames)
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -663,18 +639,16 @@ var _ = common.SIGDescribe("DNS HostNetwork", func() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TODO: Validate both IPv4 and IPv6 families for dual-stack
|
|
|
|
|
wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, nil, regularService.Spec.ClusterIP, "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
jessieProbeCmd, jessieFileNames := createProbeCommand(namesToResolve, nil, regularService.Spec.ClusterIP, "jessie", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands on wheezy: " + wheezyProbeCmd + "\n")
|
|
|
|
|
ginkgo.By("Running these commands on jessie: " + jessieProbeCmd + "\n")
|
|
|
|
|
probeCmd, fileNames := createProbeCommand(namesToResolve, nil, regularService.Spec.ClusterIP, "dns", f.Namespace.Name, framework.TestContext.ClusterDNSDomain, framework.TestContext.ClusterIsIPv6())
|
|
|
|
|
ginkgo.By("Running these commands: " + probeCmd + "\n")
|
|
|
|
|
|
|
|
|
|
// Run a pod which probes DNS and exposes the results by HTTP.
|
|
|
|
|
ginkgo.By("creating a pod to probe DNS")
|
|
|
|
|
pod := createDNSPod(f.Namespace.Name, wheezyProbeCmd, jessieProbeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
pod := createDNSPod(f.Namespace.Name, probeCmd, dnsTestPodHostName, dnsTestServiceName)
|
|
|
|
|
pod.ObjectMeta.Labels = testServiceSelector
|
|
|
|
|
pod.Spec.HostNetwork = true
|
|
|
|
|
pod.Spec.DNSPolicy = v1.DNSClusterFirstWithHostNet
|
|
|
|
|
validateDNSResults(ctx, f, pod, append(wheezyFileNames, jessieFileNames...))
|
|
|
|
|
validateDNSResults(ctx, f, pod, fileNames)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// https://issues.k8s.io/67019
|
|
|
|
|