Skip to content

Commit 8a6ff45

Browse files
authored
Merge branch 'main' into K8SPG-704
2 parents 8e0be14 + 2d3207f commit 8a6ff45

32 files changed

+1096
-48
lines changed

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on: [pull_request]
33
jobs:
44
test:
55
name: Test
6-
runs-on: ubuntu-20.04
6+
runs-on: ubuntu-latest
77
steps:
88
- name: Clone the code
99
uses: actions/checkout@v4

build/crd/crunchy/generated/postgres-operator.crunchydata.com_postgresclusters.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,8 @@ spec:
389389
pgBackRest repository hosts and backups. The image may also be set using
390390
the RELATED_IMAGE_PGBACKREST environment variable
391391
type: string
392+
initImage:
393+
type: string
392394
jobs:
393395
description: Jobs field allows configuration for all backup
394396
jobs
@@ -8352,6 +8354,8 @@ spec:
83528354
properties:
83538355
pgAudit:
83548356
type: boolean
8357+
pgRepack:
8358+
type: boolean
83558359
pgStatMonitor:
83568360
type: boolean
83578361
pgStatStatements:
@@ -8400,6 +8404,8 @@ spec:
84008404
type: object
84018405
x-kubernetes-map-type: atomic
84028406
type: array
8407+
initImage:
8408+
type: string
84038409
instances:
84048410
description: |-
84058411
Specifies one or more sets of PostgreSQL pods that replicate data for

build/crd/percona/generated/pgv2.percona.com_perconapgclusters.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,8 @@ spec:
545545
pgBackRest repository hosts and backups. The image may also be set using
546546
the RELATED_IMAGE_PGBACKREST environment variable
547547
type: string
548+
initImage:
549+
type: string
548550
jobs:
549551
description: Jobs field allows configuration for all backup
550552
jobs
@@ -8066,6 +8068,8 @@ spec:
80668068
properties:
80678069
pg_audit:
80688070
type: boolean
8071+
pg_repack:
8072+
type: boolean
80698073
pg_stat_monitor:
80708074
type: boolean
80718075
pgvector:
@@ -8201,6 +8205,8 @@ spec:
82018205
type: object
82028206
x-kubernetes-map-type: atomic
82038207
type: array
8208+
initImage:
8209+
type: string
82048210
instances:
82058211
description: |-
82068212
Specifies one or more sets of PostgreSQL pods that replicate data for

build/postgres-operator/Dockerfile

+7-1
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,12 @@ RUN mkdir -p build/_output/bin \
3434
go build -ldflags "-w -s -X main.GitCommit=$GIT_COMMIT -X main.GitBranch=$GIT_BRANCH -X main.BuildTime=$BUILD_TIME" \
3535
-o build/_output/bin/extension-installer \
3636
./cmd/extension-installer \
37+
&& CGO_ENABLED=$PGBACKREST_CGO_ENABLED GOARCH=${TARGETARCH} GOOS=$GOOS GO_LDFLAGS=$GO_LDFLAGS \
38+
go build \
39+
-o build/_output/bin/pgbackrest ./cmd/pgbackrest \
3740
&& cp -r build/_output/bin/postgres-operator /usr/local/bin/postgres-operator \
38-
&& cp -r build/_output/bin/extension-installer /usr/local/bin/extension-installer
41+
&& cp -r build/_output/bin/extension-installer /usr/local/bin/extension-installer \
42+
&& cp -r build/_output/bin/pgbackrest /usr/local/bin/pgbackrest
3943

4044

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

5660
COPY --from=go_builder /usr/local/bin/postgres-operator /usr/local/bin
5761
COPY --from=go_builder /usr/local/bin/extension-installer /usr/local/bin
62+
COPY --from=go_builder /usr/local/bin/pgbackrest /usr/local/bin/
5863
COPY --from=go_builder /licenses /licenses
5964
COPY build/postgres-operator/install-extensions.sh /usr/local/bin
65+
COPY build/postgres-operator/init-entrypoint.sh /usr/local/bin
6066
COPY hack/tools/queries /opt/crunchy/conf
6167

6268
RUN chgrp -R 0 /opt/crunchy/conf && chmod -R g=u opt/crunchy/conf
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
set -o errexit
4+
set -o xtrace
5+
6+
CRUNCHY_BINDIR="/opt/crunchy"
7+
8+
install -o "$(id -u)" -g "$(id -g)" -m 0755 -D "/usr/local/bin/pgbackrest" "${CRUNCHY_BINDIR}/bin/pgbackrest"

0 commit comments

Comments
 (0)