Skip to content

Commit ad3d34f

Browse files
committed
noobaa DB backup - design doc and API changes
Signed-off-by: Danny Zaken <[email protected]>
1 parent 5510db0 commit ad3d34f

File tree

6 files changed

+787
-2
lines changed

6 files changed

+787
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@ build-releases/
1515
# NooBaa config file
1616
noobaa.cfg.yaml
1717

18+
# ignore any DS_Store file created by macos
19+
.DS_Store
20+
1821
*.IGNORE

deploy/crds/noobaa.io_noobaas.yaml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,38 @@ spec:
12031203
dbSpec:
12041204
description: DBSpec (optional) DB spec for a managed postgres cluster
12051205
properties:
1206+
dbBackup:
1207+
description: |-
1208+
DBBackup (optional) configure automatic scheduled backups of the database volume.
1209+
Currently, only volume snapshots are supported.
1210+
properties:
1211+
schedule:
1212+
description: Schedule the schedule for the database backup
1213+
in cron format.
1214+
type: string
1215+
volumeSnapshot:
1216+
description: |-
1217+
VolumeSnapshot the volume snapshot backup configuration.
1218+
Currently this is the only supported backup method and hence it is required.
1219+
properties:
1220+
maxSnapshots:
1221+
description: MaxSnapshots the maximum number of snapshots
1222+
to keep.
1223+
minimum: 1
1224+
type: integer
1225+
volumeSnapshotClass:
1226+
description: VolumeSnapshotClass the volume snapshot class
1227+
for the database volume.
1228+
minLength: 1
1229+
type: string
1230+
required:
1231+
- maxSnapshots
1232+
- volumeSnapshotClass
1233+
type: object
1234+
required:
1235+
- schedule
1236+
- volumeSnapshot
1237+
type: object
12061238
dbConf:
12071239
additionalProperties:
12081240
type: string
@@ -1215,6 +1247,18 @@ spec:
12151247
Increasing the size of the volume is supported if the underlying storage class supports volume expansion.
12161248
The new size should be larger than actualVolumeSize in dbStatus for the volume to be resized.
12171249
type: string
1250+
dbRecovery:
1251+
description: DBRecovery (optional) configure database recovery
1252+
from snapshot
1253+
properties:
1254+
volumeSnapshotName:
1255+
description: VolumeSnapshotName specifies the name of the
1256+
volume snapshot to recover from
1257+
minLength: 1
1258+
type: string
1259+
required:
1260+
- volumeSnapshotName
1261+
type: object
12181262
dbResources:
12191263
description: DBResources (optional) overrides the default resource
12201264
requirements for the db container
@@ -1982,6 +2026,29 @@ spec:
19822026
description: ActualVolumeSize is the actual size of the postgres
19832027
cluster volume. This can be different than the requested size
19842028
type: string
2029+
backupStatus:
2030+
description: BackupStatus reports the status of database backups
2031+
properties:
2032+
availableSnapshots:
2033+
description: AvailableSnapshots list of available snapshot
2034+
names
2035+
items:
2036+
type: string
2037+
type: array
2038+
lastBackupTime:
2039+
description: LastBackupTime timestamp of the last successful
2040+
backup
2041+
format: date-time
2042+
type: string
2043+
nextBackupTime:
2044+
description: NextBackupTime timestamp of the next scheduled
2045+
backup
2046+
format: date-time
2047+
type: string
2048+
totalSnapshots:
2049+
description: TotalSnapshots current number of snapshots
2050+
type: integer
2051+
type: object
19852052
currentPgMajorVersion:
19862053
description: CurrentPgMajorVersion is the major version of the
19872054
postgres cluster
@@ -1992,6 +2059,21 @@ spec:
19922059
dbCurrentImage:
19932060
description: DBCurrentImage is the image of the postgres cluster
19942061
type: string
2062+
recoveryStatus:
2063+
description: RecoveryStatus reports the status of database recovery
2064+
properties:
2065+
recoveryTime:
2066+
description: RecoveryTime timestamp when recovery was initiated
2067+
format: date-time
2068+
type: string
2069+
snapshotName:
2070+
description: SnapshotName name of the snapshot being recovered
2071+
from
2072+
type: string
2073+
status:
2074+
description: Status current recovery status
2075+
type: string
2076+
type: object
19952077
type: object
19962078
endpoints:
19972079
description: |-

0 commit comments

Comments
 (0)