From fc2f93ef5f2f8f5ba057316a0999137b2e272427 Mon Sep 17 00:00:00 2001 From: idanovinda Date: Wed, 28 Jan 2026 16:40:23 +0100 Subject: [PATCH 1/2] bugfix: fix image naming to use it in e2e test --- Makefile | 2 +- e2e/run.sh | 16 +++++++++++----- pkg/apis/acid.zalan.do/v1/crds.go | 1 - 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 4f5441cf1..e9c2341d0 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ LDFLAGS ?= -X=main.version=$(VERSION) DOCKERDIR = docker BASE_IMAGE ?= alpine:latest -IMAGE ?= $(BINARY) +IMAGE ?= ghcr.io/zalando/$(BINARY) TAG ?= $(VERSION) GITHEAD = $(shell git rev-parse --short HEAD) GITURL = $(shell git config --get remote.origin.url) diff --git a/e2e/run.sh b/e2e/run.sh index b0f13f92e..5ebf2a7cb 100755 --- a/e2e/run.sh +++ b/e2e/run.sh @@ -7,7 +7,7 @@ set -o pipefail IFS=$'\n\t' readonly cluster_name="postgres-operator-e2e-tests" -readonly kubeconfig_path="/tmp/kind-config-${cluster_name}" +readonly kubeconfig_path="${HOME}/kind-config-${cluster_name}" readonly spilo_image="registry.opensource.zalan.do/acid/spilo-17-e2e:0.3" readonly e2e_test_runner_image="ghcr.io/zalando/postgres-operator-e2e-tests-runner:latest" @@ -19,11 +19,17 @@ echo "Kubeconfig path: ${kubeconfig_path}" function pull_images(){ operator_tag=$(git describe --tags --always --dirty) - if [[ -z $(docker images -q ghcr.io/zalando/postgres-operator:${operator_tag}) ]] + image_name="ghcr.io/zalando/postgres-operator:${operator_tag}" + if [[ -z $(docker images -q "${image_name}") ]] then - docker pull ghcr.io/zalando/postgres-operator:latest + if ! docker pull "${image_name}" + then + echo "Failed to pull operator image: ${image_name}" + exit 1 + fi fi - operator_image=$(docker images --filter=reference="ghcr.io/zalando/postgres-operator" --format "{{.Repository}}:{{.Tag}}" | head -1) + operator_image="${image_name}" + echo "Using operator image: ${operator_image}" } function start_kind(){ @@ -52,7 +58,7 @@ function set_kind_api_server_ip(){ # but update the IP address of the API server to the one from the Docker 'bridge' network readonly local kind_api_server_port=6443 # well-known in the 'kind' codebase readonly local kind_api_server=$(docker inspect --format "{{ .NetworkSettings.Networks.kind.IPAddress }}:${kind_api_server_port}" "${cluster_name}"-control-plane) - sed -i "s/server.*$/server: https:\/\/$kind_api_server/g" "${kubeconfig_path}" + sed "s/server.*$/server: https:\/\/$kind_api_server/g" "${kubeconfig_path}" > "${kubeconfig_path}".tmp && mv "${kubeconfig_path}".tmp "${kubeconfig_path}" } function generate_certificate(){ diff --git a/pkg/apis/acid.zalan.do/v1/crds.go b/pkg/apis/acid.zalan.do/v1/crds.go index 1ab85c905..125e0974b 100644 --- a/pkg/apis/acid.zalan.do/v1/crds.go +++ b/pkg/apis/acid.zalan.do/v1/crds.go @@ -968,7 +968,6 @@ func buildCRD(name, kind, plural, list, short string, } } -//go:embed postgresql.crd.yaml var postgresqlCRDYAML []byte // PostgresCRD returns CustomResourceDefinition built from PostgresCRDResource From 32c99042e64abaf6cffa7370dbad0f518f8539a9 Mon Sep 17 00:00:00 2001 From: Polina Bungina Date: Wed, 28 Jan 2026 18:38:50 +0100 Subject: [PATCH 2/2] Fix embeded crd --- pkg/apis/acid.zalan.do/v1/crds.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/apis/acid.zalan.do/v1/crds.go b/pkg/apis/acid.zalan.do/v1/crds.go index 125e0974b..1ab85c905 100644 --- a/pkg/apis/acid.zalan.do/v1/crds.go +++ b/pkg/apis/acid.zalan.do/v1/crds.go @@ -968,6 +968,7 @@ func buildCRD(name, kind, plural, list, short string, } } +//go:embed postgresql.crd.yaml var postgresqlCRDYAML []byte // PostgresCRD returns CustomResourceDefinition built from PostgresCRDResource