Skip to content

Commit

Permalink
images: add and use the pause image
Browse files Browse the repository at this point in the history
We add a pause image which is backward compatible with
https://hub.docker.com/r/google/pause/
but built on top of a UBI image, so with the minimal
toolset available on top (e.g. sleep!)

Signed-off-by: Francesco Romani <[email protected]>
  • Loading branch information
ffromani committed Sep 12, 2022
1 parent 28f2967 commit 717a853
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
9 changes: 9 additions & 0 deletions Dockerfile.pause
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM docker.io/golang:1.18 AS builder

WORKDIR /go/src/github.com/openshift-kni/numaresources-operator
COPY . .

RUN make build-pause

FROM registry.access.redhat.com/ubi8/ubi-minimal
COPY --from=builder /go/src/github.com/openshift-kni/numaresources-operator/bin/pause /
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,12 @@ build-e2e-all: fmt vet binary-e2e-all

build-must-gather-e2e: fmt vet binary-must-gather-e2e

build-pause:
build-pause: bin-dir
install -m 755 hack/pause bin/

bin-dir:
@mkdir -p bin || :

run: manifests generate fmt vet ## Run a controller from your host.
go run ./main.go

Expand Down
2 changes: 1 addition & 1 deletion README.tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ podman run -ti \

The E2E suite depends on few extra images. These images are very stable, lightweight and little concern most of times:
- `quay.io/openshift-kni/numacell-device-plugin:test-ci`
- `gcr.io/google_containers/pause-amd64:3.0`
- `quay.io/openshift-kni/pause:test-ci`

However, in some cases it may be unpractical to depend on third party images.
The E2E test image can act as replacement for all its dependencies, providing either the same code or replacements suitables for its use case.
Expand Down
2 changes: 1 addition & 1 deletion test/utils/images/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ const (
NUMACellDevicePluginTestImageCI = "quay.io/openshift-kni/numacell-device-plugin:test-ci"

// the default image used for test pods
PauseImage = "gcr.io/google_containers/pause-amd64:3.0"
PauseImage = "quay.io/openshift-kni/pause:test-ci"
)
2 changes: 1 addition & 1 deletion test/utils/objects/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
package objects

const (
PauseImage = "gcr.io/google_containers/pause-amd64:3.0"
PauseImage = "quay.io/openshift-kni/pause:test-ci"
PauseCommand = "/pause"
)

0 comments on commit 717a853

Please sign in to comment.