Skip to content

Commit 1fac45b

Browse files
authored
Merge branch 'master' into master
2 parents 6faa7fb + 0ac28e3 commit 1fac45b

149 files changed

Lines changed: 10957 additions & 3645 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/postgres-operator-issue-template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ assignees: ''
99

1010
Please, answer some short questions which should help us to understand your problem / question better?
1111

12-
- **Which image of the operator are you using?** e.g. ghcr.io/zalando/postgres-operator:v1.13.0
12+
- **Which image of the operator are you using?** e.g. ghcr.io/zalando/postgres-operator:v1.15.1
1313
- **Where do you run it - cloud or metal? Kubernetes or OpenShift?** [AWS K8s | GCP ... | Bare Metal K8s]
1414
- **Are you running Postgres Operator in production?** [yes | no]
1515
- **Type of issue?** [Bug report, question, feature request, etc.]

.github/workflows/publish_ghcr_image.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323

2424
- uses: actions/setup-go@v2
2525
with:
26-
go-version: "^1.23.4"
26+
go-version: "^1.25.3"
2727

2828
- name: Run unit tests
29-
run: make deps mocks test
29+
run: make test
3030

3131
- name: Define image name
3232
id: image

.github/workflows/run_e2e.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
- uses: actions/checkout@v1
1515
- uses: actions/setup-go@v2
1616
with:
17-
go-version: "^1.23.4"
17+
go-version: "^1.25.3"
1818
- name: Make dependencies
19-
run: make deps mocks
19+
run: make mocks
2020
- name: Code generation
2121
run: make codegen
2222
- name: Run unit tests

.github/workflows/run_tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
- uses: actions/checkout@v2
1515
- uses: actions/setup-go@v2
1616
with:
17-
go-version: "^1.23.4"
17+
go-version: "^1.25.3"
1818
- name: Make dependencies
19-
run: make deps mocks
19+
run: make mocks
2020
- name: Compile
2121
run: make linux
2222
- name: Run unit tests

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# global owners
2-
* @sdudoladov @Jan-M @FxKu @jopadi @idanovinda @hughcapet @macedigital
2+
* @sdudoladov @Jan-M @FxKu @jopadi @idanovinda @hughcapet @mikkeloscar

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2024 Zalando SE
3+
Copyright (c) 2025 Zalando SE
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Jan Mussler <jan.mussler@zalando.de>
44
Jociele Padilha <jociele.padilha@zalando.de>
55
Ida Novindasari <ida.novindasari@zalando.de>
66
Polina Bungina <polina.bungina@zalando.de>
7-
Matthias Adler <matthias.adler@zalando.de>
7+
Mikkel Larsen <mikkel.larsen@zalando.de>

Makefile

Lines changed: 41 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@ LOCAL_BUILD_FLAGS ?= $(BUILD_FLAGS)
1212
LDFLAGS ?= -X=main.version=$(VERSION)
1313
DOCKERDIR = docker
1414

15-
IMAGE ?= registry.opensource.zalan.do/acid/$(BINARY)
15+
BASE_IMAGE ?= alpine:latest
16+
IMAGE ?= ghcr.io/zalando/$(BINARY)
1617
TAG ?= $(VERSION)
1718
GITHEAD = $(shell git rev-parse --short HEAD)
1819
GITURL = $(shell git config --get remote.origin.url)
1920
GITSTATUS = $(shell git status --porcelain || echo "no changes")
2021
SOURCES = cmd/main.go
2122
VERSION ?= $(shell git describe --tags --always --dirty)
23+
CRD_SOURCES = $(shell find pkg/apis/zalando.org pkg/apis/acid.zalan.do -name '*.go' -not -name '*.deepcopy.go')
24+
GENERATED_CRDS = manifests/postgresteam.crd.yaml manifests/postgresql.crd.yaml pkg/apis/acid.zalan.do/v1/postgresql.crd.yaml
25+
GENERATED = pkg/apis/zalando.org/v1/zz_generated.deepcopy.go pkg/apis/acid.zalan.do/v1/zz_generated.deepcopy.go
2226
DIRS := cmd pkg
2327
PKG := `go list ./... | grep -v /vendor/`
2428

@@ -42,62 +46,72 @@ ifndef GOPATH
4246
GOPATH := $(HOME)/go
4347
endif
4448

45-
PATH := $(GOPATH)/bin:$(PATH)
46-
SHELL := env PATH=$(PATH) $(SHELL)
49+
PATH := $(GOPATH)/bin:$(PATH)
50+
SHELL := env PATH="$(PATH)" $(SHELL)
51+
IMAGE_TAG := $(IMAGE):$(TAG)$(CDP_TAG)$(DEBUG_FRESH)$(DEBUG_POSTFIX)
4752

4853
default: local
4954

5055
clean:
5156
rm -rf build
57+
rm $(GENERATED)
58+
rm $(GENERATED_CRDS)
5259

