Skip to content

Commit a5663da

Browse files
jopadiFxKu
andauthored
add the pg version 16 (#2557)
* add the pg version 16 * add comma after pg16 in crds api * change minimal_major_version to 12 * add new spilo image for pg16 * edit the registry from current and lazy spilo * Update e2e/run.sh Co-authored-by: Felix Kunde <[email protected]> * Update README.md Co-authored-by: Felix Kunde <[email protected]> * add pg 11 to be compatible for the existing DBs * update pq, pyyaml,k8s and kind version * skip test_infrastructure_roles * skip another test * remove the skipping * adjust the verification of new Patroni version states --------- Co-authored-by: Felix Kunde <[email protected]>
1 parent 8bd9080 commit a5663da

34 files changed

+79
-88
lines changed

README.md

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

3030
### PostgreSQL features
3131

32-
* Supports PostgreSQL 15, starting from 10+
32+
* Supports PostgreSQL 16, starting from 11+
3333
* Streaming replication cluster via Patroni
3434
* Point-In-Time-Recovery with
35-
[pg_basebackup](https://www.postgresql.org/docs/11/app-pgbasebackup.html) /
35+
[pg_basebackup](https://www.postgresql.org/docs/16/app-pgbasebackup.html) /
3636
[WAL-E](https://github.com/wal-e/wal-e) via [Spilo](https://github.com/zalando/spilo)
3737
* Preload libraries: [bg_mon](https://github.com/CyberDem0n/bg_mon),
38-
[pg_stat_statements](https://www.postgresql.org/docs/15/pgstatstatements.html),
38+
[pg_stat_statements](https://www.postgresql.org/docs/16/pgstatstatements.html),
3939
[pgextwlist](https://github.com/dimitri/pgextwlist),
4040
[pg_auth_mon](https://github.com/RafiaSabih/pg_auth_mon)
4141
* Incl. popular Postgres extensions such as

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ spec:
8888
"15",
8989
"14",
9090
"13",
91-
"12",
92-
"11"
91+
"12"
9392
]
9493
}
9594
{{- 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-15:3.0-p1"
71+
default: "ghcr.io/zalando/spilo-16:3.2-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: "11"
170+
default: "12"
171171
target_major_version:
172172
type: string
173-
default: "15"
173+
default: "16"
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
@@ -371,12 +371,12 @@ spec:
371371
version:
372372
type: string
373373
enum:
374-
- "10"
375374
- "11"
376375
- "12"
377376
- "13"
378377
- "14"
379378
- "15"
379+
- "16"
380380
parameters:
381381
type: object
382382
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-15:3.0-p1
41+
docker_image: ghcr.io/zalando/spilo-16:3.2-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: "11"
92+
minimal_major_version: "12"
9393
# target Postgres major version when upgrading clusters automatically
94-
target_major_version: "15"
94+
target_major_version: "16"
9595

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

docker/logical-backup/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ RUN apt-get update \
3030
postgresql-client-14 \
3131
postgresql-client-13 \
3232
postgresql-client-12 \
33-
postgresql-client-11 \
3433
&& apt-get clean \
3534
&& rm -rf /var/lib/apt/lists/*
3635

docs/administrator.md

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

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

docs/reference/cluster_manifest.md

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

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

docs/reference/operator_parameters.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,12 @@ CRD-configuration, they are grouped under the `major_version_upgrade` key.
250250

251251
* **minimal_major_version**
252252
The minimal Postgres major version that will not automatically be upgraded
253-
when `major_version_upgrade_mode` is set to `"full"`. The default is `"11"`.
253+
when `major_version_upgrade_mode` is set to `"full"`. The default is `"12"`.
254254

255255
* **target_major_version**
256256
The target Postgres major version when upgrading clusters automatically
257257
which violate the configured allowed `minimal_major_version` when
258-
`major_version_upgrade_mode` is set to `"full"`. The default is `"15"`.
258+
`major_version_upgrade_mode` is set to `"full"`. The default is `"16"`.
259259

260260
## Kubernetes resources
261261

docs/user.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ spec:
3030
databases:
3131
foo: zalando
3232
postgresql:
33-
version: "15"
33+
version: "16"
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: "15"
112+
version: "16"
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/15/sql-alterdefaultprivileges.html)
520+
become the owner with the `SET ROLE` command. [Default privileges](https://www.postgresql.org/docs/16/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/15/ddl-schemas.html#DDL-SCHEMAS-PATH)
597+
The schema [`search_path`](https://www.postgresql.org/docs/16/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/15/kernel-resources.html#LINUX-HUGEPAGES).
698+
The operator supports [HugePages](https://www.postgresql.org/docs/16/kernel-resources.html#LINUX-HUGEPAGES).
699699
To enable HugePages, set the matching resource requests and/or limits in the manifest:
700700

701701
```yaml
@@ -758,7 +758,7 @@ If you need to define a `nodeAffinity` for all your Postgres clusters use the
758758
## In-place major version upgrade
759759

760760
Starting with Spilo 13, operator supports in-place major version upgrade to a
761-
higher major version (e.g. from PG 10 to PG 13). To trigger the upgrade,
761+
higher major version (e.g. from PG 11 to PG 13). To trigger the upgrade,
762762
simply increase the version in the manifest. It is your responsibility to test
763763
your applications against the new version before the upgrade; downgrading is
764764
not supported. The easiest way to do so is to try the upgrade on the cloned
@@ -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/15/app-pgbasebackup.html). To
841+
[pg_basebackup](https://www.postgresql.org/docs/16/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)