From b228aebaf2e9a0c2c7b069b88724f0e36ab93751 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sat, 31 Aug 2024 13:34:55 -0700 Subject: [PATCH] Clean up DNS e2e wrt Jessie/Wheezy --- test/e2e/network/dns.go | 130 +++++++----------- test/e2e/network/dns_common.go | 14 +- test/e2e/storage/testsuites/multivolume.go | 4 +- test/images/.permitted-images | 1 - test/images/image-util.sh | 2 +- test/images/jessie-dnsutils/BASEIMAGE | 7 - test/images/jessie-dnsutils/Dockerfile | 32 ----- .../images/jessie-dnsutils/Dockerfile_windows | 28 ---- test/images/jessie-dnsutils/OWNERS | 3 - test/images/jessie-dnsutils/README.md | 4 - test/images/jessie-dnsutils/VERSION | 1 - test/images/jessie-dnsutils/fixup-apt-list.sh | 32 ----- test/utils/image/manifest.go | 3 - 13 files changed, 58 insertions(+), 203 deletions(-) delete mode 100644 test/images/jessie-dnsutils/BASEIMAGE delete mode 100644 test/images/jessie-dnsutils/Dockerfile delete mode 100644 test/images/jessie-dnsutils/Dockerfile_windows delete mode 100644 test/images/jessie-dnsutils/OWNERS delete mode 100644 test/images/jessie-dnsutils/README.md delete mode 100644 test/images/jessie-dnsutils/VERSION delete mode 100755 test/images/jessie-dnsutils/fixup-apt-list.sh diff --git a/test/e2e/network/dns.go b/test/e2e/network/dns.go index 54ce81f4133..3853daae2fe 100644 --- a/test/e2e/network/dns.go +++ b/test/e2e/network/dns.go @@ -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 diff --git a/test/e2e/network/dns_common.go b/test/e2e/network/dns_common.go index 9d64c5aae39..6e0f3830045 100644 --- a/test/e2e/network/dns_common.go +++ b/test/e2e/network/dns_common.go @@ -35,7 +35,6 @@ import ( clientset "k8s.io/client-go/kubernetes" "k8s.io/kubernetes/test/e2e/framework" e2epod "k8s.io/kubernetes/test/e2e/framework/pod" - imageutils "k8s.io/kubernetes/test/utils/image" dnsclient "k8s.io/kubernetes/third_party/forked/golang/net" admissionapi "k8s.io/pod-security-admission/api" @@ -352,7 +351,7 @@ func (t *dnsTestCommon) deleteDNSServerPod(ctx context.Context) { } } -func createDNSPod(namespace, wheezyProbeCmd, jessieProbeCmd, podHostName, serviceName string) *v1.Pod { +func createDNSPod(namespace, probeCmd, podHostName, serviceName string) *v1.Pod { podName := "dns-test-" + string(uuid.NewUUID()) volumes := []v1.Volume{ { @@ -373,17 +372,10 @@ func createDNSPod(namespace, wheezyProbeCmd, jessieProbeCmd, podHostName, servic dnsPod := e2epod.NewAgnhostPod(namespace, podName, volumes, mounts, nil, "test-webserver") dnsPod.Spec.Containers[0].Name = "webserver" - querier := e2epod.NewAgnhostContainer("querier", mounts, nil, wheezyProbeCmd) + querier := e2epod.NewAgnhostContainer("querier", mounts, nil, probeCmd) querier.Command = []string{"sh", "-c"} - jessieQuerier := v1.Container{ - Name: "jessie-querier", - Image: imageutils.GetE2EImage(imageutils.JessieDnsutils), - Command: []string{"sh", "-c", jessieProbeCmd}, - VolumeMounts: mounts, - } - - dnsPod.Spec.Containers = append(dnsPod.Spec.Containers, querier, jessieQuerier) + dnsPod.Spec.Containers = append(dnsPod.Spec.Containers, querier) dnsPod.Spec.Hostname = podHostName dnsPod.Spec.Subdomain = serviceName diff --git a/test/e2e/storage/testsuites/multivolume.go b/test/e2e/storage/testsuites/multivolume.go index 8c4363f0501..25c6fa89408 100644 --- a/test/e2e/storage/testsuites/multivolume.go +++ b/test/e2e/storage/testsuites/multivolume.go @@ -565,7 +565,7 @@ func TestConcurrentAccessToSingleVolume(ctx context.Context, f *framework.Framew SeLinuxLabel: e2epod.GetLinuxLabel(), NodeSelection: node, PVCsReadOnly: readOnly, - ImageID: e2epod.GetTestImageID(imageutils.JessieDnsutils), + ImageID: e2epod.GetTestImageID(imageutils.Agnhost), } pod, err := e2epod.CreateSecPodWithNodeSelection(ctx, cs, &podConfig, f.Timeouts.PodStart) framework.ExpectNoError(err) @@ -687,7 +687,7 @@ func TestConcurrentAccessToRelatedVolumes(ctx context.Context, f *framework.Fram SeLinuxLabel: e2epod.GetLinuxLabel(), NodeSelection: node, PVCsReadOnly: false, - ImageID: e2epod.GetTestImageID(imageutils.JessieDnsutils), + ImageID: e2epod.GetTestImageID(imageutils.Agnhost), } pod, err := e2epod.CreateSecPodWithNodeSelection(ctx, cs, &podConfig, f.Timeouts.PodStart) defer func() { diff --git a/test/images/.permitted-images b/test/images/.permitted-images index ec7dac61ab5..219cf73a460 100644 --- a/test/images/.permitted-images +++ b/test/images/.permitted-images @@ -14,7 +14,6 @@ registry.k8s.io/e2e-test-images/apparmor-loader registry.k8s.io/e2e-test-images/busybox registry.k8s.io/e2e-test-images/httpd registry.k8s.io/e2e-test-images/ipc-utils -registry.k8s.io/e2e-test-images/jessie-dnsutils registry.k8s.io/e2e-test-images/kitten registry.k8s.io/e2e-test-images/nautilus registry.k8s.io/e2e-test-images/nginx diff --git a/test/images/image-util.sh b/test/images/image-util.sh index 12c2d3e5933..cc0065c6b14 100755 --- a/test/images/image-util.sh +++ b/test/images/image-util.sh @@ -283,7 +283,7 @@ if [[ "${WHAT}" == "all-conformance" ]]; then # Discussed during Conformance Office Hours Meeting (2019.12.17): # https://docs.google.com/document/d/1W31nXh9RYAb_VaYkwuPLd1hFxuRX3iU0DmaQ4lkCsX8/edit#heading=h.l87lu17xm9bh shift - conformance_images=("busybox" "agnhost" "jessie-dnsutils" "kitten" "nautilus" "nonewprivs" "resource-consumer" "sample-apiserver") + conformance_images=("busybox" "agnhost" "kitten" "nautilus" "nonewprivs" "resource-consumer" "sample-apiserver") for image in "${conformance_images[@]}"; do "${TASK}" "${image}" "$@" done diff --git a/test/images/jessie-dnsutils/BASEIMAGE b/test/images/jessie-dnsutils/BASEIMAGE deleted file mode 100644 index 76dd97afd76..00000000000 --- a/test/images/jessie-dnsutils/BASEIMAGE +++ /dev/null @@ -1,7 +0,0 @@ -linux/amd64=debian:jessie -linux/arm=arm32v7/debian:jessie -linux/arm64=arm64v8/debian:jessie -linux/ppc64le=ppc64le/debian:jessie -linux/s390x=s390x/debian:jessie -windows/amd64/1809=REGISTRY/busybox:1.29-2-windows-amd64-1809 -windows/amd64/ltsc2022=REGISTRY/busybox:1.29-2-windows-amd64-ltsc2022 diff --git a/test/images/jessie-dnsutils/Dockerfile b/test/images/jessie-dnsutils/Dockerfile deleted file mode 100644 index 9fd6a276a05..00000000000 --- a/test/images/jessie-dnsutils/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2016 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -ARG BASEIMAGE -FROM $BASEIMAGE - -CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/ - -# WARNING: Please note that the script below removes the security packages from arm64 and ppc64el images -# as they do not exist anymore in the debian repositories for jessie. So we do not recommend using this -# image for any production use and limit use of this image to just test scenarios. - -COPY fixup-apt-list.sh / -RUN ["/fixup-apt-list.sh"] - -RUN apt-get -q update && \ - apt-get install -y --force-yes dnsutils && \ - apt-get clean - -ADD https://github.com/coredns/coredns/releases/download/v1.5.0/coredns_1.5.0_linux_BASEARCH.tgz /coredns.tgz -RUN tar -xzvf /coredns.tgz && rm -f /coredns.tgz diff --git a/test/images/jessie-dnsutils/Dockerfile_windows b/test/images/jessie-dnsutils/Dockerfile_windows deleted file mode 100644 index 445852ad899..00000000000 --- a/test/images/jessie-dnsutils/Dockerfile_windows +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2020 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -ARG BASEIMAGE - -# We're using a Linux image to unpack the archive, then we're copying it over to Windows. -FROM --platform=linux/amd64 alpine:3.6 as prep - -ADD https://github.com/coredns/coredns/releases/download/v1.5.0/coredns_1.5.0_windows_amd64.tgz /coredns.tgz -RUN tar -xzvf /coredns.tgz - -FROM $BASEIMAGE - -COPY --from=prep /coredns.exe /coredns.exe - -# NOTE(claudiub): docker buildx sets the PATH env variable to a Linux-like PATH, which is not desirable. -ENV PATH="C:\dig\;C:\bin;C:\curl;C:\Windows\System32;C:\Windows;C:\Program Files\PowerShell;" diff --git a/test/images/jessie-dnsutils/OWNERS b/test/images/jessie-dnsutils/OWNERS deleted file mode 100644 index 11e4263977e..00000000000 --- a/test/images/jessie-dnsutils/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -approvers: - - dims - - mkumatag diff --git a/test/images/jessie-dnsutils/README.md b/test/images/jessie-dnsutils/README.md deleted file mode 100644 index b0c433127e9..00000000000 --- a/test/images/jessie-dnsutils/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# jessie-dnsutils - -DNS utils but implemented in a different OS to have some basic check across OSes. -See issue #10161 for original issue and discussion. \ No newline at end of file diff --git a/test/images/jessie-dnsutils/VERSION b/test/images/jessie-dnsutils/VERSION deleted file mode 100644 index d3bdbdf1fda..00000000000 --- a/test/images/jessie-dnsutils/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.7 diff --git a/test/images/jessie-dnsutils/fixup-apt-list.sh b/test/images/jessie-dnsutils/fixup-apt-list.sh deleted file mode 100755 index a9aa4f123dc..00000000000 --- a/test/images/jessie-dnsutils/fixup-apt-list.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2017 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -DEB_ARCH=$(dpkg --print-architecture) - -# http://security.debian.org/debian-security/dists/jessie/updates/InRelease is missing -# entries for some platforms, so we just remove the last line in sources.list in -# /etc/apt/sources.list which is "deb http://deb.debian.org/debian jessie-updates main" - -case ${DEB_ARCH} in - s390x|arm64|ppc64el) - # We have to use the archive mirrors. - # See: https://lists.debian.org/debian-devel-announce/2019/03/msg00006.html - echo "deb http://archive.debian.org/debian/ jessie main contrib non-free" | tee /etc/apt/sources.list - echo "deb-src http://archive.debian.org/debian/ jessie main contrib non-free" | tee -a /etc/apt/sources.list - ;; -esac - -exit 0 diff --git a/test/utils/image/manifest.go b/test/utils/image/manifest.go index d08a9538f82..a0504cfd7ee 100644 --- a/test/utils/image/manifest.go +++ b/test/utils/image/manifest.go @@ -175,8 +175,6 @@ const ( InvalidRegistryImage // IpcUtils image IpcUtils - // JessieDnsutils image - JessieDnsutils // Kitten image Kitten // Nautilus image @@ -229,7 +227,6 @@ func initImageConfigs(list RegistryList) (map[ImageID]Config, map[ImageID]Config configs[HttpdNew] = Config{list.PromoterE2eRegistry, "httpd", "2.4.39-4"} configs[InvalidRegistryImage] = Config{list.InvalidRegistry, "alpine", "3.1"} configs[IpcUtils] = Config{list.PromoterE2eRegistry, "ipc-utils", "1.3"} - configs[JessieDnsutils] = Config{list.PromoterE2eRegistry, "jessie-dnsutils", "1.7"} configs[Kitten] = Config{list.PromoterE2eRegistry, "kitten", "1.7"} configs[Nautilus] = Config{list.PromoterE2eRegistry, "nautilus", "1.7"} configs[NFSProvisioner] = Config{list.SigStorageRegistry, "nfs-provisioner", "v4.0.8"}