Skip to content

Commit 470a1ea

Browse files
Add support for pg17 and remove pg12 (#2773)
* Add support for pg17 * use new gcov2lcov-action * Use ghcr spilo-17 * Update SPILO_CURRENT and SPILO_LAZY * Update e2e/run.sh --------- Co-authored-by: Polina Bungina <[email protected]>
1 parent 34df486 commit 470a1ea

33 files changed

+106
-108
lines changed

.github/workflows/run_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Run unit tests
2323
run: go test -race -covermode atomic -coverprofile=coverage.out ./...
2424
- name: Convert coverage to lcov
25-
uses: jandelgado/gcov2lcov-action@v1.0.9
25+
uses: jandelgado/gcov2lcov-action@v1.1.1
2626
- name: Coveralls
2727
uses: coverallsapp/github-action@master
2828
with:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ pipelines with no access to Kubernetes API directly, promoting infrastructure as
2828

2929
### PostgreSQL features
3030

31-
* Supports PostgreSQL 16, starting from 12+
31+
* Supports PostgreSQL 17, starting from 13+
3232
* Streaming replication cluster via Patroni
3333
* Point-In-Time-Recovery with
34-
[pg_basebackup](https://www.postgresql.org/docs/16/app-pgbasebackup.html) /
34+
[pg_basebackup](https://www.postgresql.org/docs/17/app-pgbasebackup.html) /
3535
[WAL-E](https://github.com/wal-e/wal-e) via [Spilo](https://github.com/zalando/spilo)
3636
* Preload libraries: [bg_mon](https://github.com/CyberDem0n/bg_mon),
37-
[pg_stat_statements](https://www.postgresql.org/docs/16/pgstatstatements.html),
37+
[pg_stat_statements](https://www.postgresql.org/docs/17/pgstatstatements.html),
3838
[pgextwlist](https://github.com/dimitri/pgextwlist),
3939
[pg_auth_mon](https://github.com/RafiaSabih/pg_auth_mon)
4040
* Incl. popular Postgres extensions such as

charts/postgres-operator-ui/templates/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ spec:
8484
"limit_iops": 16000,
8585
"limit_throughput": 1000,
8686
"postgresql_versions": [
87+
"17",
8788
"16",
8889
"15",
8990
"14",
90-
"13",
91-
"12"
91+
"13"
9292
]
9393
}
9494
{{- if .Values.extraEnvs }}

charts/postgres-operator/crds/operatorconfigurations.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ spec:
6868
type: string
6969
docker_image:
7070
type: string
71-
default: "ghcr.io/zalando/spilo-16:3.3-p1"
71+
default: "ghcr.io/zalando/spilo-17:4.0-p2"
7272
enable_crd_registration:
7373
type: boolean
7474
default: true
@@ -167,10 +167,10 @@ spec:
167167
type: string
168168
minimal_major_version:
169169
type: string
170-
default: "12"
170+
default: "13"
171171
target_major_version:
172172
type: string
173-
default: "16"
173+
default: "17"
174174
kubernetes:
175175
type: object
176176
properties:

charts/postgres-operator/crds/postgresqls.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,11 @@ spec:
375375
version:
376376
type: string
377377
enum:
378-
- "12"
379378
- "13"
380379
- "14"
381380
- "15"
382381
- "16"
382+
- "17"
383383
parameters:
384384
type: object
385385
additionalProperties:

charts/postgres-operator/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ configGeneral:
3838
# etcd connection string for Patroni. Empty uses K8s-native DCS.
3939
etcd_host: ""
4040
# Spilo docker image
41-
docker_image: ghcr.io/zalando/spilo-16:3.3-p1
41+
docker_image: ghcr.io/zalando/spilo-17:4.0-p2
4242

4343
# key name for annotation to ignore globally configured instance limits
4444
# ignore_instance_limits_annotation_key: ""
@@ -89,9 +89,9 @@ configMajorVersionUpgrade:
8989
# - acid
9090

9191
# minimal Postgres major version that will not automatically be upgraded
92-
minimal_major_version: "12"
92+
minimal_major_version: "13"
9393
# target Postgres major version when upgrading clusters automatically
94-
target_major_version: "16"
94+
target_major_version: "17"
9595

9696
configKubernetes:
9797
# list of additional capabilities for postgres container

docs/administrator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ aws_or_gcp:
12971297

12981298
If cluster members have to be (re)initialized restoring physical backups
12991299
happens automatically either from the backup location or by running
1300-
[pg_basebackup](https://www.postgresql.org/docs/16/app-pgbasebackup.html)
1300+
[pg_basebackup](https://www.postgresql.org/docs/17/app-pgbasebackup.html)
13011301
on one of the other running instances (preferably replicas if they do not lag
13021302
behind). You can test restoring backups by [cloning](user.md#how-to-clone-an-existing-postgresql-cluster)
13031303
clusters.

docs/reference/cluster_manifest.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ the global configuration before adding the `tls` section'.
638638
## Change data capture streams
639639

640640
This sections enables change data capture (CDC) streams via Postgres'
641-
[logical decoding](https://www.postgresql.org/docs/16/logicaldecoding.html)
641+
[logical decoding](https://www.postgresql.org/docs/17/logicaldecoding.html)
642642
feature and `pgoutput` plugin. While the Postgres operator takes responsibility
643643
for providing the setup to publish change events, it relies on external tools
644644
to consume them. At Zalando, we are using a workflow based on
@@ -671,7 +671,7 @@ can have the following properties:
671671
The CDC operator is following the [outbox pattern](https://debezium.io/blog/2019/02/19/reliable-microservices-data-exchange-with-the-outbox-pattern/).
672672
The application is responsible for putting events into a (JSON/B or VARCHAR)
673673
payload column of the outbox table in the structure of the specified target
674-
event type. The operator will create a [PUBLICATION](https://www.postgresql.org/docs/16/logical-replication-publication.html)
674+
event type. The operator will create a [PUBLICATION](https://www.postgresql.org/docs/17/logical-replication-publication.html)
675675
in Postgres for all tables specified for one `database` and `applicationId`.
676676
The CDC operator will consume from it shortly after transactions are
677677
committed to the outbox table. The `idColumn` will be used in telemetry for

docs/reference/operator_parameters.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ Those are top-level keys, containing both leaf keys and groups.
9494
* **enable_pgversion_env_var**
9595
With newer versions of Spilo, it is preferable to use `PGVERSION` pod environment variable instead of the setting `postgresql.bin_dir` in the `SPILO_CONFIGURATION` env variable. When this option is true, the operator sets `PGVERSION` and omits `postgresql.bin_dir` from `SPILO_CONFIGURATION`. When false, the `postgresql.bin_dir` is set. This setting takes precedence over `PGVERSION`; see PR 222 in Spilo. The default is `true`.
9696

97-
* **enable_spilo_wal_path_compat**
98-
enables backwards compatible path between Spilo 12 and Spilo 13+ images. The default is `false`.
99-
10097
* **enable_team_id_clustername_prefix**
10198
To lower the risk of name clashes between clusters of different teams you
10299
can turn on this flag and the operator will sync only clusters where the
@@ -250,12 +247,12 @@ CRD-configuration, they are grouped under the `major_version_upgrade` key.
250247

251248
* **minimal_major_version**
252249
The minimal Postgres major version that will not automatically be upgraded
253-
when `major_version_upgrade_mode` is set to `"full"`. The default is `"12"`.
250+
when `major_version_upgrade_mode` is set to `"full"`. The default is `"13"`.
254251

255252
* **target_major_version**
256253
The target Postgres major version when upgrading clusters automatically
257254
which violate the configured allowed `minimal_major_version` when
258-
`major_version_upgrade_mode` is set to `"full"`. The default is `"16"`.
255+
`major_version_upgrade_mode` is set to `"full"`. The default is `"17"`.
259256

260257
## Kubernetes resources
261258

docs/user.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ spec:
3030
databases:
3131
foo: zalando
3232
postgresql:
33-
version: "16"
33+
version: "17"
3434
```
3535
3636
Once you cloned the Postgres Operator [repository](https://github.com/zalando/postgres-operator)
@@ -109,7 +109,7 @@ metadata:
109109
spec:
110110
[...]
111111
postgresql:
112-
version: "16"
112+
version: "17"
113113
parameters:
114114
password_encryption: scram-sha-256
115115
```
@@ -517,7 +517,7 @@ Postgres Operator will create the following NOLOGIN roles:
517517

518518
The `<dbname>_owner` role is the database owner and should be used when creating
519519
new database objects. All members of the `admin` role, e.g. teams API roles, can
520-
become the owner with the `SET ROLE` command. [Default privileges](https://www.postgresql.org/docs/16/sql-alterdefaultprivileges.html)
520+
become the owner with the `SET ROLE` command. [Default privileges](https://www.postgresql.org/docs/17/sql-alterdefaultprivileges.html)
521521
are configured for the owner role so that the `<dbname>_reader` role
522522
automatically gets read-access (SELECT) to new tables and sequences and the
523523
`<dbname>_writer` receives write-access (INSERT, UPDATE, DELETE on tables,
@@ -594,7 +594,7 @@ spec:
594594

595595
### Schema `search_path` for default roles
596596

597-
The schema [`search_path`](https://www.postgresql.org/docs/16/ddl-schemas.html#DDL-SCHEMAS-PATH)
597+
The schema [`search_path`](https://www.postgresql.org/docs/17/ddl-schemas.html#DDL-SCHEMAS-PATH)
598598
for each role will include the role name and the schemas, this role should have
599599
access to. So `foo_bar_writer` does not have to schema-qualify tables from
600600
schemas `foo_bar_writer, bar`, while `foo_writer` can look up `foo_writer` and
@@ -695,7 +695,7 @@ handle it.
695695

696696
### HugePages support
697697

698-
The operator supports [HugePages](https://www.postgresql.org/docs/16/kernel-resources.html#LINUX-HUGEPAGES).
698+
The operator supports [HugePages](https://www.postgresql.org/docs/17/kernel-resources.html#LINUX-HUGEPAGES).
699699
To enable HugePages, set the matching resource requests and/or limits in the manifest:
700700

701701
```yaml
@@ -838,7 +838,7 @@ spec:
838838
### Clone directly
839839

840840
Another way to get a fresh copy of your source DB cluster is via
841-
[pg_basebackup](https://www.postgresql.org/docs/16/app-pgbasebackup.html). To
841+
[pg_basebackup](https://www.postgresql.org/docs/17/app-pgbasebackup.html). To
842842
use this feature simply leave out the timestamp field from the clone section.
843843
The operator will connect to the service of the source cluster by name. If the
844844
cluster is called test, then the connection string will look like host=test

0 commit comments

Comments
 (0)