53-
local: ${SOURCES}
60+
verify:
5461
hack/verify-codegen.sh
55-
CGO_ENABLED=${CGO_ENABLED} go build -o build/${BINARY} $(LOCAL_BUILD_FLAGS) -ldflags "$(LDFLAGS)" $^
5662

57-
linux: ${SOURCES}
58-
GOOS=linux GOARCH=amd64 CGO_ENABLED=${CGO_ENABLED} go build -o build/linux/${BINARY} ${BUILD_FLAGS} -ldflags "$(LDFLAGS)" $^
63+
$(GENERATED): go.mod $(CRD_SOURCES)
64+
hack/update-codegen.sh
65+
66+
$(GENERATED_CRDS): $(GENERATED)
67+
go tool controller-gen crd:crdVersions=v1,allowDangerousTypes=true paths=./pkg/apis/acid.zalan.do/... output:crd:dir=manifests
68+
# only generate postgresteam.crd.yaml and postgresql.crd.yaml for now
69+
@rm manifests/acid.zalan.do_operatorconfigurations.yaml
70+
@mv manifests/acid.zalan.do_postgresqls.yaml manifests/postgresql.crd.yaml
71+
@# hack to use lowercase kind and listKind
72+
@sed -i -e 's/kind: Postgresql/kind: postgresql/' manifests/postgresql.crd.yaml
73+
@sed -i -e 's/listKind: PostgresqlList/listKind: postgresqlList/' manifests/postgresql.crd.yaml
74+
@hack/adjust_postgresql_crd.sh
75+
@mv manifests/acid.zalan.do_postgresteams.yaml manifests/postgresteam.crd.yaml
76+
@cp manifests/postgresql.crd.yaml pkg/apis/acid.zalan.do/v1/postgresql.crd.yaml
77+
78+
local: ${SOURCES} $(GENERATED_CRDS)
79+
CGO_ENABLED=${CGO_ENABLED} go build -o build/${BINARY} $(LOCAL_BUILD_FLAGS) -ldflags "$(LDFLAGS)" $(SOURCES)
80+
81+
wasm: ${SOURCES} $(GENERATED_CRDS)
82+
GOOS=wasip1 GOARCH=wasm CGO_ENABLED=${CGO_ENABLED} go build -o build/${BINARY}.wasm ${BUILD_FLAGS} -ldflags "$(LDFLAGS)" $(SOURCES)
83+
84+
linux: ${SOURCES} $(GENERATED_CRDS)
85+
GOOS=linux GOARCH=amd64 CGO_ENABLED=${CGO_ENABLED} go build -o build/linux/${BINARY} ${BUILD_FLAGS} -ldflags "$(LDFLAGS)" $(SOURCES)
5986

60-
macos: ${SOURCES}
61-
GOOS=darwin GOARCH=amd64 CGO_ENABLED=${CGO_ENABLED} go build -o build/macos/${BINARY} ${BUILD_FLAGS} -ldflags "$(LDFLAGS)" $^
87+
macos: ${SOURCES} $(GENERATED_CRDS)
88+
GOOS=darwin GOARCH=amd64 CGO_ENABLED=${CGO_ENABLED} go build -o build/macos/${BINARY} ${BUILD_FLAGS} -ldflags "$(LDFLAGS)" $(SOURCES)
6289

63-
docker: ${DOCKERDIR}/${DOCKERFILE}
90+
docker: $(GENERATED_CRDS) ${DOCKERDIR}/${DOCKERFILE}
6491
echo `(env)`
6592
echo "Tag ${TAG}"
6693
echo "Version ${VERSION}"
6794
echo "CDP tag ${CDP_TAG}"
6895
echo "git describe $(shell git describe --tags --always --dirty)"
69-
docker build --rm -t "$(IMAGE):$(TAG)$(CDP_TAG)$(DEBUG_FRESH)$(DEBUG_POSTFIX)" -f "${DOCKERDIR}/${DOCKERFILE}" --build-arg VERSION="${VERSION}" .
96+
docker build --rm -t "$(IMAGE_TAG)" -f "${DOCKERDIR}/${DOCKERFILE}" --build-arg VERSION="${VERSION}" --build-arg BASE_IMAGE="${BASE_IMAGE}" .
7097

7198
indocker-race:
72-
docker run --rm -v "${GOPATH}":"${GOPATH}" -e GOPATH="${GOPATH}" -e RACE=1 -w ${PWD} golang:1.23.4 bash -c "make linux"
73-
74-
push:
75-
docker push "$(IMAGE):$(TAG)$(CDP_TAG)"
99+
docker run --rm -v "${GOPATH}":"${GOPATH}" -e GOPATH="${GOPATH}" -e RACE=1 -w ${PWD} golang:1.25.3 bash -c "make linux"
76100

77101
mocks:
78102
GO111MODULE=on go generate ./...
79103

80-
tools:
81-
GO111MODULE=on go get k8s.io/client-go@kubernetes-1.30.4
82-
GO111MODULE=on go install github.com/golang/mock/mockgen@v1.6.0
83-
GO111MODULE=on go mod tidy
84-
85104
fmt:
86105
@gofmt -l -w -s $(DIRS)
87106

