diff --git a/clusterloader2/testing/batch/job.yaml b/clusterloader2/testing/batch/job.yaml index aa77426df9..279e83d6c9 100644 --- a/clusterloader2/testing/batch/job.yaml +++ b/clusterloader2/testing/batch/job.yaml @@ -15,7 +15,8 @@ spec: spec: containers: - name: {{.Name}} - image: gcr.io/k8s-staging-perf-tests/sleep:v0.0.3 - args: + image: registry.k8s.io/e2e-test-images/agnhost:2.56 + command: + - sleep - {{.Sleep}} restartPolicy: Never diff --git a/clusterloader2/testing/dra/job.yaml b/clusterloader2/testing/dra/job.yaml index 0b22eef9a5..5958e1c68c 100644 --- a/clusterloader2/testing/dra/job.yaml +++ b/clusterloader2/testing/dra/job.yaml @@ -19,9 +19,10 @@ spec: restartPolicy: Never containers: - name: {{.Name}} - image: gcr.io/k8s-staging-perf-tests/sleep:v0.0.3 - args: - - {{.Sleep}} + image: registry.k8s.io/e2e-test-images/agnhost:2.56 + command: + - sleep + - {{.Sleep}} resources: claims: - name: gpu diff --git a/util-images/sleep/Dockerfile b/util-images/sleep/Dockerfile deleted file mode 100644 index 111460367e..0000000000 --- a/util-images/sleep/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM golang:1.24 AS build-env - -ARG gopkg=k8s.io/perf-tests/util-images/sleep - -ADD [".", "/go/src/$gopkg"] - -WORKDIR /go/src/$gopkg -RUN CGO_ENABLED=0 go build -o /go/bin/sleep main.go - -FROM gcr.io/distroless/static -COPY --from=build-env /go/bin/sleep /usr/bin/ -ENTRYPOINT ["sleep"] diff --git a/util-images/sleep/Makefile b/util-images/sleep/Makefile deleted file mode 100644 index dc2d7defdb..0000000000 --- a/util-images/sleep/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -PROJECT = k8s-staging-perf-tests -IMG = gcr.io/$(PROJECT)/sleep -TAG = v0.1.0 - -all: push - -.PHONY: build -build: - docker build --pull -t $(IMG):$(TAG) . - docker tag $(IMG):$(TAG) $(IMG):latest - @echo Built $(IMG):$(TAG) and tagged with latest - -.PHONY: push -push: build - docker push $(IMG):$(TAG) - docker push $(IMG):latest - @echo Pushed $(IMG) with :latest and :$(TAG) tags diff --git a/util-images/sleep/README.md b/util-images/sleep/README.md deleted file mode 100644 index 0672145edc..0000000000 --- a/util-images/sleep/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Sleep - -Simple program that sleeps for a provided duration. - -## Building and Releasing - -1. Increment the `TAG` in the Makefile. -2. `make build` -3. Test changes with `docker run gcr.io/k8s-staging-perf-tests/sleep:latest -- ...` -4. Release with `make push` diff --git a/util-images/sleep/main.go b/util-images/sleep/main.go deleted file mode 100644 index 1c2eb3573a..0000000000 --- a/util-images/sleep/main.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2022 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. -*/ - -package main - -import ( - "flag" - "fmt" - "os" - "os/signal" - "syscall" - "time" -) - -var ( - terminationGracePeriod = flag.Duration("termination-grace-period", 0, "The duration of time to sleep after receiving SIGTERM") - terminationCode = flag.Int64("termination-code", 0, "Exit code to return after receiving SIGTERM") -) - -func init() { - flag.Usage = func() { - prog := os.Args[0] - fmt.Printf("Usage: %s [DURATION]\n", prog) - fmt.Println("DURATION is a sequence of decimal numbers, each with optional fraction and a unit suffix.") - fmt.Println("Valid time units are ns, us (or µs), ms, s, m, h.") - fmt.Println("\nOptions:") - flag.PrintDefaults() - } -} - -func main() { - flag.Parse() - input := flag.Arg(0) - var duration time.Duration - if input != "" { - var err error - duration, err = time.ParseDuration(input) - if err != nil { - fmt.Println(err) - flag.Usage() - os.Exit(1) - } - } - stopCh := make(chan os.Signal, 1) - signal.Notify(stopCh, syscall.SIGTERM) - - go func() { - <-stopCh - if *terminationGracePeriod != 0 { - time.Sleep(*terminationGracePeriod) - } - - os.Exit(int(*terminationCode)) - }() - - time.Sleep(duration) -}