-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdrscp.yaml
554 lines (554 loc) · 21.1 KB
/
drscp.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
swagger: '2.0'
x-endpoint-name: drscp
x-products: CDP
x-form-factors: private
x-audit: true
x-cdp-releases: PUBLIC
info:
version: 0.9.135 (BETA)
title: CDP Control Plane Data Recovery Service
license:
name: Apache 2.0
description: The API of Data Recovery Service for CDP Private Cloud Control Plane .
schemes:
- https
consumes:
- application/json
produces:
- application/json
paths:
/api/v1/drscp/createBackup:
post:
summary: Creates a backup for the control plane.
description: Creates an on-demand backup for the control plane including embedded database, Kubernetes objects, persistent volume, etc. Backup requests are processed asynchronously and instantaneously.
operationId: createBackup
x-right: drscp/createBackup
x-mutating: true
parameters:
- name: input
in: body
required: true
schema:
$ref: '#/definitions/CreateBackupRequest'
responses:
200:
description: Expected response to a valid request.
schema:
$ref: '#/definitions/CreateBackupResponse'
default:
description: The default response on an error.
schema:
$ref: '#/definitions/Error'
/api/v1/drscp/restoreBackup:
post:
summary: Restores backup.
description: Creates a new control plane from an existing backup.
operationId: restoreBackup
x-right: drscp/restoreBackup
x-mutating: true
parameters:
- name: input
in: body
required: true
schema:
$ref: '#/definitions/RestoreBackupRequest'
responses:
200:
description: Expected response to a valid request.
schema:
$ref: '#/definitions/RestoreBackupResponse'
default:
description: The default response on an error.
schema:
$ref: '#/definitions/Error'
/api/v1/drscp/deleteBackup:
post:
summary: Deletes a control plane backup.
description: Deletes an existing control plane backup. The call returns immediately.
operationId: deleteBackup
x-right: drscp/deleteBackup
x-mutating: true
parameters:
- name: input
in: body
required: true
schema:
$ref: '#/definitions/DeleteBackupRequest'
responses:
200:
description: Expected response to a valid request.
schema:
$ref: '#/definitions/DeleteBackupResponse'
default:
description: The default response on an error.
schema:
$ref: '#/definitions/Error'
/api/v1/drscp/describeBackup:
post:
summary: Describes the backup.
description: Returns the description of an existing control plane backup.
operationId: describeBackup
x-right: drscp/describeBackup
x-mutating: false
parameters:
- name: input
in: body
required: true
schema:
$ref: '#/definitions/DescribeBackupRequest'
responses:
200:
description: Expected response to a valid request.
schema:
$ref: '#/definitions/DescribeBackupResponse'
default:
description: The default response on an error.
schema:
$ref: '#/definitions/Error'
/api/v1/drscp/describeRestore:
post:
summary: Restores the backup.
description: Returns the description of a control plane restore operation.
operationId: describeRestore
x-right: drscp/describeRestore
x-mutating: false
parameters:
- name: input
in: body
required: true
schema:
$ref: '#/definitions/DescribeRestoreRequest'
responses:
200:
description: Expected response to a valid request.
schema:
$ref: '#/definitions/DescribeRestoreResponse'
default:
description: The default response on an error.
schema:
$ref: '#/definitions/Error'
/api/v1/drscp/listBackupEntities:
post:
summary: Lists potential backup entities associated with the control plane.
description: Lists potential backup entities. It includes the main control plane namespace and its corresponding vault namespace(if embedded).
operationId: listBackupEntities
x-right: drscp/listBackupEntities
x-mutating: false
parameters:
- name: input
in: body
required: true
schema:
$ref: '#/definitions/ListBackupEntitiesRequest'
responses:
200:
description: Expected response to a valid request.
schema:
$ref: '#/definitions/ListBackupEntitiesResponse'
default:
description: The default response on an error.
schema:
$ref: '#/definitions/Error'
/api/v1/drscp/listBackups:
post:
summary: Lists backups
description: Lists backups associated with the control plane.
operationId: listBackups
x-right: drscp/listBackups
x-mutating: false
parameters:
- name: input
in: body
required: true
schema:
$ref: '#/definitions/ListBackupsRequest'
responses:
200:
description: Expected response to a valid request.
schema:
$ref: '#/definitions/ListBackupsResponse'
default:
description: The default response on an error.
schema:
$ref: '#/definitions/Error'
/api/v1/drscp/listRestores:
post:
summary: Lists restores.
description: Lists restores associated with the control plane.
operationId: listRestores
x-right: drscp/listRestores
x-mutating: false
parameters:
- name: input
in: body
required: true
schema:
$ref: '#/definitions/ListRestoresRequest'
responses:
200:
description: Expected response to a valid request.
schema:
$ref: '#/definitions/ListRestoresResponse'
default:
description: The default response on an error.
schema:
$ref: '#/definitions/Error'
/api/v1/drscp/getLogs:
post:
summary: Gets job logs.
description: Given the Crn, returns the corresponding job logs.
operationId: getLogs
x-right: drscp/getLogs
x-mutating: false
parameters:
- name: input
in: body
required: true
schema:
$ref: '#/definitions/GetLogsRequest'
responses:
200:
description: Expected response to a valid request.
schema:
$ref: '#/definitions/GetLogsResponse'
default:
description: The default response on an error.
schema:
$ref: '#/definitions/Error'
definitions:
JobState:
type: string
enum:
- NOT_STARTED
- IN_PROGRESS
- COMPLETED
- PARTIALLY_FAILED
- FAILED
- TERMINATING
description: The current state of a Data Recovery Service job. The values are NOT_STARTED, IN_PROGRESS, COMPLETED, PARTIALLY_FAILED, FAILED and TERMINATING. NOT_STARTED indicates the job has not started. IN_PROGRESS indicates the job is running. COMPLETED indicates the job has finished running successfully. PARTIALLY_FAILED indicates the job has finished running with some warnings. FAILED indicates the job has finished running with errors and TERMINATING indicates that the entity containing this job is being deleted.
Error:
type: object
description: An object returned on an error.
properties:
code:
type: string
description: The error code.
message:
type: string
description: The error message.
ListBackupEntitiesRequest:
type: object
description: Request object for the list entities request.
ListBackupEntitiesResponse:
type: object
description: Response object for the list entities request.
required:
- items
properties:
items:
type: array
description: The list of potential candidates for backup. It should be a single entity that indicates the namespace which the control plane is running on.
items:
type: string
CreateBackupRequest:
type: object
description: Request object for the create backup request.
properties:
backupName:
type: string
description: Specified name for the backup.
itemName:
type: string
description: Name of the potential candidate for backup. It is optional in the case of control plane.
CreateBackupResponse:
type: object
description: Response object for the create backup request.
required:
- backupCrn
properties:
backupCrn:
type: string
description: The CRN of the backup.
RestoreBackupRequest:
type: object
description: Request object for the restore backup request.
required:
- backupCrn
properties:
backupCrn:
type: string
description: The CRN of the backup.
RestoreBackupResponse:
type: object
description: Response object for the restore backup request.
required:
- restoreCrn
properties:
restoreCrn:
type: string
description: The CRN of the restore.
DeleteBackupRequest:
type: object
description: Request object for the delete backup request.
required:
- backupCrn
properties:
backupCrn:
type: string
description: The CRN of the backup.
DeleteBackupResponse:
type: object
description: Response object for the delete backup request.
required:
- deleteBackupCrn
properties:
deleteBackupCrn:
type: string
description: The CRN of the kubernetes delete backup custom resource.
DescribeBackupRequest:
type: object
description: Request object for the describe backup request.
required:
- backupCrn
properties:
backupCrn:
type: string
description: The CRN of the backup.
DescribeBackupResponse:
type: object
description: Request object for the describe backup request.
required:
- backup
properties:
backup:
$ref: '#/definitions/Backup'
description: The backup details.
DescribeRestoreRequest:
type: object
description: Response object for the describe restore request.
required:
- restoreCrn
properties:
restoreCrn:
type: string
description: The unique CRN of the restore.
DescribeRestoreResponse:
type: object
description: Response object for the describe restore request.
required:
- restore
properties:
restore:
$ref: '#/definitions/Restore'
description: The restore details.
ListBackupsRequest:
type: object
description: Request object for the list backups request.
properties:
backupName:
type: string
description: Specified name for the backup.
jobStates:
type: array
items:
$ref: '#/definitions/JobState'
description: The job states to filter by.
ListBackupsResponse:
type: object
description: Response object for the list backups request.
required:
- backups
properties:
backups:
type: array
description: List of backups for the control plane.
items:
$ref: '#/definitions/SimpleBackup'
Message:
type: object
description: The message object used to display warnings and errors during DRS workflows
properties:
text:
type: string
description: The text message of the warning/error.
timestamp:
type: string
description: The time when the warning/error is hit.
namespace:
type: string
description: The namespace that has the warning/error.
SimpleBackup:
type: object
description: A simple backup entry for listBackup usage
properties:
backupCrn:
type: string
description: The unique CRN of the backup.
backupName:
type: string
description: The display name of the backup.
backupCreationTime:
type: string
description: The time when the backup was created.
backupPhase:
type: string
description: The phase of the backup operation. The values are PENDING, PRE_VALIDATION, SAVING_OBJECTS, CREATING_SNAPSHOTS and FINISHED. PENDING indicates waiting for the job to start executing. PRE_VALIDATION indicates validation of the environment before backup. SAVING_OBJECTS indicates saving all the kubernetes resources related to the backup item. CREATING_SNAPSHOTS indicates creating a snapshot of all Kubernetes PersistentVolumeClaims related to the backup item and FINISHED indicates that the backup job has finished.
backupJobState:
type: string
description: The current state of the backup job. The values are NOT_STARTED, IN_PROGRESS, COMPLETED, PARTIALLY_FAILED, FAILED and TERMINATING. NOT_STARTED indicates the job has not started. IN_PROGRESS indicates the job is running. COMPLETED indicates the job has finished running successfully. PARTIALLY_FAILED indicates the job has finished running with some warnings. FAILED indicates the job has finished running with errors and TERMINATING indicates that the entity containing this job is being deleted.
Backup:
type: object
description: Backup entry
properties:
backupCrn:
type: string
description: The unique CRN of the backup.
backupCreationTime:
type: string
description: The time when the backup was created.
backupName:
type: string
description: The display name of the backup.
backupUpdatedTime:
type: string
description: The time when the backup was updated.
backupPhase:
type: string
description: The phase of the backup operation. The values are PENDING, PRE_VALIDATION, SAVING_OBJECTS, CREATING_SNAPSHOTS and FINISHED. PENDING indicates waiting for the job to start executing. PRE_VALIDATION indicates validation of the environment before backup. SAVING_OBJECTS indicates saving all the kubernetes resources related to the backup item. CREATING_SNAPSHOTS indicates creating a snapshot of all Kubernetes PersistentVolumeClaims related to the backup item and FINISHED indicates that the backup job has finished.
backupJobState:
type: string
description: The current state of the backup job. The values are NOT_STARTED, IN_PROGRESS, COMPLETED, PARTIALLY_FAILED, FAILED and TERMINATING. NOT_STARTED indicates the job has not started. IN_PROGRESS indicates the job is running. COMPLETED indicates the job has finished running successfully. PARTIALLY_FAILED indicates the job has finished running with some warnings. FAILED indicates the job has finished running with errors and TERMINATING indicates that the entity containing this job is being deleted.
backupJob:
type: string
description: The backup job name.
includedNamespaces:
type: array
description: The list of namespaces to be included in backup.
items:
type: string
warnings:
type: array
description: The warnings from backup job.
items:
$ref: '#/definitions/Message'
errors:
type: array
description: The errors from backup job.
items:
$ref: '#/definitions/Message'
ListRestoresRequest:
type: object
description: Request object for the list restores request.
properties:
jobStates:
type: array
items:
$ref: '#/definitions/JobState'
description: The job states to filter by.
backupCrn:
type: string
description: CRN of the backup.
ListRestoresResponse:
type: object
description: Response object for the list restores request.
required:
- restores
properties:
restores:
type: array
description: List of restores for the control plane.
items:
$ref: '#/definitions/SimpleRestore'
SimpleRestore:
type: object
description: A simple Restore entry for listRestore Usage
properties:
restoreCrn:
type: string
description: The CRN of the restore.
backupCrn:
type: string
description: The CRN of the backup.
restoreCreationTime:
type: string
description: The time when the restore was created.
includedNamespaces:
type: array
description: The list of namespaces to be included in restore.
items:
type: string
restorePhase:
type: string
description: The phase of the restore operation. The values are PENDING, PRE_VALIDATION, STOPPING_APPS, DELETING_OBJECTS, DELETING_OBJECTS_PVC, RESTORING_PVC, RESTORING_OBJECTS, STARTING_APPS and FINISHED. PENDING indicates waiting for the job to start executing. PRE_VALIDATION indicates validation of the environment before restore. STOPPING_APPS indicates stopping the microservices before data restore. DELETING_OBJECTS indicates deletion of Kubernetes resources other than PersistentVolumeClaims. DELETING_OBJECTS_PVC indicates deletion of Kubernetes PersistentVolumeClaims. RESTORING_PVC indicates creation of Kubernetes PersistentVolumeClaims. RESTORING_OBJECTS indicates creating of Kubernetes objects other than PersistentVolumeClaims. STARTING_APPS indicates starting of the microservices after data restore and FINISHED indicates the restore job has finished.
restoreJobState:
type: string
description: The current state of the restore job. The values are NOT_STARTED, IN_PROGRESS, COMPLETED, PARTIALLY_FAILED, FAILED and TERMINATING. NOT_STARTED indicates the job has not started. IN_PROGRESS indicates the job is running. COMPLETED indicates the job has finished running successfully. PARTIALLY_FAILED indicates the job has finished running with some warnings. FAILED indicates the job has finished running with errors and TERMINATING indicates that the entity containing this job is being deleted.
Restore:
type: object
description: Restore entry
properties:
restoreCrn:
type: string
description: The CRN of the restore.
backupCrn:
type: string
description: The CRN of the backup.
restoreCreationTime:
type: string
description: The time when the restore was created.
restoreUpdatedTime:
type: string
description: The updated time of the restore.
excludedResources:
type: array
description: The list of resources to be excluded in restore.
items:
type: string
includedNamespaces:
type: array
description: The list of namespaces to be included in restore.
items:
type: string
successConditions:
type: array
description: The list of conditions to be met for a successful restore.
items:
type: string
restorePhase:
type: string
description: The phase of the restore operation. The values are PENDING, PRE_VALIDATION, STOPPING_APPS, DELETING_OBJECTS, DELETING_OBJECTS_PVC, RESTORING_PVC, RESTORING_OBJECTS, STARTING_APPS and FINISHED. PENDING indicates waiting for the job to start executing. PRE_VALIDATION indicates validation of the environment before restore. STOPPING_APPS indicates stopping the microservices before data restore. DELETING_OBJECTS indicates deletion of Kubernetes resources other than PersistentVolumeClaims. DELETING_OBJECTS_PVC indicates deletion of Kubernetes PersistentVolumeClaims. RESTORING_PVC indicates creation of Kubernetes PersistentVolumeClaims. RESTORING_OBJECTS indicates creating of Kubernetes objects other than PersistentVolumeClaims. STARTING_APPS indicates starting of the microservices after data restore and FINISHED indicates the restore job has finished.
restoreJobState:
type: string
description: The current state of the restore job. The values are NOT_STARTED, IN_PROGRESS, COMPLETED, PARTIALLY_FAILED, FAILED and TERMINATING. NOT_STARTED indicates the job has not started. IN_PROGRESS indicates the job is running. COMPLETED indicates the job has finished running successfully. PARTIALLY_FAILED indicates the job has finished running with some warnings. FAILED indicates the job has finished running with errors and TERMINATING indicates that the entity containing this job is being deleted.
restoreJob:
type: string
description: The restore job name.
warnings:
type: array
description: The warnings from restore job.
items:
$ref: '#/definitions/Message'
errors:
type: array
description: The errors from restore job.
items:
$ref: '#/definitions/Message'
GetLogsRequest:
type: object
description: Request object for the get logs request.
required:
- crn
properties:
crn:
type: string
description: The CRN of the custom resource.
GetLogsResponse:
type: object
description: Response object for the get backup logs request.
required:
- logs
properties:
logs:
type: string
description: Contains the logs of the operation.
x-skip-logging: true