Skip to content

Commit 53693c4

Browse files
egeguneshors
andauthored
K8SPG-710: Make spec.backups optional (#1021)
* K8SPG-710: Make spec.backups optional * add backup-enable-disable test * fix unit tests * add backups.enabled field * address review comments --------- Co-authored-by: Viacheslav Sarzhan <[email protected]>
1 parent 69dbe04 commit 53693c4

32 files changed

+559
-52
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5084,8 +5084,6 @@ spec:
50845084
type: object
50855085
type: object
50865086
type: object
5087-
required:
5088-
- repos
50895087
type: object
50905088
snapshots:
50915089
description: VolumeSnapshot configuration
@@ -20503,7 +20501,6 @@ spec:
2050320501
- name
2050420502
x-kubernetes-list-type: map
2050520503
required:
20506-
- backups
2050720504
- instances
2050820505
- postgresVersion
2050920506
type: object

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ spec:
101101
type: string
102102
destination:
103103
type: string
104+
error:
105+
type: string
104106
image:
105107
type: string
106108
jobName:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ spec:
6464
backups:
6565
description: PostgreSQL backup configuration
6666
properties:
67+
enabled:
68+
type: boolean
6769
pgbackrest:
6870
description: pgBackRest archive configuration
6971
properties:
@@ -5246,8 +5248,6 @@ spec:
52465248
trackLatestRestorableTime:
52475249
description: Enable tracking latest restorable time
52485250
type: boolean
5249-
required:
5250-
- pgbackrest
52515251
type: object
52525252
crVersion:
52535253
description: |-

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ spec:
100100
type: string
101101
destination:
102102
type: string
103+
error:
104+
type: string
103105
image:
104106
type: string
105107
jobName:
@@ -469,6 +471,8 @@ spec:
469471
backups:
470472
description: PostgreSQL backup configuration
471473
properties:
474+
enabled:
475+
type: boolean
472476
pgbackrest:
473477
description: pgBackRest archive configuration
474478
properties:
@@ -5651,8 +5655,6 @@ spec:
56515655
trackLatestRestorableTime:
56525656
description: Enable tracking latest restorable time
56535657
type: boolean
5654-
required:
5655-
- pgbackrest
56565658
type: object
56575659
crVersion:
56585660
description: |-

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5074,8 +5074,6 @@ spec:
50745074
type: object
50755075
type: object
50765076
type: object
5077-
required:
5078-
- repos
50795077
type: object
50805078
snapshots:
50815079
description: VolumeSnapshot configuration
@@ -20401,7 +20399,6 @@ spec:
2040120399
- name
2040220400
x-kubernetes-list-type: map
2040320401
required:
20404-
- backups
2040520402
- instances
2040620403
- postgresVersion
2040720404
type: object

deploy/bundle.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,8 @@ spec:
395395
type: string
396396
destination:
397397
type: string
398+
error:
399+
type: string
398400
image:
399401
type: string
400402
jobName:
@@ -766,6 +768,8 @@ spec:
766768
backups:
767769
description: PostgreSQL backup configuration
768770
properties:
771+
enabled:
772+
type: boolean
769773
pgbackrest:
770774
description: pgBackRest archive configuration
771775
properties:
@@ -5948,8 +5952,6 @@ spec:
59485952
trackLatestRestorableTime:
59495953
description: Enable tracking latest restorable time
59505954
type: boolean
5951-
required:
5952-
- pgbackrest
59535955
type: object
59545956
crVersion:
59555957
description: |-
@@ -31571,8 +31573,6 @@ spec:
3157131573
type: object
3157231574
type: object
3157331575
type: object
31574-
required:
31575-
- repos
3157631576
type: object
3157731577
snapshots:
3157831578
description: VolumeSnapshot configuration
@@ -46898,7 +46898,6 @@ spec:
4689846898
- name
4689946899
x-kubernetes-list-type: map
4690046900
required:
46901-
- backups
4690246901
- instances
4690346902
- postgresVersion
4690446903
type: object

deploy/crd.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,8 @@ spec:
395395
type: string
396396
destination:
397397
type: string
398+
error:
399+
type: string
398400
image:
399401
type: string
400402
jobName:
@@ -766,6 +768,8 @@ spec:
766768
backups:
767769
description: PostgreSQL backup configuration
768770
properties:
771+
enabled:
772+
type: boolean
769773
pgbackrest:
770774
description: pgBackRest archive configuration
771775
properties:
@@ -5948,8 +5952,6 @@ spec:
59485952
trackLatestRestorableTime:
59495953
description: Enable tracking latest restorable time
59505954
type: boolean
5951-
required:
5952-
- pgbackrest
59535955
type: object
59545956
crVersion:
59555957
description: |-
@@ -31571,8 +31573,6 @@ spec:
3157131573
type: object
3157231574
type: object
3157331575
type: object
31574-
required:
31575-
- repos
3157631576
type: object
3157731577
snapshots:
3157831578
description: VolumeSnapshot configuration
@@ -46898,7 +46898,6 @@ spec:
4689846898
- name
4689946899
x-kubernetes-list-type: map
4690046900
required:
46901-
- backups
4690246901
- instances
4690346902
- postgresVersion
4690446903
type: object

deploy/cw-bundle.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,8 @@ spec:
395395
type: string
396396
destination:
397397
type: string
398+
error:
399+
type: string
398400
image:
399401
type: string
400402
jobName:
@@ -766,6 +768,8 @@ spec:
766768
backups:
767769
description: PostgreSQL backup configuration
768770
properties:
771+
enabled:
772+
type: boolean
769773
pgbackrest:
770774
description: pgBackRest archive configuration
771775
properties:
@@ -5948,8 +5952,6 @@ spec:
59485952
trackLatestRestorableTime:
59495953
description: Enable tracking latest restorable time
59505954
type: boolean
5951-
required:
5952-
- pgbackrest
59535955
type: object
59545956
crVersion:
59555957
description: |-
@@ -31571,8 +31573,6 @@ spec:
3157131573
type: object
3157231574
type: object
3157331575
type: object
31574-
required:
31575-
- repos
3157631576
type: object
3157731577
snapshots:
3157831578
description: VolumeSnapshot configuration
@@ -46898,7 +46898,6 @@ spec:
4689846898
- name
4689946899
x-kubernetes-list-type: map
4690046900
required:
46901-
- backups
4690246901
- instances
4690346902
- postgresVersion
4690446903
type: object

e2e-tests/run-minikube.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
backup-enable-disable
12
custom-extensions
23
custom-tls
34
demand-backup

e2e-tests/run-pr.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
backup-enable-disable
12
custom-extensions
23
custom-tls
34
demand-backup

0 commit comments

Comments
 (0)