more Makefile and e2e run script tweaking

This commit is contained in:
Felix Kunde 2026-04-24 18:25:27 +02:00
parent 872d75224c
commit e16d390e94
2 changed files with 7 additions and 8 deletions

View File

@ -1,4 +1,4 @@
.PHONY: clean local test linux macos mocks docker push e2e
.PHONY: clean local test linux macos mocks docker pooler push e2e
BINARY ?= postgres-operator
BUILD_FLAGS ?= -v
@ -97,7 +97,7 @@ docker: $(GENERATED_CRDS) ${DOCKERDIR}/${DOCKERFILE}
docker build --rm -t "$(IMAGE_TAG)" -f "${DOCKERDIR}/${DOCKERFILE}" --build-arg VERSION="${VERSION}" --build-arg BASE_IMAGE="${BASE_IMAGE}" .
pooler:
docker build --rm -t "$(POOLER_TAG)" -f "pooler/Dockerfile" --build-arg VERSION="${VERSION}" --build-arg BASE_IMAGE="${BASE_IMAGE}" .
cd pooler; docker build --rm -t "$(POOLER_TAG)" --build-arg VERSION="${VERSION}" --build-arg BASE_IMAGE="${BASE_IMAGE}" .
indocker-race:
docker run --rm -v "${GOPATH}":"${GOPATH}" -e GOPATH="${GOPATH}" -e RACE=1 -w ${PWD} golang:1.25.3 bash -c "make linux"

View File

@ -26,13 +26,12 @@ echo "Kubeconfig path: ${kubeconfig_path}"
function pull_images(){
operator_tag=$(git describe --tags --always --dirty)
declare -A images=(
["postgres-operator"]="ghcr.io/zalando/postgres-operator:${operator_tag}"
["pooler"]="ghcr.io/zalando/postgres-operator/pgbouncer:${operator_tag}"
)
components=("postgres-operator" "pooler")
image_urls=("ghcr.io/zalando/postgres-operator:${operator_tag}" "ghcr.io/zalando/postgres-operator/pgbouncer:${operator_tag}")
for component in "${!images[@]}"; do
image="${images[$component]}"
for i in "${!components[@]}"; do
component="${components[$i]}"
image="${image_urls[$i]}"
if [[ -z $(docker images -q "$image") ]]; then
echo "Pulling $component image: $image"