Merge branch 'master' into pg-18

This commit is contained in:
idanovinda 2026-01-29 11:28:25 +01:00
commit 45c802a8f7
2 changed files with 10 additions and 8 deletions

View File

@ -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)
@ -84,7 +84,7 @@ linux: ${SOURCES} $(GENERATED_CRDS)
macos: ${SOURCES} $(GENERATED_CRDS)
GOOS=darwin GOARCH=amd64 CGO_ENABLED=${CGO_ENABLED} go build -o build/macos/${BINARY} ${BUILD_FLAGS} -ldflags "$(LDFLAGS)" $(SOURCES)
docker: ${DOCKERDIR}/${DOCKERFILE}
docker: $(GENERATED_CRDS) ${DOCKERDIR}/${DOCKERFILE}
echo `(env)`
echo "Tag ${TAG}"
echo "Version ${VERSION}"

View File

@ -19,14 +19,16 @@ echo "Kubeconfig path: ${kubeconfig_path}"
function pull_images(){
operator_tag=$(git describe --tags --always --dirty)
target_image=docker.io/library/postgres-operator:${operator_tag}
if [[ -z $(docker images -q "postgres-operator:${operator_tag}") ]]
image_name="ghcr.io/zalando/postgres-operator:${operator_tag}"
if [[ -z $(docker images -q "${image_name}") ]]
then
echo "Local image not found. Pulling operator image from ghcr.io and tagging it as ${target_image}"
docker pull ghcr.io/zalando/postgres-operator:latest
docker tag ghcr.io/zalando/postgres-operator:latest "${target_image}"
if ! docker pull "${image_name}"
then
echo "Failed to pull operator image: ${image_name}"
exit 1
fi
fi
operator_image=${target_image}
operator_image="${image_name}"
echo "Using operator image: ${operator_image}"
}