Skip to content

Commit ab25fb2

Browse files
authored
make Postgres 14 available (zalando#1636)
* make Postgres 14 available * don't be too hard to 9.5 * bump Spilo image and more docs updates * update e2e test upgrading to 14
1 parent f7b221d commit ab25fb2

23 files changed

+52
-58
lines changed

README.md

Lines changed: 5 additions & 10 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 13, starting from 9.6+
32+
* Supports PostgreSQL 14, starting from 9.6+
3333
* Streaming replication cluster via Patroni
3434
* Point-In-Time-Recovery with
3535
[pg_basebackup](https://www.postgresql.org/docs/11/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/9.4/pgstatstatements.html),
38+
[pg_stat_statements](https://www.postgresql.org/docs/14/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
@@ -53,20 +53,15 @@ pipelines with no access to Kubernetes API directly, promoting infrastructure as
5353
The Postgres Operator has been developed at Zalando and is being used in
5454
production for over three years.
5555

56-
## Notes on Postgres 13 support
57-
58-
If you are new to the operator, you can skip this and just start using the Postgres operator as is, Postgres 13 is ready to go.
59-
60-
The Postgres operator supports Postgres 13 with the new Spilo Image that includes also the recent Patroni version to support PG13 settings.
61-
More work on optimizing restarts and rolling upgrades is pending.
56+
## Using Spilo 12 images or lower
6257

6358
If you are already using the Postgres operator in older version with a Spilo 12 Docker image you need to be aware of the changes for the backup path.
64-
We introduce the major version into the backup path to smoothen the [major version upgrade](docs/administrator.md#minor-and-major-version-upgrade) that is now supported manually.
59+
We introduce the major version into the backup path to smoothen the [major version upgrade](docs/administrator.md#minor-and-major-version-upgrade) that is now supported.
6560

6661
The new operator configuration can set a compatibility flag *enable_spilo_wal_path_compat* to make Spilo look for wal segments in the current path but also old format paths.
6762
This comes at potential performance costs and should be disabled after a few days.
6863

69-
The newest Spilo 13 image is: `registry.opensource.zalan.do/acid/spilo-13:2.1-p1`
64+
The newest Spilo image is: `registry.opensource.zalan.do/acid/spilo-14:2.1-p2`
7065

7166
The last Spilo 12 image is: `registry.opensource.zalan.do/acid/spilo-12:1.6-p5`
7267

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ spec:
7171
"resources_visible": true,
7272
"users_visible": true,
7373
"postgresql_versions": [
74+
"14",
7475
"13",
7576
"12",
7677
"11"

charts/postgres-operator/crds/operatorconfigurations.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ spec:
6565
properties:
6666
docker_image:
6767
type: string
68-
default: "registry.opensource.zalan.do/acid/spilo-13:2.1-p1"
68+
default: "registry.opensource.zalan.do/acid/spilo-14:2.1-p2"
6969
enable_crd_validation:
7070
type: boolean
7171
default: true
@@ -135,10 +135,10 @@ spec:
135135
default: "off"
136136
minimal_major_version:
137137
type: string
138-
default: "9.5"
138+
default: "9.6"
139139
target_major_version:
140140
type: string
141-
default: "13"
141+
default: "14"
142142
kubernetes:
143143
type: object
144144
properties:

charts/postgres-operator/crds/postgresqls.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,14 +362,13 @@ spec:
362362
version:
363363
type: string
364364
enum:
365-
- "9.3"
366-
- "9.4"
367365
- "9.5"
368366
- "9.6"
369367
- "10"
370368
- "11"
371369
- "12"
372370
- "13"
371+
- "14"
373372
parameters:
374373
type: object
375374
additionalProperties:

charts/postgres-operator/values.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ configGeneral:
2828
enable_pgversion_env_var: true
2929
# start any new database pod without limitations on shm memory
3030
enable_shm_volume: true
31-
# enables backwards compatible path between Spilo 12 and Spilo 13 images
31+
# enables backwards compatible path between Spilo 12 and Spilo 13+ images
3232
enable_spilo_wal_path_compat: false
3333
# etcd connection string for Patroni. Empty uses K8s-native DCS.
3434
etcd_host: ""
3535
# Select if setup uses endpoints (default), or configmaps to manage leader (DCS=k8s)
3636
# kubernetes_use_configmaps: false
3737
# Spilo docker image
38-
docker_image: registry.opensource.zalan.do/acid/spilo-13:2.1-p1
38+
docker_image: registry.opensource.zalan.do/acid/spilo-14:2.1-p2
3939
# min number of instances in Postgres cluster. -1 = no limit
4040
min_instances: -1
4141
# max number of instances in Postgres cluster. -1 = no limit
@@ -65,9 +65,9 @@ configMajorVersionUpgrade:
6565
# "off": no upgrade, "manual": manifest triggers action, "full": minimal version violation triggers too
6666
major_version_upgrade_mode: "off"
6767
# minimal Postgres major version that will not automatically be upgraded
68-
minimal_major_version: "9.5"
68+
minimal_major_version: "9.6"
6969
# target Postgres major version when upgrading clusters automatically
70-
target_major_version: "13"
70+
target_major_version: "14"
7171

7272
configKubernetes:
7373
# list of additional capabilities for postgres container

docs/reference/operator_parameters.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Those are top-level keys, containing both leaf keys and groups.
8383
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`.
8484

8585
* **enable_spilo_wal_path_compat**
86-
enables backwards compatible path between Spilo 12 and Spilo 13 images. The default is `false`.
86+
enables backwards compatible path between Spilo 12 and Spilo 13+ images. The default is `false`.
8787

8888
* **etcd_host**
8989
Etcd connection string for Patroni defined as `host:port`. Not required when
@@ -186,12 +186,12 @@ CRD-configuration, they are grouped under the `major_version_upgrade` key.
186186

187187
* **minimal_major_version**
188188
The minimal Postgres major version that will not automatically be upgraded
189-
when `major_version_upgrade_mode` is set to `"full"`. The default is `"9.5"`.
189+
when `major_version_upgrade_mode` is set to `"full"`. The default is `"9.6"`.
190190

191191
* **target_major_version**
192192
The target Postgres major version when upgrading clusters automatically
193193
which violate the configured allowed `minimal_major_version` when
194-
`major_version_upgrade_mode` is set to `"full"`. The default is `"13"`.
194+
`major_version_upgrade_mode` is set to `"full"`. The default is `"14"`.
195195

196196
## Kubernetes resources
197197

docs/user.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ spec:
3030
databases:
3131
foo: zalando
3232
postgresql:
33-
version: "13"
33+
version: "14"
3434
```
3535
3636
Once you cloned the Postgres Operator [repository](https://github.com/zalando/postgres-operator)
@@ -702,7 +702,7 @@ spec:
702702
## In-place major version upgrade
703703

704704
Starting with Spilo 13, operator supports in-place major version upgrade to a
705-
higher major version (e.g. from PG 10 to PG 12). To trigger the upgrade,
705+
higher major version (e.g. from PG 10 to PG 13). To trigger the upgrade,
706706
simply increase the version in the manifest. It is your responsibility to test
707707
your applications against the new version before the upgrade; downgrading is
708708
not supported. The easiest way to do so is to try the upgrade on the cloned

e2e/tests/test_e2e.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ def test_major_version_upgrade(self):
769769
pg_patch_version = {
770770
"spec": {
771771
"postgres": {
772-
"version": "13"
772+
"version": "14"
773773
}
774774
}
775775
}
@@ -778,12 +778,12 @@ def test_major_version_upgrade(self):
778778

779779
self.eventuallyEqual(lambda: k8s.get_operator_state(), {"0": "idle"}, "Operator does not get in sync")
780780

781-
def check_version_13():
781+
def check_version_14():
782782
p = k8s.get_patroni_state("acid-upgrade-test-0")
783783
version = p["server_version"][0:2]
784784
return version
785785

786-
self.evantuallyEqual(check_version_13, "13", "Version was not upgrade to 13")
786+
self.evantuallyEqual(check_version_14, "14", "Version was not upgrade to 14")
787787

788788
@timeout_decorator.timeout(TEST_TIMEOUT_SEC)
789789
def test_min_resource_limits(self):

manifests/complete-postgres-manifest.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
# "delete-date": "2020-08-31" # can only be deleted on that day if "delete-date "key is configured
1010
# "delete-clustername": "acid-test-cluster" # can only be deleted when name matches if "delete-clustername" key is configured
1111
spec:
12-
dockerImage: registry.opensource.zalan.do/acid/spilo-13:2.1-p1
12+
dockerImage: registry.opensource.zalan.do/acid/spilo-14:2.1-p2
1313
teamId: "acid"
1414
numberOfInstances: 2
1515
users: # Application/Robot users
@@ -36,7 +36,7 @@ spec:
3636
defaultRoles: true
3737
defaultUsers: false
3838
postgresql:
39-
version: "13"
39+
version: "14"
4040
parameters: # Expert section
4141
shared_buffers: "32MB"
4242
max_connections: "10"

manifests/configmap.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ data:
3232
# default_memory_request: 100Mi
3333
# delete_annotation_date_key: delete-date
3434
# delete_annotation_name_key: delete-clustername
35-
docker_image: registry.opensource.zalan.do/acid/spilo-13:2.1-p1
35+
docker_image: registry.opensource.zalan.do/acid/spilo-14:2.1-p2
3636
# downscaler_annotations: "deployment-time,downscaler/*"
3737
# enable_admin_role_for_users: "true"
3838
# enable_crd_validation: "true"
@@ -83,7 +83,7 @@ data:
8383
# min_instances: "-1"
8484
# min_cpu_limit: 250m
8585
# min_memory_limit: 250Mi
86-
# minimal_major_version: "9.5"
86+
# minimal_major_version: "9.6"
8787
# node_readiness_label: ""
8888
# oauth_token_secret_name: postgresql-operator
8989
# pam_configuration: |
@@ -124,7 +124,7 @@ data:
124124
spilo_privileged: "false"
125125
storage_resize_mode: "pvc"
126126
super_username: postgres
127-
# target_major_version: "13"
127+
# target_major_version: "14"
128128
# team_admin_role: "admin"
129129
# team_api_role_configuration: "log_statement:all"
130130
# teams_api_url: http://fake-teams-api.default.svc.cluster.local

0 commit comments

Comments
 (0)