Skip to content

Commit 094a11b

Browse files
committed
Revert "Clean up DNS e2e wrt Jessie/Wheezy"
This reverts commit eeb36da.
1 parent b228aeb commit 094a11b

File tree

13 files changed

+203
-58
lines changed

13 files changed

+203
-58
lines changed

test/e2e/network/dns.go

Lines changed: 78 additions & 52 deletions
Large diffs are not rendered by default.

test/e2e/network/dns_common.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import (
3535
clientset "k8s.io/client-go/kubernetes"
3636
"k8s.io/kubernetes/test/e2e/framework"
3737
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
38+
imageutils "k8s.io/kubernetes/test/utils/image"
3839
dnsclient "k8s.io/kubernetes/third_party/forked/golang/net"
3940
admissionapi "k8s.io/pod-security-admission/api"
4041

@@ -351,7 +352,7 @@ func (t *dnsTestCommon) deleteDNSServerPod(ctx context.Context) {
351352
}
352353
}
353354

354-
func createDNSPod(namespace, probeCmd, podHostName, serviceName string) *v1.Pod {
355+
func createDNSPod(namespace, wheezyProbeCmd, jessieProbeCmd, podHostName, serviceName string) *v1.Pod {
355356
podName := "dns-test-" + string(uuid.NewUUID())
356357
volumes := []v1.Volume{
357358
{
@@ -372,10 +373,17 @@ func createDNSPod(namespace, probeCmd, podHostName, serviceName string) *v1.Pod
372373
dnsPod := e2epod.NewAgnhostPod(namespace, podName, volumes, mounts, nil, "test-webserver")
373374
dnsPod.Spec.Containers[0].Name = "webserver"
374375

375-
querier := e2epod.NewAgnhostContainer("querier", mounts, nil, probeCmd)
376+
querier := e2epod.NewAgnhostContainer("querier", mounts, nil, wheezyProbeCmd)
376377
querier.Command = []string{"sh", "-c"}
377378

378-
dnsPod.Spec.Containers = append(dnsPod.Spec.Containers, querier)
379+
jessieQuerier := v1.Container{
380+
Name: "jessie-querier",
381+
Image: imageutils.GetE2EImage(imageutils.JessieDnsutils),
382+
Command: []string{"sh", "-c", jessieProbeCmd},
383+
VolumeMounts: mounts,
384+
}
385+
386+
dnsPod.Spec.Containers = append(dnsPod.Spec.Containers, querier, jessieQuerier)
379387
dnsPod.Spec.Hostname = podHostName
380388
dnsPod.Spec.Subdomain = serviceName
381389

test/e2e/storage/testsuites/multivolume.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ func TestConcurrentAccessToSingleVolume(ctx context.Context, f *framework.Framew
565565
SeLinuxLabel: e2epod.GetLinuxLabel(),
566566
NodeSelection: node,
567567
PVCsReadOnly: readOnly,
568-
ImageID: e2epod.GetTestImageID(imageutils.Agnhost),
568+
ImageID: e2epod.GetTestImageID(imageutils.JessieDnsutils),
569569
}
570570
pod, err := e2epod.CreateSecPodWithNodeSelection(ctx, cs, &podConfig, f.Timeouts.PodStart)
571571
framework.ExpectNoError(err)
@@ -687,7 +687,7 @@ func TestConcurrentAccessToRelatedVolumes(ctx context.Context, f *framework.Fram
687687
SeLinuxLabel: e2epod.GetLinuxLabel(),
688688
NodeSelection: node,
689689
PVCsReadOnly: false,
690-
ImageID: e2epod.GetTestImageID(imageutils.Agnhost),
690+
ImageID: e2epod.GetTestImageID(imageutils.JessieDnsutils),
691691
}
692692
pod, err := e2epod.CreateSecPodWithNodeSelection(ctx, cs, &podConfig, f.Timeouts.PodStart)
693693
defer func() {

test/images/.permitted-images

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ registry.k8s.io/e2e-test-images/apparmor-loader
1414
registry.k8s.io/e2e-test-images/busybox
1515
registry.k8s.io/e2e-test-images/httpd
1616
registry.k8s.io/e2e-test-images/ipc-utils
17+
registry.k8s.io/e2e-test-images/jessie-dnsutils
1718
registry.k8s.io/e2e-test-images/kitten
1819
registry.k8s.io/e2e-test-images/nautilus
1920
registry.k8s.io/e2e-test-images/nginx

test/images/image-util.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ if [[ "${WHAT}" == "all-conformance" ]]; then
283283
# Discussed during Conformance Office Hours Meeting (2019.12.17):
284284
# https://docs.google.com/document/d/1W31nXh9RYAb_VaYkwuPLd1hFxuRX3iU0DmaQ4lkCsX8/edit#heading=h.l87lu17xm9bh
285285
shift
286-
conformance_images=("busybox" "agnhost" "kitten" "nautilus" "nonewprivs" "resource-consumer" "sample-apiserver")
286+
conformance_images=("busybox" "agnhost" "jessie-dnsutils" "kitten" "nautilus" "nonewprivs" "resource-consumer" "sample-apiserver")
287287
for image in "${conformance_images[@]}"; do
288288
"${TASK}" "${image}" "$@"
289289
done
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
linux/amd64=debian:jessie
2+
linux/arm=arm32v7/debian:jessie
3+
linux/arm64=arm64v8/debian:jessie
4+
linux/ppc64le=ppc64le/debian:jessie
5+
linux/s390x=s390x/debian:jessie
6+
windows/amd64/1809=REGISTRY/busybox:1.29-2-windows-amd64-1809
7+
windows/amd64/ltsc2022=REGISTRY/busybox:1.29-2-windows-amd64-ltsc2022
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright 2016 The Kubernetes Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
ARG BASEIMAGE
16+
FROM $BASEIMAGE
17+
18+
CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
19+
20+
# WARNING: Please note that the script below removes the security packages from arm64 and ppc64el images
21+
# as they do not exist anymore in the debian repositories for jessie. So we do not recommend using this
22+
# image for any production use and limit use of this image to just test scenarios.
23+
24+
COPY fixup-apt-list.sh /
25+
RUN ["/fixup-apt-list.sh"]
26+
27+
RUN apt-get -q update && \
28+
apt-get install -y --force-yes dnsutils && \
29+
apt-get clean
30+
31+
ADD https://github.com/coredns/coredns/releases/download/v1.5.0/coredns_1.5.0_linux_BASEARCH.tgz /coredns.tgz
32+
RUN tar -xzvf /coredns.tgz && rm -f /coredns.tgz
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright 2020 The Kubernetes Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
ARG BASEIMAGE
16+
17+
# We're using a Linux image to unpack the archive, then we're copying it over to Windows.
18+
FROM --platform=linux/amd64 alpine:3.6 as prep
19+
20+
ADD https://github.com/coredns/coredns/releases/download/v1.5.0/coredns_1.5.0_windows_amd64.tgz /coredns.tgz
21+
RUN tar -xzvf /coredns.tgz
22+
23+
FROM $BASEIMAGE
24+
25+
COPY --from=prep /coredns.exe /coredns.exe
26+
27+
# NOTE(claudiub): docker buildx sets the PATH env variable to a Linux-like PATH, which is not desirable.
28+
ENV PATH="C:\dig\;C:\bin;C:\curl;C:\Windows\System32;C:\Windows;C:\Program Files\PowerShell;"

test/images/jessie-dnsutils/OWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
approvers:
2+
- dims
3+
- mkumatag
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# jessie-dnsutils
2+
3+
DNS utils but implemented in a different OS to have some basic check across OSes.
4+
See issue #10161 for original issue and discussion.

0 commit comments

Comments
 (0)