Skip to content

Commit 4c51eb9

Browse files
committed
test images: Image Promoter fixes
Prior to the Image Centralization part 4 (kubernetes#81170), a PR merged that enables the Image Promoter to run on the k/k test images. The Image Promoter currently only builds the Conformance-related images, but the Image Centralization part 4 centralized some of those images into agnhost, so they need to be removed from the conformance_images list. Additionally, kubernetes#81226 proposes mounttest-user image to be removed, and RunAsUser to be used in tests instead. The image used by the Image Promoter (gcr.io/k8s-testimages/gcb-docker-gcloud:v20190906-745fed4) is based on busybox, and thus, the sed binary is actually busybox. image-util.sh calls kube::util::ensure-gnu-sed several times, which ensures that a GNU sed binary exists (it checks by greping GNU in its --help output). Obviously, it won't match the busybox sed binary. But the sed usage in image-util.sh is fairly simple, and the busybox sed is sufficient. Bumps image versions for: jessie-dnsutils, nonewprivs, resource-consumer, sample-apiserver. These images are included in the conformance_images that are being built by the Image Promoter, so we're bumping them just to make sure we're not breaking anything and cause all the CIs to fall. We're going to bump the image versions used in tests in a subsequent PR. The image version was not bumped for: agnhost, kitten, nautilus, as they were already bumped by the Image Centralization part 4 PR.
1 parent 9bf218b commit 4c51eb9

File tree

9 files changed

+10
-29
lines changed

9 files changed

+10
-29
lines changed

hack/lib/util.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,10 @@ function kube::util::ensure_dockerized {
698698
# SED: The name of the gnu-sed binary
699699
#
700700
function kube::util::ensure-gnu-sed {
701-
if LANG=C sed --help 2>&1 | grep -q GNU; then
701+
# NOTE: the echo below is a workaround to ensure sed is executed before the grep.
702+
# see: https://github.com/kubernetes/kubernetes/issues/87251
703+
sed_help="$(LANG=C sed --help 2>&1)"
704+
if echo "${sed_help}" | grep -q "GNU\|BusyBox"; then
702705
SED="sed"
703706
elif command -v gsed &>/dev/null; then
704707
SED="gsed"

test/images/image-util.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ TASK=$1
2222
WHAT=$2
2323

2424
KUBE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd -P)"
25+
source "${KUBE_ROOT}/hack/lib/logging.sh"
2526
source "${KUBE_ROOT}/hack/lib/util.sh"
2627

2728
# Mapping of go ARCH to actual architectures shipped part of multiarch/qemu-user-static project
@@ -166,8 +167,7 @@ if [[ "${WHAT}" == "all-conformance" ]]; then
166167
# Discussed during Conformance Office Hours Meeting (2019.12.17):
167168
# https://docs.google.com/document/d/1W31nXh9RYAb_VaYkwuPLd1hFxuRX3iU0DmaQ4lkCsX8/edit#heading=h.l87lu17xm9bh
168169
# echoserver image not included: https://github.com/kubernetes/kubernetes/issues/84158
169-
conformance_images=("agnhost" "dnsutils" "jessie-dnsutils" "kitten" "mounttest" "mounttest-user"\
170-
"nautilus" "nonewprivs" "resource-consumer" "resource-consumer-controller" "sample-apiserver" "test-webserver")
170+
conformance_images=("agnhost" "jessie-dnsutils" "kitten" "nautilus" "nonewprivs" "resource-consumer" "sample-apiserver")
171171
for image in "${conformance_images[@]}"; do
172172
eval "${TASK}" "${image}"
173173
done
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1
1+
1.2

test/images/mounttest-user/BASEIMAGE

Lines changed: 0 additions & 5 deletions
This file was deleted.

test/images/mounttest-user/Dockerfile

Lines changed: 0 additions & 16 deletions
This file was deleted.

test/images/mounttest-user/VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/images/nonewprivs/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0
1+
1.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5
1+
1.6
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.17
1+
1.17.2

0 commit comments

Comments
 (0)