Skip to content

Commit b3d6398

Browse files
horspooknull
andauthored
K8SPG-648 add PG17 support (#921)
* K8SPG-648 add PG17 support * fix crds * fix merge * update to 17 images * update `controller-gen` to `0.16.5` * patroni v4 support * fix tests * fix tests * K8SPG-692: proper fix for patroni v4 https://perconadev.atlassian.net/browse/K8SPG-692 * fix bug * fix unit-tests * fix unit-test * small fixes * fix merge * small improvements * fix unit-test --------- Co-authored-by: Andrii Dema <[email protected]>
1 parent 9925b9b commit b3d6398

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+580
-217
lines changed

build/crd/crunchy/generated/postgres-operator.crunchydata.com_pgupgrades.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ spec:
964964
fromPostgresVersion:
965965
description: The major version of PostgreSQL before the upgrade.
966966
maximum: 17
967-
minimum: 10
967+
minimum: 12
968968
type: integer
969969
image:
970970
description: The image name to use for major PostgreSQL upgrades.
@@ -2513,7 +2513,7 @@ spec:
25132513
toPostgresVersion:
25142514
description: The major version of PostgreSQL to be upgraded to.
25152515
maximum: 17
2516-
minimum: 10
2516+
minimum: 13
25172517
type: integer
25182518
tolerations:
25192519
description: |-

build/crd/crunchy/generated/postgres-operator.crunchydata.com_postgresclusters.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14108,7 +14108,7 @@ spec:
1410814108
description: The major version of PostgreSQL installed in the PostgreSQL
1410914109
image
1411014110
maximum: 17
14111-
minimum: 10
14111+
minimum: 12
1411214112
type: integer
1411314113
proxy:
1411414114
description: The specification of a proxy that connects to PostgreSQL.

build/crd/percona/generated/pgv2.percona.com_perconapgclusters.yaml

+5-9
Original file line numberDiff line numberDiff line change
@@ -13724,7 +13724,7 @@ spec:
1372413724
postgresVersion:
1372513725
description: The major version of PostgreSQL installed in the PostgreSQL
1372613726
image
13727-
maximum: 16
13727+
maximum: 17
1372813728
minimum: 12
1372913729
type: integer
1373013730
proxy:
@@ -17513,6 +17513,8 @@ spec:
1751317513
items:
1751417514
type: string
1751517515
type: array
17516+
patroniVersion:
17517+
type: string
1751617518
pgbouncer:
1751717519
properties:
1751817520
ready:
@@ -17550,17 +17552,11 @@ spec:
1755017552
size:
1755117553
format: int32
1755217554
type: integer
17553-
required:
17554-
- instances
17555-
- ready
17556-
- size
17555+
version:
17556+
type: integer
1755717557
type: object
1755817558
state:
1755917559
type: string
17560-
required:
17561-
- pgbouncer
17562-
- postgres
17563-
- state
1756417560
type: object
1756517561
required:
1756617562
- metadata

build/crd/percona/generated/pgv2.percona.com_perconapgupgrades.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2515,7 +2515,7 @@ spec:
25152515
type: string
25162516
toPostgresVersion:
25172517
description: The major version of PostgreSQL to be upgraded to.
2518-
maximum: 16
2518+
maximum: 17
25192519
minimum: 13
25202520
type: integer
25212521
tolerations:

cmd/postgres-operator/main.go

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import (
2626
"sigs.k8s.io/controller-runtime/pkg/log/zap"
2727
"sigs.k8s.io/controller-runtime/pkg/manager"
2828

29-
//"github.com/percona/percona-postgresql-operator/internal/controller/pgupgrade"
3029
"github.com/percona/percona-postgresql-operator/internal/controller/pgupgrade"
3130
"github.com/percona/percona-postgresql-operator/internal/controller/postgrescluster"
3231
"github.com/percona/percona-postgresql-operator/internal/controller/runtime"

config/crd/bases/pgv2.percona.com_perconapgclusters.yaml

+6-10
Original file line numberDiff line numberDiff line change
@@ -14130,7 +14130,7 @@ spec:
1413014130
postgresVersion:
1413114131
description: The major version of PostgreSQL installed in the PostgreSQL
1413214132
image
14133-
maximum: 16
14133+
maximum: 17
1413414134
minimum: 12
1413514135
type: integer
1413614136
proxy:
@@ -17919,6 +17919,8 @@ spec:
1791917919
items:
1792017920
type: string
1792117921
type: array
17922+
patroniVersion:
17923+
type: string
1792217924
pgbouncer:
1792317925
properties:
1792417926
ready:
@@ -17956,17 +17958,11 @@ spec:
1795617958
size:
1795717959
format: int32
1795817960
type: integer
17959-
required:
17960-
- instances
17961-
- ready
17962-
- size
17961+
version:
17962+
type: integer
1796317963
type: object
1796417964
state:
1796517965
type: string
17966-
required:
17967-
- pgbouncer
17968-
- postgres
17969-
- state
1797017966
type: object
1797117967
required:
1797217968
- metadata
@@ -20591,7 +20587,7 @@ spec:
2059120587
type: string
2059220588
toPostgresVersion:
2059320589
description: The major version of PostgreSQL to be upgraded to.
20594-
maximum: 16
20590+
maximum: 17
2059520591
minimum: 13
2059620592
type: integer
2059720593
tolerations:

config/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ spec:
966966
fromPostgresVersion:
967967
description: The major version of PostgreSQL before the upgrade.
968968
maximum: 17
969-
minimum: 10
969+
minimum: 12
970970
type: integer
971971
image:
972972
description: The image name to use for major PostgreSQL upgrades.
@@ -2510,7 +2510,7 @@ spec:
25102510
toPostgresVersion:
25112511
description: The major version of PostgreSQL to be upgraded to.
25122512
maximum: 17
2513-
minimum: 10
2513+
minimum: 13
25142514
type: integer
25152515
tolerations:
25162516
description: |-

config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14050,7 +14050,7 @@ spec:
1405014050
description: The major version of PostgreSQL installed in the PostgreSQL
1405114051
image
1405214052
maximum: 17
14053-
minimum: 10
14053+
minimum: 12
1405414054
type: integer
1405514055
proxy:
1405614056
description: The specification of a proxy that connects to PostgreSQL.

config/rbac/cluster/role.yaml

+1-10
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ rules:
99
resources:
1010
- configmaps
1111
- persistentvolumeclaims
12+
- pods
1213
- secrets
1314
- serviceaccounts
1415
- services
@@ -46,16 +47,6 @@ rules:
4647
verbs:
4748
- create
4849
- patch
49-
- apiGroups:
50-
- ''
51-
resources:
52-
- pods
53-
verbs:
54-
- delete
55-
- get
56-
- list
57-
- patch
58-
- watch
5950
- apiGroups:
6051
- apps
6152
resources:

config/rbac/namespace/role.yaml

+1-10
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ rules:
99
resources:
1010
- configmaps
1111
- persistentvolumeclaims
12+
- pods
1213
- secrets
1314
- serviceaccounts
1415
- services
@@ -46,16 +47,6 @@ rules:
4647
verbs:
4748
- create
4849
- patch
49-
- apiGroups:
50-
- ''
51-
resources:
52-
- pods
53-
verbs:
54-
- delete
55-
- get
56-
- list
57-
- patch
58-
- watch
5950
- apiGroups:
6051
- apps
6152
resources:

deploy/bundle.yaml

+10-23
Original file line numberDiff line numberDiff line change
@@ -14423,7 +14423,7 @@ spec:
1442314423
postgresVersion:
1442414424
description: The major version of PostgreSQL installed in the PostgreSQL
1442514425
image
14426-
maximum: 16
14426+
maximum: 17
1442714427
minimum: 12
1442814428
type: integer
1442914429
proxy:
@@ -18212,6 +18212,8 @@ spec:
1821218212
items:
1821318213
type: string
1821418214
type: array
18215+
patroniVersion:
18216+
type: string
1821518217
pgbouncer:
1821618218
properties:
1821718219
ready:
@@ -18249,17 +18251,11 @@ spec:
1824918251
size:
1825018252
format: int32
1825118253
type: integer
18252-
required:
18253-
- instances
18254-
- ready
18255-
- size
18254+
version:
18255+
type: integer
1825618256
type: object
1825718257
state:
1825818258
type: string
18259-
required:
18260-
- pgbouncer
18261-
- postgres
18262-
- state
1826318259
type: object
1826418260
required:
1826518261
- metadata
@@ -20884,7 +20880,7 @@ spec:
2088420880
type: string
2088520881
toPostgresVersion:
2088620882
description: The major version of PostgreSQL to be upgraded to.
20887-
maximum: 16
20883+
maximum: 17
2088820884
minimum: 13
2088920885
type: integer
2089020886
tolerations:
@@ -23952,7 +23948,7 @@ spec:
2395223948
fromPostgresVersion:
2395323949
description: The major version of PostgreSQL before the upgrade.
2395423950
maximum: 17
23955-
minimum: 10
23951+
minimum: 12
2395623952
type: integer
2395723953
image:
2395823954
description: The image name to use for major PostgreSQL upgrades.
@@ -25496,7 +25492,7 @@ spec:
2549625492
toPostgresVersion:
2549725493
description: The major version of PostgreSQL to be upgraded to.
2549825494
maximum: 17
25499-
minimum: 10
25495+
minimum: 13
2550025496
type: integer
2550125497
tolerations:
2550225498
description: |-
@@ -39737,7 +39733,7 @@ spec:
3973739733
description: The major version of PostgreSQL installed in the PostgreSQL
3973839734
image
3973939735
maximum: 17
39740-
minimum: 10
39736+
minimum: 12
3974139737
type: integer
3974239738
proxy:
3974339739
description: The specification of a proxy that connects to PostgreSQL.
@@ -45706,6 +45702,7 @@ rules:
4570645702
resources:
4570745703
- configmaps
4570845704
- persistentvolumeclaims
45705+
- pods
4570945706
- secrets
4571045707
- serviceaccounts
4571145708
- services
@@ -45743,16 +45740,6 @@ rules:
4574345740
verbs:
4574445741
- create
4574545742
- patch
45746-
- apiGroups:
45747-
- ""
45748-
resources:
45749-
- pods
45750-
verbs:
45751-
- delete
45752-
- get
45753-
- list
45754-
- patch
45755-
- watch
4575645743
- apiGroups:
4575745744
- apps
4575845745
resources:

deploy/cr.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ spec:
120120
# test-label: value
121121

122122

123-
image: perconalab/percona-postgresql-operator:main-ppg16-postgres
123+
image: perconalab/percona-postgresql-operator:main-ppg17-postgres
124124
imagePullPolicy: Always
125-
postgresVersion: 16
125+
postgresVersion: 17
126126
# port: 5432
127127

128128
# expose:
@@ -236,7 +236,7 @@ spec:
236236
proxy:
237237
pgBouncer:
238238
replicas: 3
239-
image: perconalab/percona-postgresql-operator:main-ppg16-pgbouncer
239+
image: perconalab/percona-postgresql-operator:main-ppg17-pgbouncer
240240
# exposeSuperusers: true
241241
# resources:
242242
# limits:
@@ -318,7 +318,7 @@ spec:
318318
pgbackrest:
319319
# metadata:
320320
# labels:
321-
image: perconalab/percona-postgresql-operator:main-ppg16-pgbackrest
321+
image: perconalab/percona-postgresql-operator:main-ppg17-pgbackrest
322322
#
323323
# containers:
324324
# pgbackrest:

0 commit comments

Comments
 (0)