88107
vet:
89108
@go vet $(PKG)
90109
@staticcheck $(PKG)
91110

92-
deps: tools
93-
GO111MODULE=on go mod vendor
94-
95-
test:
96-
hack/verify-codegen.sh
111+
test: mocks $(GENERATED) $(GENERATED_CRDS)
97112
GO111MODULE=on go test ./...
98113

99-
codegen:
100-
hack/update-codegen.sh
114+
codegen: $(GENERATED)
101115

102116
e2e: docker # build operator image to be tested
103117
cd e2e; make e2etest

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pipelines with no access to Kubernetes API directly, promoting infrastructure as
1717
* Live volume resize without pod restarts (AWS EBS, PVC)
1818
* Database connection pooling with PGBouncer
1919
* Support fast in place major version upgrade. Supports global upgrade of all clusters.
20+
* Pod protection during bootstrap phase and configurable maintenance windows
2021
* Restore and cloning Postgres clusters on AWS, GCS and Azure
2122
* Additionally logical backups to S3 or GCS bucket can be configured
2223
* Standby cluster from S3 or GCS WAL archive
@@ -28,25 +29,30 @@ pipelines with no access to Kubernetes API directly, promoting infrastructure as
2829

2930
### PostgreSQL features
3031

31-
* Supports PostgreSQL 17, starting from 13+
32+
* Supports PostgreSQL 18, starting from 14+
3233
* Streaming replication cluster via Patroni
3334
* Point-In-Time-Recovery with
34-
[pg_basebackup](https://www.postgresql.org/docs/17/app-pgbasebackup.html) /
35-
[WAL-E](https://github.com/wal-e/wal-e) via [Spilo](https://github.com/zalando/spilo)
35+
[pg_basebackup](https://www.postgresql.org/docs/18/app-pgbasebackup.html) /
36+
[WAL-G](https://github.com/wal-g/wal-g) or [WAL-E](https://github.com/wal-e/wal-e) via [Spilo](https://github.com/zalando/spilo)
3637
* Preload libraries: [bg_mon](https://github.com/CyberDem0n/bg_mon),
37-
[pg_stat_statements](https://www.postgresql.org/docs/17/pgstatstatements.html),
38+
[pg_stat_statements](https://www.postgresql.org/docs/18/pgstatstatements.html),
3839
[pgextwlist](https://github.com/dimitri/pgextwlist),
3940
[pg_auth_mon](https://github.com/RafiaSabih/pg_auth_mon)
4041
* Incl. popular Postgres extensions such as
4142
[decoderbufs](https://github.com/debezium/postgres-decoderbufs),
4243
[hypopg](https://github.com/HypoPG/hypopg),
4344
[pg_cron](https://github.com/citusdata/pg_cron),
45+
[pg_repack](https://github.com/reorg/pg_repack),
4446
[pg_partman](https://github.com/pgpartman/pg_partman),
4547
[pg_stat_kcache](https://github.com/powa-team/pg_stat_kcache),
48+
[pg_audit](https://github.com/pgaudit/pgaudit),
49+
[pgfaceting](https://github.com/cybertec-postgresql/pgfaceting),
4650
[pgq](https://github.com/pgq/pgq),
4751
[pgvector](https://github.com/pgvector/pgvector),
4852
[plpgsql_check](https://github.com/okbob/plpgsql_check),
53+
[plproxy](https://github.com/plproxy/plproxy),
4954
[postgis](https://postgis.net/),
55+
[roaringbitmap](https://github.com/ChenHuajun/pg_roaringbitmap),
5056
[set_user](https://github.com/pgaudit/set_user) and
5157
[timescaledb](https://github.com/timescale/timescaledb)
5258

@@ -57,12 +63,12 @@ production for over five years.
5763

5864
| Release | Postgres versions | K8s versions | Golang |
5965
| :-------- | :---------------: | :---------------: | :-----: |
66+
| v1.15.1 | 13 &rarr; 17 | 1.27+ | 1.25.3 |
6067
| v1.14.0 | 13 &rarr; 17 | 1.27+ | 1.23.4 |
6168
| v1.13.0 | 12 &rarr; 16 | 1.27+ | 1.22.5 |
6269
| v1.12.0 | 11 &rarr; 16 | 1.27+ | 1.22.3 |
6370
| v1.11.0 | 11 &rarr; 16 | 1.27+ | 1.21.7 |
6471
| v1.10.1 | 10 &rarr; 15 | 1.21+ | 1.19.8 |
65-
| v1.9.0 | 10 &rarr; 15 | 1.21+ | 1.18.9 |
6672

6773
## Getting started
6874

build-ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ mkdir -p "$team_repo"
99
ln -s "$PWD" "$project_dir"
1010
cd "$project_dir"
1111

12-
make deps clean docker push
12+
make clean docker push

0 commit comments

Comments
 (0)