Skip to content

Commit 0c7b400

Browse files
authored
Merge pull request #10 from cybertec-postgresql/merge_v10.0
Merge v1.10.1
2 parents 45ffa3f + 39b569c commit 0c7b400

91 files changed

Lines changed: 1791 additions & 1169 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. registry.opensource.zalan.do/acid/postgres-operator:v1.8.2
12+
- **Which image of the operator are you using?** e.g. registry.opensource.zalan.do/acid/postgres-operator:v1.10.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.]
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Publish multiarch postgres-operator image on ghcr.io
2+
3+
env:
4+
REGISTRY: ghcr.io
5+
IMAGE_NAME: ${{ github.repository }}
6+
7+
on:
8+
push:
9+
tags:
10+
- '*'
11+
jobs:
12+
publish:
13+
name: Build, test and push image
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v3
21+
22+
- uses: actions/setup-go@v2
23+
with:
24+
go-version: "^1.19.8"
25+
26+
- name: Run unit tests
27+
run: make deps mocks test
28+
29+
- name: Define image name
30+
id: image
31+
run: |
32+
IMAGE="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${GITHUB_REF/refs\/tags\//}"
33+
echo "NAME=$IMAGE" >> $GITHUB_OUTPUT
34+
35+
- name: Set up QEMU
36+
uses: docker/setup-qemu-action@v2
37+
38+
- name: Set up Docker Buildx
39+
uses: docker/setup-buildx-action@v2
40+
41+
- name: Login to GHCR
42+
uses: docker/login-action@v2
43+
with:
44+
registry: ${{ env.REGISTRY }}
45+
username: ${{ github.actor }}
46+
password: ${{ secrets.GITHUB_TOKEN }}
47+
48+
- name: Build and push multiarch image to ghcr
49+
uses: docker/build-push-action@v3
50+
with:
51+
context: .
52+
file: docker/Dockerfile
53+
push: true
54+
build-args: BASE_IMAGE=alpine:3.15
55+
tags: "${{ steps.image.outputs.NAME }}"
56+
platforms: linux/amd64,linux/arm64

.github/workflows/run_e2e.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ jobs:
1414
- uses: actions/checkout@v1
1515
- uses: actions/setup-go@v2
1616
with:
17-
go-version: "^1.17.4"
17+
go-version: "^1.19.8"
1818
- name: Make dependencies
1919
run: make deps mocks
2020
- name: Code generation
2121
run: make codegen
22-
- name: Compile
23-
run: make linux
2422
- name: Run unit tests
2523
run: make test
2624
- name: Run end-2-end tests

.github/workflows/run_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v2
1515
- uses: actions/setup-go@v2
1616
with:
17-
go-version: "^1.17.4"
17+
go-version: "^1.19.8"
1818
- name: Make dependencies
1919
run: make deps mocks
2020
- name: Compile

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ coverage.xml
9595

9696
# e2e tests
9797
e2e/manifests
98+
e2e/tls
9899

99100
# Translations
100101
*.mo

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) 2022 Zalando SE
3+
Copyright (c) 2023 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

Makefile

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: clean local test linux macos mocks docker push scm-source.json e2e
1+
.PHONY: clean local test linux macos mocks docker push e2e
22

33
BINARY ?= postgres-operator
44
BUILD_FLAGS ?= -v
@@ -48,7 +48,7 @@ SHELL := env PATH=$(PATH) $(SHELL)
4848
default: local
4949

5050
clean:
51-
rm -rf build scm-source.json
51+
rm -rf build
5252

5353
local: ${SOURCES}
5454
hack/verify-codegen.sh
@@ -60,32 +60,25 @@ linux: ${SOURCES}
6060
macos: ${SOURCES}
6161
GOOS=darwin GOARCH=amd64 CGO_ENABLED=${CGO_ENABLED} go build -o build/macos/${BINARY} ${BUILD_FLAGS} -ldflags "$(LDFLAGS)" $^
6262

