diff --git a/docs/docs.md b/docs/docs.md index 4ec351f..d1950f2 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -1208,6 +1208,12 @@ through the kube-api server. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| cluster_definition | [bytes](#bytes) | | This field is REQUIRED. Value of this field is the JSON serialization of the Cluster. | +| backup_definition | [bytes](#bytes) | | This field is REQUIRED. Value of this field is the JSON serialization of the backup. | + + diff --git a/pkg/restore/job/restore_job.pb.go b/pkg/restore/job/restore_job.pb.go index 8f6b684..4fbae23 100644 --- a/pkg/restore/job/restore_job.pb.go +++ b/pkg/restore/job/restore_job.pb.go @@ -202,6 +202,13 @@ type RestoreRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // This field is REQUIRED. Value of this field is the JSON + // serialization of the Cluster. + ClusterDefinition []byte `protobuf:"bytes,1,opt,name=cluster_definition,json=clusterDefinition,proto3" json:"cluster_definition,omitempty"` + // This field is REQUIRED. Value of this field is the JSON + // serialization of the backup. + BackupDefinition []byte `protobuf:"bytes,2,opt,name=backup_definition,json=backupDefinition,proto3" json:"backup_definition,omitempty"` } func (x *RestoreRequest) Reset() { @@ -236,6 +243,20 @@ func (*RestoreRequest) Descriptor() ([]byte, []int) { return file_proto_restore_job_proto_rawDescGZIP(), []int{3} } +func (x *RestoreRequest) GetClusterDefinition() []byte { + if x != nil { + return x.ClusterDefinition + } + return nil +} + +func (x *RestoreRequest) GetBackupDefinition() []byte { + if x != nil { + return x.BackupDefinition + } + return nil +} + type RestoreResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -315,30 +336,35 @@ var file_proto_restore_job_proto_rawDesc = []byte{ 0x2e, 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x10, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x10, 0x01, 0x22, - 0x10, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x4c, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x65, - 0x6e, 0x76, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x65, 0x6e, 0x76, 0x73, 0x32, - 0xd3, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, - 0x6f, 0x6b, 0x73, 0x12, 0x76, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x77, - 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4a, 0x6f, 0x62, - 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, - 0x2e, 0x77, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4a, - 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x07, 0x52, - 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x1c, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x77, - 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x77, 0x61, 0x6c, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x2d, - 0x70, 0x67, 0x2f, 0x63, 0x6e, 0x70, 0x67, 0x2d, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x72, 0x65, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x6a, 0x6f, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x6c, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x2b, 0x0a, 0x11, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x62, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4c, 0x0a, + 0x0f, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x6e, 0x76, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x65, 0x6e, 0x76, 0x73, 0x32, 0xd3, 0x01, 0x0a, 0x0f, + 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, 0x73, 0x12, + 0x76, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x12, 0x30, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x77, 0x61, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, 0x6f, 0x6b, + 0x73, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x77, 0x61, 0x6c, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x4a, 0x6f, 0x62, 0x48, 0x6f, + 0x6f, 0x6b, 0x73, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x12, 0x1c, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x77, 0x61, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x77, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x2d, 0x70, 0x67, 0x2f, 0x63, + 0x6e, 0x70, 0x67, 0x2d, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x2f, 0x6a, 0x6f, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/restore_job.proto b/proto/restore_job.proto index e692e18..3f49e0f 100644 --- a/proto/restore_job.proto +++ b/proto/restore_job.proto @@ -25,6 +25,12 @@ message RestoreJobHooksCapability { } message RestoreRequest { + // This field is REQUIRED. Value of this field is the JSON + // serialization of the Cluster. + bytes cluster_definition = 1; + // This field is REQUIRED. Value of this field is the JSON + // serialization of the backup. + bytes backup_definition = 2; } message RestoreResponse {