Skip to content

Commit 8ce6b79

Browse files
authored
Merge pull request #47 from cybertec-postgresql/v0.7.0-dev
Merge whole release into main
2 parents 8ff9e84 + dfe68f2 commit 8ce6b79

186 files changed

Lines changed: 4388 additions & 2805 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/workflows/run_e2e.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- master
7+
- main
88

99
jobs:
1010
tests:
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v1
1515
- uses: actions/setup-go@v2
1616
with:
17-
go-version: "^1.19.8"
17+
go-version: "^1.21.7"
1818
- name: Make dependencies
1919
run: make deps mocks
2020
- name: Code generation

.github/workflows/run_tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- master
7+
- main
88

99
jobs:
1010
tests:
@@ -14,15 +14,15 @@ jobs:
1414
- uses: actions/checkout@v2
1515
- uses: actions/setup-go@v2
1616
with:
17-
go-version: "^1.19.8"
17+
go-version: "^1.21.7"
1818
- name: Make dependencies
1919
run: make deps mocks
2020
- name: Compile
2121
run: make linux
2222
- name: Run unit tests
2323
run: go test -race -covermode atomic -coverprofile=coverage.out ./...
2424
- name: Convert coverage to lcov
25-
uses: jandelgado/[email protected].8
25+
uses: jandelgado/[email protected].9
2626
- name: Coveralls
2727
uses: coverallsapp/github-action@master
2828
with:

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Before filing an issue, if you have a question about Postgres Operator or have
88
a problem using it, please read the [concepts](docs/index.md) page or use the
99
different guides that we provide for [users](docs/user.md),
1010
[developers](docs/developer.md) or [admins](docs/administrator). Also double
11-
check with the current issues on our [Issues Tracker](https://github.com/zalando/postgres-operator/issues).
11+
check with the current issues on our [Issues Tracker](https://github.com/cybertec-postgresql/cybertec-pg-operator/issues).
1212

1313
## Contributing a pull request
1414

Makefile

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.PHONY: clean local test linux macos mocks docker push e2e
22

3-
BINARY ?= postgres-operator
3+
BINARY ?= cybertec-pg-operator
44
BUILD_FLAGS ?= -v
55
CGO_ENABLED ?= 0
66
ifeq ($(RACE),1)
@@ -12,7 +12,7 @@ LOCAL_BUILD_FLAGS ?= $(BUILD_FLAGS)
1212
LDFLAGS ?= -X=main.version=$(VERSION)
1313
DOCKERDIR = docker
1414

15-
IMAGE ?= registry.opensource.zalan.do/acid/$(BINARY)
15+
IMAGE ?= docker.io/cybertecpostgresql/$(BINARY)
1616
TAG ?= $(VERSION)
1717
GITHEAD = $(shell git rev-parse --short HEAD)
1818
GITURL = $(shell git config --get remote.origin.url)
@@ -22,6 +22,17 @@ VERSION ?= $(shell git describe --tags --always --dirty)
2222
DIRS := cmd pkg
2323
PKG := `go list ./... | grep -v /vendor/`
2424

25+
BASE_IMAGE ?= rockylinux:9
26+
PACKAGER ?= dnf
27+
BUILD ?= 1
28+
ROOTPATH = $(GOPATH)/src/github.com/cybertec/cybertec-pg-operator
29+
VERIFY_CODEGEN ?= 1
30+
ifndef ROOTPATH
31+
export ROOTPATH=$(GOPATH)/src/github.com/cybertec/cybertec-pg-operator
32+
endif
33+
34+
ALL_SOURCES = $(shell find pkg/ -name '*.go')
35+
2536
ifeq ($(DEBUG),1)
2637
DOCKERFILE = DebugDockerfile
2738
DEBUG_POSTFIX := -debug-$(shell date hhmmss)
@@ -50,27 +61,34 @@ default: local
5061
clean:
5162
rm -rf build
5263

53-
local: ${SOURCES}
54-
hack/verify-codegen.sh
55-
CGO_ENABLED=${CGO_ENABLED} go build -o build/${BINARY} $(LOCAL_BUILD_FLAGS) -ldflags "$(LDFLAGS)" $^
64+
local: build/cybertec-pg-operator
65+
66+
build/cybertec-pg-operator: ${SOURCES} ${ALL_SOURCES}
67+
if [ "$(VERIFY_CODEGEN)" = "1" ]; then hack/verify-codegen.sh; fi
68+
CGO_ENABLED=${CGO_ENABLED} go build -o build/${BINARY} $(LOCAL_BUILD_FLAGS) -ldflags "$(LDFLAGS)" $<
5669

5770
linux: ${SOURCES}
5871
GOOS=linux GOARCH=amd64 CGO_ENABLED=${CGO_ENABLED} go build -o build/linux/${BINARY} ${BUILD_FLAGS} -ldflags "$(LDFLAGS)" $^
5972

6073
macos: ${SOURCES}
6174
GOOS=darwin GOARCH=amd64 CGO_ENABLED=${CGO_ENABLED} go build -o build/macos/${BINARY} ${BUILD_FLAGS} -ldflags "$(LDFLAGS)" $^
6275

63-
docker: ${DOCKERDIR}/${DOCKERFILE}
76+
docker: ${DOCKERDIR}/${DOCKERFILE}
77+
78+
docker build --rm -t "$(IMAGE):$(TAG)$(CDP_TAG)$(DEBUG_FRESH)$(DEBUG_POSTFIX)" -f "${DOCKERDIR}/${DOCKERFILE}" --build-arg VERSION="${VERSION}" --build-arg BASE_IMAGE="${BASE_IMAGE}" --build-arg PACKAGER="${PACKAGER}" .
79+
80+
# docker build --rm --build-arg VERSION="${VERSION}" .
81+
82+
# docker build --rm -t "$(IMAGE):$(TAG)$(CDP_TAG)$(DEBUG_FRESH)$(DEBUG_POSTFIX)" -f "${DOCKERDIR}/${DOCKERFILE}" --build-arg VERSION="${VERSION}" .
83+
84+
# ${VERSION}
85+
86+
docker-local: build/cybertec-pg-operator
87+
docker build --rm -t "$(IMAGE):$(TAG)$(CDP_TAG)$(DEBUG_FRESH)$(DEBUG_POSTFIX)" -f "${DOCKERDIR}/Dockerfile-dev" --build-arg VERSION="${VERSION}" --build-arg BASE_IMAGE="${BASE_IMAGE}" --build-arg PACKAGER="${PACKAGER}" .
6488

65-
echo `(env)`
66-
echo "Tag ${TAG}"
67-
echo "Version ${VERSION}"
68-
echo "CDP tag ${CDP_TAG}"
69-
echo "git describe $(shell git describe --tags --always --dirty)"
70-
docker build --rm -t "$(IMAGE):$(TAG)$(CDP_TAG)$(DEBUG_FRESH)$(DEBUG_POSTFIX)" -f "${DOCKERDIR}/${DOCKERFILE}" --build-arg VERSION="${VERSION}" .
7189

7290
indocker-race:
73-
docker run --rm -v "${GOPATH}":"${GOPATH}" -e GOPATH="${GOPATH}" -e RACE=1 -w ${PWD} golang:1.19.8 bash -c "make linux"
91+
docker run --rm -v "${GOPATH}":"${GOPATH}" -e GOPATH="${GOPATH}" -e RACE=1 -w ${PWD} golang:1.21.7 bash -c "make linux"
7492

7593
push:
7694
docker push "$(IMAGE):$(TAG)$(CDP_TAG)"
@@ -79,7 +97,7 @@ mocks:
7997
GO111MODULE=on go generate ./...
8098

8199
tools:
82-
GO111MODULE=on go get -d k8s.io/client-go@kubernetes-1.25.9
100+
GO111MODULE=on go get -d k8s.io/client-go@kubernetes-1.28.7
83101
GO111MODULE=on go install github.com/golang/mock/[email protected]
84102
GO111MODULE=on go mod tidy
85103

README.md

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
# CYBERTEC PG Operator
2-
3-
CPO (CYBERTEC PG Operator) allows you to create and run PostgreSQL clusters on Kubernetes.
41

5-
The operator reduces your efforts and simplifies the administration of your PostgreSQL clusters so that you can concentrate on other things.
62
# CYBERTEC PG Operator
73

84
CPO (CYBERTEC PG Operator) allows you to create and run PostgreSQL clusters on Kubernetes.
95

106
The operator reduces your efforts and simplifies the administration of your PostgreSQL clusters so that you can concentrate on other things.
11-
<img src="docs/diagrams/logo.png" width="200">
7+
<img src="docs/diagrams/cpo_logo.svg" width="350">
128

139
The Postgres Operator delivers an easy to run highly-available [PostgreSQL](https://www.postgresql.org/)
1410
clusters on Kubernetes (K8s) powered by [Patroni](https://github.com/zalando/patroni).
@@ -22,7 +18,6 @@ pipelines with no access to Kubernetes API directly, promoting infrastructure as
2218
* Database connection pooling with PGBouncer
2319
* Support fast in place major version upgrade. Supports global upgrade of all clusters.
2420
* Restore and cloning Postgres clusters on PVC, AWS, GCS and Azure
25-
* Additionally logical backups to S3 or GCS bucket can be configured
2621
* Standby cluster
2722
* Configurable for non-cloud environments
2823
* Basic credential and user management on K8s, eases application deployments
@@ -33,47 +28,36 @@ pipelines with no access to Kubernetes API directly, promoting infrastructure as
3328

3429
### PostgreSQL features
3530

36-
* Supports PostgreSQL 15, starting from 10+
31+
* Supports PostgreSQL 16, starting from 10+
32+
* Streaming replication cluster via Patroni
33+
* Integrated backup solution, automatic backups and very easy restore (Backup & PITR)
34+
* Rolling update procedure for adjustments to the pods and minor updates
35+
* Major upgrade with minimum interruption time
36+
* Reduction of downtime thanks to redundancy, pod anti-affinity, auto-failover and self-healing
37+
* Supports PostgreSQL 16, starting from 10+
3738
* Streaming replication cluster via Patroni
3839
* Point-In-Time-Recovery with
3940
[pg_basebackup](https://www.postgresql.org/docs/16/app-pgbasebackup.html) /
4041
[pgBackRest](https://pgbackrest.org/) via [CYBERTEC-pg-container](https://github.com/cybertec-postgresql/CYBERTEC-pg-container)
41-
[pg_stat_statements](https://www.postgresql.org/docs/15/pgstatstatements.html),
42+
[pg_stat_statements](https://www.postgresql.org/docs/16/pgstatstatements.html),
4243
* Incl. popular Postgres extensions such as
43-
[pg_cron](https://github.com/citusdata/pg_cron),
44-
[pg_partman](https://github.com/pgpartman/pg_partman),
44+
[pgaudit](https://github.com/pgaudit/pgaudit),
45+
[pgauditlogtofile](https://github.com/fmbiete/pgauditlogtofile),
46+
<!-- [pg_partman](https://github.com/pgpartman/pg_partman), -->
4547
[postgis](https://postgis.net/),
46-
[set_user](https://github.com/pgaudit/set_user) and
48+
[set_user](https://github.com/pgaudit/set_user)
49+
[pg_cron](https://github.com/citusdata/pg_cron),
4750
[timescaledb](https://github.com/timescale/timescaledb)
4851
[credcheck](https://github.com/MigOpsRepos/credcheck)
4952

50-
The Postgres Operator has been developed at Zalando and is being used in
51-
production for over five years.
53+
The Operator project is being driven forward by CYBERTEC and is currently in production at various locations.
5254

5355
## Supported Postgres & K8s versions
5456

55-
| Release | Postgres versions | pgBackRest versions | Patroni versions | K8s versions | Golang |
57+
| Release | Postgres versions | pgBackRest versions | Patroni versions | K8s versions | Golang |
5658
| :-------- | :---------------: | :-------------------: | :--------------: | :----------------:| :-----: |
57-
| latest | 13 &rarr; 16 | 2.51 | 3.2.2 | 1.21+ | 1.19.8 |
58-
| next rc | 13 &rarr; 16 | 2.51 | 3.2.2 | 1.21+ | 1.22.1 |
59-
60-
* Integrated backup solution, automatic backups and very easy restore (snapshot & PITR)
61-
* Rolling update procedure for adjustments to the pods and minor updates
62-
* Major upgrade with minimum interruption time
63-
* Reduction of downtime thanks to redundancy, pod anti-affinity, auto-failover and self-healing
64-
* Supports PostgreSQL 16, starting from 13+
65-
* Streaming replication cluster via Patroni
66-
* Point-In-Time-Recovery with
67-
[pg_basebackup](https://www.postgresql.org/docs/11/app-pgbasebackup.html) /
68-
[pgBackRest](https://pgbackrest.org/) via [CYBERTEC-pg-container](https://github.com/cybertec-postgresql/CYBERTEC-pg-container)
69-
[pg_stat_statements](https://www.postgresql.org/docs/15/pgstatstatements.html),
70-
* Incl. popular Postgres extensions such as
71-
[pg_cron](https://github.com/citusdata/pg_cron),
72-
[pg_partman](https://github.com/pgpartman/pg_partman),
73-
[postgis](https://postgis.net/),
74-
[set_user](https://github.com/pgaudit/set_user) and
75-
[timescaledb](https://github.com/timescale/timescaledb)
76-
[credcheck](https://github.com/MigOpsRepos/credcheck)
59+
| 0.7.0 | 12 &rarr; 16 | 2.52.1 | 3.3.1 | 1.21+ | 1.21.7 |
60+
| next rc | 13 &rarr; 16 | 2.51 | 3.3.1 | 1.21+ | 1.21.7 |
7761

7862
## Getting started
7963

charts/postgres-operator-ui/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: postgres-operator-ui
33
version: 1.10.1
44
appVersion: 1.10.1
5-
home: https://github.com/zalando/postgres-operator
5+
home: https://github.com/cybertec-postgresql/cybertec-pg-operator
66
description: Postgres Operator UI provides a graphical interface for a convenient database-as-a-service user experience
77
keywords:
88
- postgres
@@ -15,5 +15,5 @@ maintainers:
1515
- name: Zalando
1616
1717
sources:
18-
- https://github.com/zalando/postgres-operator
18+
- https://github.com/cybertec-postgresql/cybertec-pg-operator
1919
engine: gotpl

charts/postgres-operator-ui/index.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ entries:
77
description: Postgres Operator UI provides a graphical interface for a convenient
88
database-as-a-service user experience
99
digest: 2e5e7a82aebee519ec57c6243eb8735124aa4585a3a19c66ffd69638fbeb11ce
10-
home: https://github.com/zalando/postgres-operator
10+
home: https://github.com/cybertec-postgresql/cybertec-pg-operator
1111
keywords:
1212
- postgres
1313
- operator
@@ -20,7 +20,7 @@ entries:
2020
name: Zalando
2121
name: postgres-operator-ui
2222
sources:
23-
- https://github.com/zalando/postgres-operator
23+
- https://github.com/cybertec-postgresql/cybertec-pg-operator
2424
urls:
2525
- postgres-operator-ui-1.10.1.tgz
2626
version: 1.10.1
@@ -30,7 +30,7 @@ entries:
3030
description: Postgres Operator UI provides a graphical interface for a convenient
3131
database-as-a-service user experience
3232
digest: 47413650e3188539ae778a601998efa2c4f80b8aa16e3668a2fc7b72e014b605
33-
home: https://github.com/zalando/postgres-operator
33+
home: https://github.com/cybertec-postgresql/cybertec-pg-operator
3434
keywords:
3535
- postgres
3636
- operator
@@ -43,7 +43,7 @@ entries:
4343
name: Zalando
4444
name: postgres-operator-ui
4545
sources:
46-
- https://github.com/zalando/postgres-operator
46+
- https://github.com/cybertec-postgresql/cybertec-pg-operator
4747
urls:
4848
- postgres-operator-ui-1.10.0.tgz
4949
version: 1.10.0
@@ -53,7 +53,7 @@ entries:
5353
description: Postgres Operator UI provides a graphical interface for a convenient
5454
database-as-a-service user experience
5555
digest: df434af6c8b697fe0631017ecc25e3c79e125361ae6622347cea41a545153bdc
56-
home: https://github.com/zalando/postgres-operator
56+
home: https://github.com/cybertec-postgresql/cybertec-pg-operator
5757
keywords:
5858
- postgres
5959
- operator
@@ -66,7 +66,7 @@ entries:
6666
name: Zalando
6767
name: postgres-operator-ui
6868
sources:
69-
- https://github.com/zalando/postgres-operator
69+
- https://github.com/cybertec-postgresql/cybertec-pg-operator
7070
urls:
7171
- postgres-operator-ui-1.9.0.tgz
7272
version: 1.9.0
@@ -76,7 +76,7 @@ entries:
7676
description: Postgres Operator UI provides a graphical interface for a convenient
7777
database-as-a-service user experience
7878
digest: fbfc90fa8fd007a08a7c02e0ec9108bb8282cbb42b8c976d88f2193d6edff30c
79-
home: https://github.com/zalando/postgres-operator
79+
home: https://github.com/cybertec-postgresql/cybertec-pg-operator
8080
keywords:
8181
- postgres
8282
- operator
@@ -89,7 +89,7 @@ entries:
8989
name: Zalando
9090
name: postgres-operator-ui
9191
sources:
92-
- https://github.com/zalando/postgres-operator
92+
- https://github.com/cybertec-postgresql/cybertec-pg-operator
9393
urls:
9494
- postgres-operator-ui-1.8.2.tgz
9595
version: 1.8.2
@@ -99,7 +99,7 @@ entries:
9999
description: Postgres Operator UI provides a graphical interface for a convenient
100100
database-as-a-service user experience
101101
digest: d26342e385ea51a0fbfbe23477999863e9489664ae803ea5c56da8897db84d24
102-
home: https://github.com/zalando/postgres-operator
102+
home: https://github.com/cybertec-postgresql/cybertec-pg-operator
103103
keywords:
104104
- postgres
105105
- operator
@@ -112,7 +112,7 @@ entries:
112112
name: Zalando
113113
name: postgres-operator-ui
114114
sources:
115-
- https://github.com/zalando/postgres-operator
115+
- https://github.com/cybertec-postgresql/cybertec-pg-operator
116116
urls:
117117
- postgres-operator-ui-1.8.1.tgz
118118
version: 1.8.1
@@ -122,7 +122,7 @@ entries:
122122
description: Postgres Operator UI provides a graphical interface for a convenient
123123
database-as-a-service user experience
124124
digest: d4a7b40c23fd167841cc28342afdbd5ecc809181913a5c31061c83139187f148
125-
home: https://github.com/zalando/postgres-operator
125+
home: https://github.com/cybertec-postgresql/cybertec-pg-operator
126126
keywords:
127127
- postgres
128128
- operator
@@ -135,7 +135,7 @@ entries:
135135
name: Zalando
136136
name: postgres-operator-ui
137137
sources:
138-
- https://github.com/zalando/postgres-operator
138+
- https://github.com/cybertec-postgresql/cybertec-pg-operator
139139
urls:
140140
- postgres-operator-ui-1.8.0.tgz
141141
version: 1.8.0
@@ -145,7 +145,7 @@ entries:
145145
description: Postgres Operator UI provides a graphical interface for a convenient
146146
database-as-a-service user experience
147147
digest: 97aed1a1d37cd5f8441eea9522f38e56cc829786ad2134c437a5e6a15c995869
148-
home: https://github.com/zalando/postgres-operator
148+
home: https://github.com/cybertec-postgresql/cybertec-pg-operator
149149
keywords:
150150
- postgres
151151
- operator
@@ -158,7 +158,7 @@ entries:
158158
name: Zalando
159159
name: postgres-operator-ui
160160
sources:
161-
- https://github.com/zalando/postgres-operator
161+
- https://github.com/cybertec-postgresql/cybertec-pg-operator
162162
urls:
163163
- postgres-operator-ui-1.7.1.tgz
164164
version: 1.7.1
@@ -168,7 +168,7 @@ entries:
168168
description: Postgres Operator UI provides a graphical interface for a convenient
169169
database-as-a-service user experience
170170
digest: 37fba1968347daad393dbd1c6ee6e5b6a24d1095f972c0102197531c62dcada8
171-
home: https://github.com/zalando/postgres-operator
171+
home: https://github.com/cybertec-postgresql/cybertec-pg-operator
172172
keywords:
173173
- postgres
174174
- operator
@@ -181,7 +181,7 @@ entries:
181181
name: Zalando
182182
name: postgres-operator-ui
183183
sources:
184-
- https://github.com/zalando/postgres-operator
184+
- https://github.com/cybertec-postgresql/cybertec-pg-operator
185185
urls:
186186
- postgres-operator-ui-1.7.0.tgz
187187
version: 1.7.0

0 commit comments

Comments
 (0)