63-
docker-context: scm-source.json linux
64-
mkdir -p docker/build/
65-
cp build/linux/${BINARY} scm-source.json docker/build/
66-
67-
docker: ${DOCKERDIR}/${DOCKERFILE} docker-context
63+
docker: ${DOCKERDIR}/${DOCKERFILE}
6864
echo `(env)`
6965
echo "Tag ${TAG}"
7066
echo "Version ${VERSION}"
7167
echo "CDP tag ${CDP_TAG}"
7268
echo "git describe $(shell git describe --tags --always --dirty)"
73-
cd "${DOCKERDIR}" && docker build --rm -t "$(IMAGE):$(TAG)$(CDP_TAG)$(DEBUG_FRESH)$(DEBUG_POSTFIX)" -f "${DOCKERFILE}" .
69+
docker build --rm -t "$(IMAGE):$(TAG)$(CDP_TAG)$(DEBUG_FRESH)$(DEBUG_POSTFIX)" -f "${DOCKERDIR}/${DOCKERFILE}" --build-arg VERSION="${VERSION}" .
7470

7571
indocker-race:
76-
docker run --rm -v "${GOPATH}":"${GOPATH}" -e GOPATH="${GOPATH}" -e RACE=1 -w ${PWD} golang:1.18.9 bash -c "make linux"
72+
docker run --rm -v "${GOPATH}":"${GOPATH}" -e GOPATH="${GOPATH}" -e RACE=1 -w ${PWD} golang:1.19.8 bash -c "make linux"
7773

7874
push:
7975
docker push "$(IMAGE):$(TAG)$(CDP_TAG)"
8076

81-
scm-source.json: .git
82-
echo '{\n "url": "git:$(GITURL)",\n "revision": "$(GITHEAD)",\n "author": "$(USER)",\n "status": "$(GITSTATUS)"\n}' > scm-source.json
83-
8477
mocks:
8578
GO111MODULE=on go generate ./...
8679

8780
tools:
88-
GO111MODULE=on go get -d k8s.io/client-go@kubernetes-1.23.5
81+
GO111MODULE=on go get -d k8s.io/client-go@kubernetes-1.25.9
8982
GO111MODULE=on go install github.com/golang/mock/[email protected]
9083
GO111MODULE=on go mod tidy
9184

README.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
CPO (CYBERTEC PG Operator) allows you to create and run PostgreSQL clusters on Kubernetes.
44

