From 075abb07a9122d9a2f550b25a32199d971107d6e Mon Sep 17 00:00:00 2001 From: ylink-lfs Date: Wed, 2 Jul 2025 09:15:43 +0800 Subject: [PATCH] ci: redis removal for e2e test dependency simplicity --- build/dependencies.yaml | 2 - .../testdata/redis-master-controller.yaml | 2 +- .../legacy/redis-master-controller.yaml | 2 +- .../legacy/redis-slave-controller.yaml | 2 +- .../kubectl/testdata/set/redis-slave.yaml | 2 +- test/e2e/apps/statefulset.go | 40 --------- test/e2e/common/util.go | 2 - .../legacy/redis-master-controller.yaml | 2 +- .../legacy/redis-slave-controller.yaml | 2 +- .../statefulset/redis/service.yaml | 16 ---- .../statefulset/redis/statefulset.yaml | 81 ------------------- .../user-guide/replicaset/redis-slave.yaml | 2 +- test/images/.permitted-images | 1 - test/images/cloudbuild.yaml | 2 +- test/images/pets/redis-installer/BASEIMAGE | 4 - test/images/pets/redis-installer/Dockerfile | 41 ---------- test/images/pets/redis-installer/Makefile | 27 ------- test/images/pets/redis-installer/README.md | 10 --- test/images/pets/redis-installer/VERSION | 1 - test/images/pets/redis-installer/install.sh | 51 ------------ test/images/pets/redis-installer/on-start.sh | 49 ----------- test/images/redis/BASEIMAGE | 7 -- test/images/redis/Dockerfile | 27 ------- test/images/redis/Dockerfile_windows | 33 -------- test/images/redis/OWNERS | 4 - test/images/redis/README.md | 3 - test/images/redis/VERSION | 1 - test/images/redis/redis.conf | 3 - test/utils/image/manifest.go | 3 - 29 files changed, 8 insertions(+), 414 deletions(-) delete mode 100644 test/e2e/testing-manifests/statefulset/redis/service.yaml delete mode 100644 test/e2e/testing-manifests/statefulset/redis/statefulset.yaml delete mode 100644 test/images/pets/redis-installer/BASEIMAGE delete mode 100644 test/images/pets/redis-installer/Dockerfile delete mode 100644 test/images/pets/redis-installer/Makefile delete mode 100644 test/images/pets/redis-installer/README.md delete mode 100644 test/images/pets/redis-installer/VERSION delete mode 100755 test/images/pets/redis-installer/install.sh delete mode 100755 test/images/pets/redis-installer/on-start.sh delete mode 100644 test/images/redis/BASEIMAGE delete mode 100644 test/images/redis/Dockerfile delete mode 100644 test/images/redis/Dockerfile_windows delete mode 100644 test/images/redis/OWNERS delete mode 100644 test/images/redis/README.md delete mode 100644 test/images/redis/VERSION delete mode 100644 test/images/redis/redis.conf diff --git a/build/dependencies.yaml b/build/dependencies.yaml index 0368c9e4ca3..972ec14fbaf 100644 --- a/build/dependencies.yaml +++ b/build/dependencies.yaml @@ -168,8 +168,6 @@ dependencies: match: registry\.k8s\.io\/build-image\/debian-base-amd64:[a-zA-Z]+\-v((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?) - path: test/images/regression-issue-74839/BASEIMAGE match: registry\.k8s\.io\/build-image\/debian-base-amd64:[a-zA-Z]+\-v((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?) - - path: test/images/pets/redis-installer/BASEIMAGE - match: registry\.k8s\.io\/build-image\/debian-base-amd64:[a-zA-Z]+\-v((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?) - path: cluster/gce/gci/configure-helper.sh match: registry\.k8s\.io\/build-image\/debian-base:[a-zA-Z]+\-v((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?) - path: pkg/volume/plugins.go diff --git a/staging/src/k8s.io/kubectl/testdata/redis-master-controller.yaml b/staging/src/k8s.io/kubectl/testdata/redis-master-controller.yaml index 60a1a6fabaa..11fe740b9cb 100644 --- a/staging/src/k8s.io/kubectl/testdata/redis-master-controller.yaml +++ b/staging/src/k8s.io/kubectl/testdata/redis-master-controller.yaml @@ -17,7 +17,7 @@ spec: spec: containers: - name: master - image: docker.io/library/redis:5.0.5-alpine + image: registry.k8s.io/e2e-test-images/redis:5.0.5-alpine resources: requests: cpu: 100m diff --git a/staging/src/k8s.io/kubectl/testdata/replace/legacy/redis-master-controller.yaml b/staging/src/k8s.io/kubectl/testdata/replace/legacy/redis-master-controller.yaml index 60a1a6fabaa..11fe740b9cb 100644 --- a/staging/src/k8s.io/kubectl/testdata/replace/legacy/redis-master-controller.yaml +++ b/staging/src/k8s.io/kubectl/testdata/replace/legacy/redis-master-controller.yaml @@ -17,7 +17,7 @@ spec: spec: containers: - name: master - image: docker.io/library/redis:5.0.5-alpine + image: registry.k8s.io/e2e-test-images/redis:5.0.5-alpine resources: requests: cpu: 100m diff --git a/staging/src/k8s.io/kubectl/testdata/replace/legacy/redis-slave-controller.yaml b/staging/src/k8s.io/kubectl/testdata/replace/legacy/redis-slave-controller.yaml index 3376794b345..7f46fcbdd9d 100644 --- a/staging/src/k8s.io/kubectl/testdata/replace/legacy/redis-slave-controller.yaml +++ b/staging/src/k8s.io/kubectl/testdata/replace/legacy/redis-slave-controller.yaml @@ -17,7 +17,7 @@ spec: spec: containers: - name: slave - image: docker.io/library/redis:5.0.5-alpine + image: registry.k8s.io/e2e-test-images/redis:5.0.5-alpine # We are only implementing the dns option of: # https://github.com/kubernetes/examples/blob/97c7ed0eb6555a4b667d2877f965d392e00abc45/guestbook/redis-slave/run.sh command: [ "redis-server", "--slaveof", "redis-master", "6379" ] diff --git a/staging/src/k8s.io/kubectl/testdata/set/redis-slave.yaml b/staging/src/k8s.io/kubectl/testdata/set/redis-slave.yaml index d237c4d4290..b344408e913 100644 --- a/staging/src/k8s.io/kubectl/testdata/set/redis-slave.yaml +++ b/staging/src/k8s.io/kubectl/testdata/set/redis-slave.yaml @@ -24,7 +24,7 @@ spec: spec: containers: - name: slave - image: docker.io/library/redis:5.0.5-alpine + image: registry.k8s.io/e2e-test-images/redis:5.0.5-alpine # We are only implementing the dns option of: # https://github.com/kubernetes/examples/blob/97c7ed0eb6555a4b667d2877f965d392e00abc45/guestbook/redis-slave/run.sh command: [ "redis-server", "--slaveof", "redis-master", "6379" ] diff --git a/test/e2e/apps/statefulset.go b/test/e2e/apps/statefulset.go index d024688c558..f04dda3aeb1 100644 --- a/test/e2e/apps/statefulset.go +++ b/test/e2e/apps/statefulset.go @@ -67,7 +67,6 @@ import ( const ( zookeeperManifestPath = "test/e2e/testing-manifests/statefulset/zookeeper" mysqlGaleraManifestPath = "test/e2e/testing-manifests/statefulset/mysql-galera" - redisManifestPath = "test/e2e/testing-manifests/statefulset/redis" cockroachDBManifestPath = "test/e2e/testing-manifests/statefulset/cockroachdb" // We don't restart MySQL cluster regardless of restartCluster, since MySQL doesn't handle restart well restartCluster = true @@ -1196,14 +1195,6 @@ var _ = SIGDescribe("StatefulSet", func() { appTester.run(ctx) }) - // Do not mark this as Conformance. - // StatefulSet Conformance should not be dependent on specific applications. - ginkgo.It("should creating a working redis cluster", func(ctx context.Context) { - e2epv.SkipIfNoDefaultStorageClass(ctx, c) - appTester.statefulPod = &redisTester{client: c} - appTester.run(ctx) - }) - // Do not mark this as Conformance. // StatefulSet Conformance should not be dependent on specific applications. ginkgo.It("should creating a working mysql cluster", func(ctx context.Context) { @@ -2088,37 +2079,6 @@ func (m *mysqlGaleraTester) read(statefulPodIndex int, key string) string { return lastLine(m.mysqlExec(fmt.Sprintf("use statefulset; select v from foo where k=\"%v\";", key), m.ss.Namespace, name)) } -type redisTester struct { - ss *appsv1.StatefulSet - client clientset.Interface -} - -func (m *redisTester) name() string { - return "redis: master/slave" -} - -func (m *redisTester) redisExec(cmd, ns, podName string) string { - cmd = fmt.Sprintf("/opt/redis/redis-cli -h %v %v", podName, cmd) - return e2ekubectl.RunKubectlOrDie(ns, "exec", podName, "--", "/bin/sh", "-c", cmd) -} - -func (m *redisTester) deploy(ctx context.Context, ns string) *appsv1.StatefulSet { - m.ss = e2estatefulset.CreateStatefulSet(ctx, m.client, redisManifestPath, ns) - return m.ss -} - -func (m *redisTester) write(statefulPodIndex int, kv map[string]string) { - name := fmt.Sprintf("%v-%d", m.ss.Name, statefulPodIndex) - for k, v := range kv { - framework.Logf("%s", m.redisExec(fmt.Sprintf("SET %v %v", k, v), m.ss.Namespace, name)) - } -} - -func (m *redisTester) read(statefulPodIndex int, key string) string { - name := fmt.Sprintf("%v-%d", m.ss.Name, statefulPodIndex) - return lastLine(m.redisExec(fmt.Sprintf("GET %v", key), m.ss.Namespace, name)) -} - type cockroachDBTester struct { ss *appsv1.StatefulSet client clientset.Interface diff --git a/test/e2e/common/util.go b/test/e2e/common/util.go index 17ff3237458..07946bc1659 100644 --- a/test/e2e/common/util.go +++ b/test/e2e/common/util.go @@ -86,7 +86,6 @@ type testImagesStruct struct { HttpdImage string HttpdNewImage string PauseImage string - RedisImage string } var testImages testImagesStruct @@ -102,7 +101,6 @@ func init() { imageutils.GetE2EImage(imageutils.Httpd), imageutils.GetE2EImage(imageutils.HttpdNew), imageutils.GetE2EImage(imageutils.Pause), - imageutils.GetE2EImage(imageutils.Redis), } } diff --git a/test/e2e/testing-manifests/guestbook/legacy/redis-master-controller.yaml b/test/e2e/testing-manifests/guestbook/legacy/redis-master-controller.yaml index 60a1a6fabaa..11fe740b9cb 100644 --- a/test/e2e/testing-manifests/guestbook/legacy/redis-master-controller.yaml +++ b/test/e2e/testing-manifests/guestbook/legacy/redis-master-controller.yaml @@ -17,7 +17,7 @@ spec: spec: containers: - name: master - image: docker.io/library/redis:5.0.5-alpine + image: registry.k8s.io/e2e-test-images/redis:5.0.5-alpine resources: requests: cpu: 100m diff --git a/test/e2e/testing-manifests/guestbook/legacy/redis-slave-controller.yaml b/test/e2e/testing-manifests/guestbook/legacy/redis-slave-controller.yaml index 3376794b345..7f46fcbdd9d 100644 --- a/test/e2e/testing-manifests/guestbook/legacy/redis-slave-controller.yaml +++ b/test/e2e/testing-manifests/guestbook/legacy/redis-slave-controller.yaml @@ -17,7 +17,7 @@ spec: spec: containers: - name: slave - image: docker.io/library/redis:5.0.5-alpine + image: registry.k8s.io/e2e-test-images/redis:5.0.5-alpine # We are only implementing the dns option of: # https://github.com/kubernetes/examples/blob/97c7ed0eb6555a4b667d2877f965d392e00abc45/guestbook/redis-slave/run.sh command: [ "redis-server", "--slaveof", "redis-master", "6379" ] diff --git a/test/e2e/testing-manifests/statefulset/redis/service.yaml b/test/e2e/testing-manifests/statefulset/redis/service.yaml deleted file mode 100644 index 528ef6dad57..00000000000 --- a/test/e2e/testing-manifests/statefulset/redis/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# A headless service to create DNS records -apiVersion: v1 -kind: Service -metadata: - name: redis - labels: - app: redis -spec: - ports: - - port: 6379 - name: peer - # *.redis.default.svc.cluster.local - clusterIP: None - selector: - app: redis - publishNotReadyAddresses: true diff --git a/test/e2e/testing-manifests/statefulset/redis/statefulset.yaml b/test/e2e/testing-manifests/statefulset/redis/statefulset.yaml deleted file mode 100644 index 84e0a82bc40..00000000000 --- a/test/e2e/testing-manifests/statefulset/redis/statefulset.yaml +++ /dev/null @@ -1,81 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: rd -spec: - serviceName: "redis" - replicas: 3 - selector: - matchLabels: - app: redis - template: - metadata: - labels: - app: redis - spec: - initContainers: - - name: install - image: registry.k8s.io/e2e-test-images/pets/redis-installer:1.5 - imagePullPolicy: Always - args: - - "--install-into=/opt" - - "--work-dir=/work-dir" - volumeMounts: - - name: opt - mountPath: "/opt" - - name: workdir - mountPath: "/work-dir" - - name: bootstrap - image: debian:jessie - command: - - "/work-dir/peer-finder" - args: - - -on-start="/work-dir/on-start.sh" - - "-service=redis" - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - volumeMounts: - - name: opt - mountPath: "/opt" - - name: workdir - mountPath: "/work-dir" - containers: - - name: redis - image: debian:jessie - ports: - - containerPort: 6379 - name: peer - command: - - /opt/redis/redis-server - args: - - /opt/redis/redis.conf - readinessProbe: - exec: - command: - - sh - - -c - - "/opt/redis/redis-cli -h $(hostname) ping" - initialDelaySeconds: 15 - timeoutSeconds: 5 - volumeMounts: - - name: datadir - mountPath: /data - - name: opt - mountPath: /opt - volumes: - - name: opt - emptyDir: {} - - name: workdir - emptyDir: {} - volumeClaimTemplates: - - metadata: - name: datadir - spec: - accessModes: [ "ReadWriteOnce" ] - resources: - requests: - storage: 1Gi diff --git a/test/fixtures/doc-yaml/user-guide/replicaset/redis-slave.yaml b/test/fixtures/doc-yaml/user-guide/replicaset/redis-slave.yaml index d237c4d4290..b344408e913 100644 --- a/test/fixtures/doc-yaml/user-guide/replicaset/redis-slave.yaml +++ b/test/fixtures/doc-yaml/user-guide/replicaset/redis-slave.yaml @@ -24,7 +24,7 @@ spec: spec: containers: - name: slave - image: docker.io/library/redis:5.0.5-alpine + image: registry.k8s.io/e2e-test-images/redis:5.0.5-alpine # We are only implementing the dns option of: # https://github.com/kubernetes/examples/blob/97c7ed0eb6555a4b667d2877f965d392e00abc45/guestbook/redis-slave/run.sh command: [ "redis-server", "--slaveof", "redis-master", "6379" ] diff --git a/test/images/.permitted-images b/test/images/.permitted-images index ec7dac61ab5..7dafd331b21 100644 --- a/test/images/.permitted-images +++ b/test/images/.permitted-images @@ -24,7 +24,6 @@ registry.k8s.io/e2e-test-images/node-perf/tf-wide-deep registry.k8s.io/e2e-test-images/nonewprivs registry.k8s.io/e2e-test-images/nonroot registry.k8s.io/e2e-test-images/perl -registry.k8s.io/e2e-test-images/redis registry.k8s.io/e2e-test-images/regression-issue-74839 registry.k8s.io/e2e-test-images/resource-consumer registry.k8s.io/e2e-test-images/sample-apiserver diff --git a/test/images/cloudbuild.yaml b/test/images/cloudbuild.yaml index 4a513851305..97622812425 100644 --- a/test/images/cloudbuild.yaml +++ b/test/images/cloudbuild.yaml @@ -1,7 +1,7 @@ # See https://cloud.google.com/cloud-build/docs/build-config # this must be specified in seconds. If omitted, defaults to 600s (10 mins) -# the timeout was increased because some images might take longer to build (e.g.: sample-apiserver, pets/redis-installer) +# the timeout was increased because some images might take longer to build (e.g.: sample-apiserver) timeout: 5400s # this prevents errors if you don't use both _GIT_TAG and _PULL_BASE_REF, # or any new substitutions added in the future. diff --git a/test/images/pets/redis-installer/BASEIMAGE b/test/images/pets/redis-installer/BASEIMAGE deleted file mode 100644 index 1e453bde46e..00000000000 --- a/test/images/pets/redis-installer/BASEIMAGE +++ /dev/null @@ -1,4 +0,0 @@ -linux/amd64=registry.k8s.io/build-image/debian-base-amd64:bookworm-v1.0.4 -linux/arm=registry.k8s.io/build-image/debian-base-arm:bookworm-v1.0.4 -linux/arm64=registry.k8s.io/build-image/debian-base-arm64:bookworm-v1.0.4 -linux/ppc64le=registry.k8s.io/build-image/debian-base-ppc64le:bookworm-v1.0.4 diff --git a/test/images/pets/redis-installer/Dockerfile b/test/images/pets/redis-installer/Dockerfile deleted file mode 100644 index 9b8c1483986..00000000000 --- a/test/images/pets/redis-installer/Dockerfile +++ /dev/null @@ -1,41 +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. - -# TODO: get rid of bash dependency and switch to plain busybox. -# The tar in busybox also doesn't seem to understand compression. -ARG BASEIMAGE -FROM $BASEIMAGE - -CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/ - -# TODO: just use standard redis when there is one for 3.2.0. -RUN clean-install wget make gcc libc-dev bash - -# See README.md -RUN wget -qO /redis-3.2.0.tar.gz http://download.redis.io/releases/redis-3.2.0.tar.gz && \ - tar -xzf /redis-3.2.0.tar.gz -C /tmp/ && rm /redis-3.2.0.tar.gz - -# Clean out existing deps before installation -# see https://github.com/antirez/redis/issues/722 -RUN cd /tmp/redis-3.2.0 && make distclean && mkdir -p /redis && \ - make install INSTALL_BIN=/redis && \ - mv /tmp/redis-3.2.0/redis.conf /redis/redis.conf && \ - rm -rf /tmp/redis-3.2.0 - -ADD on-start.sh / - -COPY peer-finder / -ADD install.sh / -RUN chmod -c 755 /install.sh /on-start.sh /peer-finder -ENTRYPOINT ["/install.sh"] diff --git a/test/images/pets/redis-installer/Makefile b/test/images/pets/redis-installer/Makefile deleted file mode 100644 index bf97d373654..00000000000 --- a/test/images/pets/redis-installer/Makefile +++ /dev/null @@ -1,27 +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. - -SRCS = peer-finder -OS ?= linux -ARCH ?= amd64 -TARGET ?= $(CURDIR) -GOARM ?= 7 -GOLANG_VERSION ?= latest -SRC_DIR = pets/peer-finder -export - -bin: - ../../image-util.sh bin $(SRCS) - -.PHONY: bin diff --git a/test/images/pets/redis-installer/README.md b/test/images/pets/redis-installer/README.md deleted file mode 100644 index bb00e826046..00000000000 --- a/test/images/pets/redis-installer/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Redis statefulset e2e tester - -The image in this directory is the init container for contrib/pets/redis but for one difference, it bakes a specific version of redis into the base image so we get deterministic test results without having to depend on a redis download server. Discussing the tradeoffs to either approach (download the version at runtime, or maintain an image per version) are outside the scope of this document. - -You can execute the image locally via: -``` -docker run -it registry.k8s.io/redis-install-3.2.0:e2e --cmd --install-into=/opt --work-dir=/work-dir -``` -To share the installation with other containers mount the appropriate volumes as `--install-into` and `--work-dir`, where `install-into` is the directory to install redis into, and `work-dir` is the directory to install the user/admin supplied on-{start,change} hook scripts. - diff --git a/test/images/pets/redis-installer/VERSION b/test/images/pets/redis-installer/VERSION deleted file mode 100644 index 810ee4e91e2..00000000000 --- a/test/images/pets/redis-installer/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.6 diff --git a/test/images/pets/redis-installer/install.sh b/test/images/pets/redis-installer/install.sh deleted file mode 100755 index e283cc77690..00000000000 --- a/test/images/pets/redis-installer/install.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -# 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. - -# This volume is assumed to exist and is shared with parent of the init -# container. It contains the redis installation. -INSTALL_VOLUME="/opt" - -# This volume is assumed to exist and is shared with the peer-finder -# init container. It contains on-start/change configuration scripts. -WORK_DIR="/work-dir" - -VERSION="3.2.0" - -for i in "$@" -do -case $i in - -i=*|--install-into=*) - INSTALL_VOLUME="${i#*=}" - shift - ;; - -w=*|--work-dir=*) - WORK_DIR="${i#*=}" - shift - ;; - *) - # unknown option - ;; -esac -done - -echo installing config scripts into "${WORK_DIR}" -mkdir -p "${WORK_DIR}" -cp /on-start.sh "${WORK_DIR}"/ -cp /peer-finder "${WORK_DIR}"/ - -echo installing redis-"${VERSION}" into "${INSTALL_VOLUME}" -mkdir -p "${INSTALL_VOLUME}" -mv /redis "${INSTALL_VOLUME}"/redis diff --git a/test/images/pets/redis-installer/on-start.sh b/test/images/pets/redis-installer/on-start.sh deleted file mode 100755 index 77a50625eb0..00000000000 --- a/test/images/pets/redis-installer/on-start.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash - -# 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. - -set -e - -CFG=/opt/redis/redis.conf -HOSTNAME=$(hostname) -DATADIR="/data" -# Port on which redis listens for connections. -PORT=6379 - -# Ping everyone but ourself to see if there's a master. Only one pet starts at -# a time, so if we don't see a master we can assume the position is ours. -while read -ra LINE; do - if [[ "${LINE[0]}" == *"${HOSTNAME}"* ]]; then - sed -i -e "s|^bind.*$|bind ${LINE[0]}|" ${CFG} - elif [ "$(/opt/redis/redis-cli -h "${LINE[0]}" info | grep role | sed 's,\r$,,')" = "role:master" ]; then - # TODO: More restrictive regex? - sed -i -e "s|^# slaveof.*$|slaveof ${LINE[0]} ${PORT}|" ${CFG} - fi -done - -# Set the data directory for append only log and snapshot files. This should -# be a persistent volume for consistency. -sed -i -e "s|^.*dir .*$|dir ${DATADIR}|" ${CFG} - -# The append only log is written for every SET operation. Without this setting, -# redis just snapshots periodically which is only safe for a cache. This will -# produce an appendonly.aof file in the configured data dir. -sed -i -e "s|^appendonly .*$|appendonly yes|" ${CFG} - -# Every write triggers an fsync. Recommended default is "everysec", which -# is only safe for AP applications. -sed -i -e "s|^appendfsync .*$|appendfsync always|" ${CFG} - - diff --git a/test/images/redis/BASEIMAGE b/test/images/redis/BASEIMAGE deleted file mode 100644 index d8390c27ce9..00000000000 --- a/test/images/redis/BASEIMAGE +++ /dev/null @@ -1,7 +0,0 @@ -linux/amd64=alpine:3.6 -linux/arm=arm32v6/alpine:3.6 -linux/arm64=arm64v8/alpine:3.6 -linux/ppc64le=ppc64le/alpine:3.6 -linux/s390x=s390x/alpine:3.6 -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/redis/Dockerfile b/test/images/redis/Dockerfile deleted file mode 100644 index 1c37c14c444..00000000000 --- a/test/images/redis/Dockerfile +++ /dev/null @@ -1,27 +0,0 @@ -# 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. - -ARG BASEIMAGE -FROM $BASEIMAGE - -CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/ - -RUN apk add --no-cache redis - -COPY redis.conf /etc/redis.conf - -EXPOSE 6379 -VOLUME /data - -CMD ["redis-server", "/etc/redis.conf"] diff --git a/test/images/redis/Dockerfile_windows b/test/images/redis/Dockerfile_windows deleted file mode 100644 index 219bdcfcafc..00000000000 --- a/test/images/redis/Dockerfile_windows +++ /dev/null @@ -1,33 +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/MSOpenTech/redis/releases/download/win-3.2.100/Redis-x64-3.2.100.zip /redis.zip -RUN mkdir /redis &&\ - unzip /redis.zip -d /redis - -FROM $BASEIMAGE - -COPY --from=prep /redis /redis - -COPY redis.conf /redis/redis.windows.conf - -EXPOSE 6379 -VOLUME C:/data - -CMD ["/redis/redis-server.exe", "/redis/redis.windows.conf"] diff --git a/test/images/redis/OWNERS b/test/images/redis/OWNERS deleted file mode 100644 index ebb2cb861ec..00000000000 --- a/test/images/redis/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -approvers: - - mkumatag -emeritus_approvers: - - rmmh diff --git a/test/images/redis/README.md b/test/images/redis/README.md deleted file mode 100644 index d45185ad0c0..00000000000 --- a/test/images/redis/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# redis - -Image used to run Redis for our guestbook application. diff --git a/test/images/redis/VERSION b/test/images/redis/VERSION deleted file mode 100644 index 3af89d37bda..00000000000 --- a/test/images/redis/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.5-3 diff --git a/test/images/redis/redis.conf b/test/images/redis/redis.conf deleted file mode 100644 index afbc658ee17..00000000000 --- a/test/images/redis/redis.conf +++ /dev/null @@ -1,3 +0,0 @@ -bind 0.0.0.0 -dir /data -protected-mode no diff --git a/test/utils/image/manifest.go b/test/utils/image/manifest.go index d98eac94277..a5105b642e3 100644 --- a/test/utils/image/manifest.go +++ b/test/utils/image/manifest.go @@ -202,8 +202,6 @@ const ( Pause // Perl image Perl - // Redis image - Redis // RegressionIssue74839 image RegressionIssue74839 // ResourceConsumer image @@ -243,7 +241,6 @@ func initImageConfigs(list RegistryList) (map[ImageID]Config, map[ImageID]Config // Pause - when these values are updated, also update cmd/kubelet/app/options/container_runtime.go configs[Pause] = Config{list.GcRegistry, "pause", "3.10"} configs[Perl] = Config{list.PromoterE2eRegistry, "perl", "5.26"} - configs[Redis] = Config{list.PromoterE2eRegistry, "redis", "5.0.5-3"} configs[RegressionIssue74839] = Config{list.PromoterE2eRegistry, "regression-issue-74839", "1.2"} configs[ResourceConsumer] = Config{list.PromoterE2eRegistry, "resource-consumer", "1.13"} configs[VolumeNFSServer] = Config{list.PromoterE2eRegistry, "volume/nfs", "1.4"}