Skip to content

K8SPG-613: use percona-pgbackrest image #1098

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Apr 2, 2025
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ spec:
pgBackRest repository hosts and backups. The image may also be set using
the RELATED_IMAGE_PGBACKREST environment variable
type: string
initImage:
type: string
jobs:
description: Jobs field allows configuration for all backup
jobs
Expand Down Expand Up @@ -8402,6 +8404,8 @@ spec:
type: object
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix description

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x-kubernetes-map-type: atomic
type: array
initImage:
type: string
instances:
description: |-
Specifies one or more sets of PostgreSQL pods that replicate data for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,8 @@ spec:
pgBackRest repository hosts and backups. The image may also be set using
the RELATED_IMAGE_PGBACKREST environment variable
type: string
initImage:
type: string
jobs:
description: Jobs field allows configuration for all backup
jobs
Expand Down Expand Up @@ -8203,6 +8205,8 @@ spec:
type: object
x-kubernetes-map-type: atomic
type: array
initImage:
type: string
instances:
description: |-
Specifies one or more sets of PostgreSQL pods that replicate data for
Expand Down
8 changes: 7 additions & 1 deletion build/postgres-operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ RUN mkdir -p build/_output/bin \
go build -ldflags "-w -s -X main.GitCommit=$GIT_COMMIT -X main.GitBranch=$GIT_BRANCH -X main.BuildTime=$BUILD_TIME" \
-o build/_output/bin/extension-installer \
./cmd/extension-installer \
&& CGO_ENABLED=$PGBACKREST_CGO_ENABLED GOARCH=${TARGETARCH} GOOS=$GOOS GO_LDFLAGS=$GO_LDFLAGS \
go build \
-o build/_output/bin/pgbackrest ./cmd/pgbackrest \
&& cp -r build/_output/bin/postgres-operator /usr/local/bin/postgres-operator \
&& cp -r build/_output/bin/extension-installer /usr/local/bin/extension-installer
&& cp -r build/_output/bin/extension-installer /usr/local/bin/extension-installer \
&& cp -r build/_output/bin/pgbackrest /usr/local/bin/pgbackrest


RUN ./bin/license_aggregator.sh ./cmd/...; \
Expand All @@ -55,8 +59,10 @@ COPY licenses /licenses

COPY --from=go_builder /usr/local/bin/postgres-operator /usr/local/bin
COPY --from=go_builder /usr/local/bin/extension-installer /usr/local/bin
COPY --from=go_builder /usr/local/bin/pgbackrest /usr/local/bin/
COPY --from=go_builder /licenses /licenses
COPY build/postgres-operator/install-extensions.sh /usr/local/bin
COPY build/postgres-operator/init-entrypoint.sh /usr/local/bin
COPY hack/tools/queries /opt/crunchy/conf

RUN chgrp -R 0 /opt/crunchy/conf && chmod -R g=u opt/crunchy/conf
Expand Down
8 changes: 8 additions & 0 deletions build/postgres-operator/init-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -o errexit
set -o xtrace

CRUNCHY_BINDIR="/opt/crunchy"

install -o "$(id -u)" -g "$(id -g)" -m 0755 -D "/usr/local/bin/pgbackrest" "${CRUNCHY_BINDIR}/bin/pgbackrest"
Loading
Loading