55
The operator reduces your efforts and simplifies the administration of your PostgreSQL clusters so that you can concentrate on other things.
6+
# CYBERTEC PG Operator
7+
8+
CPO (CYBERTEC PG Operator) allows you to create and run PostgreSQL clusters on Kubernetes.
9+
10+
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">
12+
13+
The Postgres Operator delivers an easy to run highly-available [PostgreSQL](https://www.postgresql.org/)
14+
clusters on Kubernetes (K8s) powered by [Patroni](https://github.com/zalando/patroni).
15+
It is configured only through Postgres manifests (CRDs) to ease integration into automated CI/CD
16+
pipelines with no access to Kubernetes API directly, promoting infrastructure as code vs manual operations.
617

718
### Operator features
819

@@ -22,6 +33,76 @@ The operator reduces your efforts and simplifies the administration of your Post
2233

2334
### PostgreSQL features
2435

36+
* Supports PostgreSQL 15, starting from 10+
37+
* Streaming replication cluster via Patroni
38+
* Point-In-Time-Recovery with
39+
[pg_basebackup](https://www.postgresql.org/docs/11/app-pgbasebackup.html) /
40+
[WAL-E](https://github.com/wal-e/wal-e) via [Spilo](https://github.com/zalando/spilo)
41+
* Preload libraries: [bg_mon](https://github.com/CyberDem0n/bg_mon),
42+
[pg_stat_statements](https://www.postgresql.org/docs/15/pgstatstatements.html),
43+
[pgextwlist](https://github.com/dimitri/pgextwlist),
44+
[pg_auth_mon](https://github.com/RafiaSabih/pg_auth_mon)
45+
* Incl. popular Postgres extensions such as
46+
[decoderbufs](https://github.com/debezium/postgres-decoderbufs),
47+
[hypopg](https://github.com/HypoPG/hypopg),
48+
[pg_cron](https://github.com/citusdata/pg_cron),
49+
[pg_partman](https://github.com/pgpartman/pg_partman),
50+
[pg_stat_kcache](https://github.com/powa-team/pg_stat_kcache),
51+
[pgq](https://github.com/pgq/pgq),
52+
[plpgsql_check](https://github.com/okbob/plpgsql_check),
53+
[postgis](https://postgis.net/),
54+
[set_user](https://github.com/pgaudit/set_user) and
55+
[timescaledb](https://github.com/timescale/timescaledb)
56+
57+
The Postgres Operator has been developed at Zalando and is being used in
58+
production for over five years.
59+
60+
## Supported Postgres & K8s versions
61+
62+
| Release | Postgres versions | K8s versions | Golang |
63+
| :-------- | :---------------: | :---------------: | :-----: |
64+
| v1.10.* | 10 &rarr; 15 | 1.21+ | 1.19.8 |
65+
| v1.9.0 | 10 &rarr; 15 | 1.21+ | 1.18.9 |
66+
| v1.8.* | 9.5 &rarr; 14 | 1.20 &rarr; 1.24 | 1.17.4 |
67+
| v1.7.1 | 9.5 &rarr; 14 | 1.20 &rarr; 1.24 | 1.16.9 |
68+
69+
* Integrated backup solution, automatic backups and very easy restore (snapshot & PITR)
70+
* Rolling update procedure for adjustments to the pods and minor updates
71+
* Major upgrade with minimum interruption time
72+
* Reduction of downtime thanks to redundancy, pod anti-affinity, auto-failover and self-healing
73+
* Supports PostgreSQL 15, starting from 10+
74+
* Streaming replication cluster via Patroni
75+
* Point-In-Time-Recovery with
76+
[pg_basebackup](https://www.postgresql.org/docs/11/app-pgbasebackup.html) /
77+
[WAL-E](https://github.com/wal-e/wal-e) via [Spilo](https://github.com/zalando/spilo)
78+
* Preload libraries: [bg_mon](https://github.com/CyberDem0n/bg_mon),
79+
[pg_stat_statements](https://www.postgresql.org/docs/15/pgstatstatements.html),
80+
[pgextwlist](https://github.com/dimitri/pgextwlist),
81+
[pg_auth_mon](https://github.com/RafiaSabih/pg_auth_mon)
82+
* Incl. popular Postgres extensions such as
83+
[decoderbufs](https://github.com/debezium/postgres-decoderbufs),
84+
[hypopg](https://github.com/HypoPG/hypopg),
85+
[pg_cron](https://github.com/citusdata/pg_cron),
86+
[pg_partman](https://github.com/pgpartman/pg_partman),
87+
[pg_stat_kcache](https://github.com/powa-team/pg_stat_kcache),
88+
[pgq](https://github.com/pgq/pgq),
89+
[plpgsql_check](https://github.com/okbob/plpgsql_check),
90+
[postgis](https://postgis.net/),
91+
[set_user](https://github.com/pgaudit/set_user) and
92+
[timescaledb](https://github.com/timescale/timescaledb)
93+
94+
The Postgres Operator has been developed at Zalando and is being used in
95+
production for over five years.
96+
97+
## Supported Postgres & K8s versions
98+
99+
| Release | Postgres versions | K8s versions | Golang |
100+
| :-------- | :---------------: | :---------------: | :-----: |
101+
| v1.10.* | 10 &rarr; 15 | 1.25+ | 1.19.8 |
102+
| v1.9.0 | 10 &rarr; 15 | 1.25+ | 1.18.9 |
103+
| v1.8.* | 9.5 &rarr; 14 | 1.20 &rarr; 1.24 | 1.17.4 |
104+
| v1.7.1 | 9.5 &rarr; 14 | 1.20 &rarr; 1.24 | 1.16.9 |
105+
25106
* Integrated backup solution, automatic backups and very easy restore (snapshot & PITR)
26107
* Rolling update procedure for adjustments to the pods and minor updates
27108
* Major upgrade with minimum interruption time

charts/postgres-operator-ui/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: postgres-operator-ui
3-
version: 1.9.0
4-
appVersion: 1.9.0
3+
version: 1.10.1
4+
appVersion: 1.10.1
55
home: https://github.com/zalando/postgres-operator
66
description: Postgres Operator UI provides a graphical interface for a convenient database-as-a-service user experience
77
keywords:

charts/postgres-operator-ui/index.yaml

Lines changed: 53 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,55 @@
11
apiVersion: v1
22
entries:
33
postgres-operator-ui:
4+
- apiVersion: v2
5+
appVersion: 1.10.1
6+
created: "2023-09-07T16:27:29.490678409+02:00"
7+
description: Postgres Operator UI provides a graphical interface for a convenient
8+
database-as-a-service user experience
9+
digest: 2e5e7a82aebee519ec57c6243eb8735124aa4585a3a19c66ffd69638fbeb11ce
10+
home: https://github.com/zalando/postgres-operator
11+
keywords:
12+
- postgres
13+
- operator
14+
- ui
15+
- cloud-native
16+
- patroni
17+
- spilo
18+
maintainers:
19+
20+
name: Zalando
21+
name: postgres-operator-ui
22+
sources:
23+
- https://github.com/zalando/postgres-operator
24+
urls:
25+
- postgres-operator-ui-1.10.1.tgz
26+
version: 1.10.1
27+
- apiVersion: v2
28+
appVersion: 1.10.0
29+
created: "2023-09-07T16:27:29.489712628+02:00"
30+
description: Postgres Operator UI provides a graphical interface for a convenient
31+
database-as-a-service user experience
32+
digest: 47413650e3188539ae778a601998efa2c4f80b8aa16e3668a2fc7b72e014b605
33+
home: https://github.com/zalando/postgres-operator
34+
keywords:
35+
- postgres
36+
- operator
37+
- ui
38+
- cloud-native
39+
- patroni
40+
- spilo
41+
maintainers:
42+
43+
name: Zalando
44+
name: postgres-operator-ui
45+
sources:
46+
- https://github.com/zalando/postgres-operator
47+
urls:
48+
- postgres-operator-ui-1.10.0.tgz
49+
version: 1.10.0
450
- apiVersion: v2
551
appVersion: 1.9.0
6-
created: "2023-01-17T15:45:57.564334046+01:00"
52+
created: "2023-09-07T16:27:29.506671133+02:00"
753
description: Postgres Operator UI provides a graphical interface for a convenient
854
database-as-a-service user experience
955
digest: df434af6c8b697fe0631017ecc25e3c79e125361ae6622347cea41a545153bdc
@@ -26,7 +72,7 @@ entries:
2672
version: 1.9.0
2773
- apiVersion: v2
2874
appVersion: 1.8.2
29-
created: "2023-01-17T15:45:57.562574292+01:00"
75+
created: "2023-09-07T16:27:29.505718885+02:00"
3076
description: Postgres Operator UI provides a graphical interface for a convenient
3177
database-as-a-service user experience
3278
digest: fbfc90fa8fd007a08a7c02e0ec9108bb8282cbb42b8c976d88f2193d6edff30c
@@ -49,7 +95,7 @@ entries:
4995
version: 1.8.2
5096
- apiVersion: v2
5197
appVersion: 1.8.1
52-
created: "2023-01-17T15:45:57.561981294+01:00"
98+
created: "2023-09-07T16:27:29.504804961+02:00"
5399
description: Postgres Operator UI provides a graphical interface for a convenient
54100
database-as-a-service user experience
55101
digest: d26342e385ea51a0fbfbe23477999863e9489664ae803ea5c56da8897db84d24
@@ -72,7 +118,7 @@ entries:
72118
version: 1.8.1
73119
- apiVersion: v1
74120
appVersion: 1.8.0
75-
created: "2023-01-17T15:45:57.561383172+01:00"
121+
created: "2023-09-07T16:27:29.503862231+02:00"
76122
description: Postgres Operator UI provides a graphical interface for a convenient
77123
database-as-a-service user experience
78124
digest: d4a7b40c23fd167841cc28342afdbd5ecc809181913a5c31061c83139187f148
@@ -95,7 +141,7 @@ entries:
95141
version: 1.8.0
96142
- apiVersion: v1
97143
appVersion: 1.7.1
98-
created: "2023-01-17T15:45:57.560738084+01:00"
144+
created: "2023-09-07T16:27:29.502938358+02:00"
99145
description: Postgres Operator UI provides a graphical interface for a convenient
100146
database-as-a-service user experience
101147
digest: 97aed1a1d37cd5f8441eea9522f38e56cc829786ad2134c437a5e6a15c995869
@@ -118,7 +164,7 @@ entries:
118164
version: 1.7.1
119165
- apiVersion: v1
120166
appVersion: 1.7.0
121-
created: "2023-01-17T15:45:57.560150807+01:00"
167+
created: "2023-09-07T16:27:29.494088829+02:00"
122168
description: Postgres Operator UI provides a graphical interface for a convenient
123169
database-as-a-service user experience
124170
digest: 37fba1968347daad393dbd1c6ee6e5b6a24d1095f972c0102197531c62dcada8
@@ -139,4 +185,4 @@ entries:
139185
urls:
140186
- postgres-operator-ui-1.7.0.tgz
141187
version: 1.7.0
142-
generated: "2023-01-17T15:45:57.558968127+01:00"
188+
generated: "2023-09-07T16:27:29.488457568+02:00"

0 commit comments

Comments
 (0)