diff --git a/Makefile b/Makefile index e6bf4d88f..950aadd04 100644 --- a/Makefile +++ b/Makefile @@ -101,10 +101,10 @@ docker: $(GENERATED_CRDS) ${DOCKERDIR}/${DOCKERFILE} echo "Version ${VERSION}" echo "CDP tag ${CDP_TAG}" echo "git describe $(shell git describe --tags --always --dirty)" - docker build --rm -t "$(IMAGE_TAG)" -f "${DOCKERDIR}/${DOCKERFILE}" --build-arg VERSION="${VERSION}" --build-arg BASE_IMAGE="${BASE_IMAGE}" . + docker buildx build --load --rm -t "$(IMAGE_TAG)" -f "${DOCKERDIR}/${DOCKERFILE}" --build-arg VERSION="${VERSION}" --build-arg BASE_IMAGE="${BASE_IMAGE}" . pooler: - cd pooler; docker build --rm -t "$(POOLER_TAG)" --build-arg VERSION="${VERSION}" --build-arg BASE_IMAGE="${BASE_IMAGE}" . + cd pooler; docker buildx build --load --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.26.4 bash -c "make linux" diff --git a/charts/postgres-operator/crds/postgresqls.yaml b/charts/postgres-operator/crds/postgresqls.yaml index 4d534c16e..0e3558638 100644 --- a/charts/postgres-operator/crds/postgresqls.yaml +++ b/charts/postgres-operator/crds/postgresqls.yaml @@ -457,6 +457,7 @@ spec: envFrom: items: description: EnvFromSource represents the source of a set of ConfigMaps + or Secrets properties: configMapRef: description: The ConfigMap to select from @@ -476,8 +477,9 @@ spec: type: object x-kubernetes-map-type: atomic prefix: - description: An optional identifier to prepend to each key in - the ConfigMap. Must be a C_IDENTIFIER. + description: |- + Optional text to prepend to the name of each environment variable. + May consist of any printable ASCII characters except '='. type: string secretRef: description: The Secret to select from @@ -498,7 +500,6 @@ spec: x-kubernetes-map-type: atomic type: object type: array - x-kubernetes-list-type: atomic initContainers: items: description: A single application container that you want to run diff --git a/docker/Dockerfile b/docker/Dockerfile index 4ba9b7630..c6940a7c2 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -8,12 +8,11 @@ ARG TARGETARCH COPY . /go/src/github.com/zalando/postgres-operator WORKDIR /go/src/github.com/zalando/postgres-operator -RUN go clean -cache -modcache RUN go mod vendor \ && CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o build/postgres-operator -v -ldflags "-X=main.version=${VERSION}" cmd/main.go ARG BASE_IMAGE -FROM --platform=$TARGETPLATFORM ${BASE_IMAGE} +FROM ${BASE_IMAGE} LABEL maintainer="Team ACID @ Zalando " LABEL org.opencontainers.image.source="https://github.com/zalando/postgres-operator" diff --git a/docker/build_operator.sh b/docker/build_operator.sh index 0b1bf4d82..ab265011b 100644 --- a/docker/build_operator.sh +++ b/docker/build_operator.sh @@ -26,6 +26,5 @@ export PATH="$PATH:$HOME/go/bin" export GOPATH="$HOME/go" mkdir -p build -go clean -cache -modcache go mod vendor CGO_ENABLED=0 go build -o build/postgres-operator -v -ldflags "$OPERATOR_LDFLAGS" cmd/main.go diff --git a/docs/administrator.md b/docs/administrator.md index 49718d1ea..adfee6065 100644 --- a/docs/administrator.md +++ b/docs/administrator.md @@ -1565,7 +1565,7 @@ make docker # build in image in minikube docker env eval $(minikube docker-env) -docker build -t ghcr.io/zalando/postgres-operator-ui:v1.15.1 . +docker buildx build --load -t ghcr.io/zalando/postgres-operator-ui:v1.15.1 . # apply UI manifests next to a running Postgres Operator kubectl apply -f manifests/ diff --git a/docs/developer.md b/docs/developer.md index eb7cb0e9f..2369a7809 100644 --- a/docs/developer.md +++ b/docs/developer.md @@ -30,8 +30,7 @@ git clone https://github.com/zalando/postgres-operator.git We use [Go Modules](https://github.com/golang/go/wiki/Modules) for handling dependencies. Run `go mod vendor && go mod tidy` to install them. -Build the operator with the `make docker` command. You may define the TAG variable to assign an explicit tag to your Docker image and the IMAGE to set the image name. By default, the tag is computed with -`git describe --tags --always --dirty` and the image is `ghcr.io/zalando/postgres-operator`. On macos search and replace `sed -i` commands with `sed -i ''` for the make commands to work. +Build the operator with the `make docker` command. You may define the TAG variable to assign an explicit tag to your Docker image and the IMAGE to set the image name. By default, the tag is computed with `git describe --tags --always --dirty` and the image is `ghcr.io/zalando/postgres-operator`. ```bash export TAG=$(git describe --tags --always --dirty) diff --git a/e2e/Dockerfile b/e2e/Dockerfile index 1f4083116..2d30f3218 100644 --- a/e2e/Dockerfile +++ b/e2e/Dockerfile @@ -3,7 +3,7 @@ FROM python:3.11-slim LABEL maintainer="Team ACID @ Zalando " -ENV TERM xterm-256color +ENV TERM=xterm-256color RUN apt-get -qq -y update \ # https://www.psycopg.org/docs/install.html#psycopg-vs-psycopg-binary diff --git a/e2e/Makefile b/e2e/Makefile index 09ac74986..c0925ec44 100644 --- a/e2e/Makefile +++ b/e2e/Makefile @@ -37,7 +37,7 @@ copy: clean mkdir tls docker: - docker build -t "$(IMAGE):$(TAG)" . + docker buildx build --load --rm -t "$(IMAGE):$(TAG)" . push: docker docker push "$(IMAGE):$(TAG)"