@daocloud-proto/kcoral 0.0.9-2 → 0.0.9-201
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kcoral.io/api/kcoralcluster/v1alpha1/kcoralcluster.pb.ts +70 -1
- package/kcoral.io/api/storage/v1alpha1/volumesnapshotclass.pb.ts +1 -0
- package/kcoral.io/api/v1alpha1/kcoral.pb.ts +12 -0
- package/kcoral.io/api/velero/v1alpha1/backup.pb.ts +1 -0
- package/kcoral.io/api/velero/v1alpha1/backupstoragelocation.pb.ts +8 -0
- package/kcoral.io/api/velero/v1alpha1/restore.pb.ts +2 -0
- package/kcoral.io/api/velero/v1alpha1/schedule.pb.ts +2 -0
- package/package.json +1 -1
|
@@ -5,6 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as KcoralIoApiTypesPage from "../../types/page.pb"
|
|
8
|
+
|
|
9
|
+
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
10
|
+
type OneOf<T> =
|
|
11
|
+
| { [k in keyof T]?: undefined }
|
|
12
|
+
| (
|
|
13
|
+
keyof T extends infer K ?
|
|
14
|
+
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
15
|
+
: never)
|
|
16
|
+
: never);
|
|
8
17
|
export type ListKCoralClustersRequest = {
|
|
9
18
|
page?: number
|
|
10
19
|
pageSize?: number
|
|
@@ -15,6 +24,66 @@ export type ListKCoralClustersRequest = {
|
|
|
15
24
|
fuzzyName?: string
|
|
16
25
|
}
|
|
17
26
|
|
|
27
|
+
|
|
28
|
+
type BaseClusterDescription = {
|
|
29
|
+
clusterName?: string
|
|
30
|
+
veleroInstalled?: boolean
|
|
31
|
+
running?: boolean
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type ClusterDescription = BaseClusterDescription
|
|
35
|
+
& OneOf<{ error: string }>
|
|
36
|
+
|
|
18
37
|
export type ListKCoralClustersResponse = {
|
|
19
|
-
items?:
|
|
38
|
+
items?: ClusterDescription[]
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type ListAllUserRoleSummaryRequest = {
|
|
42
|
+
cluster?: string
|
|
43
|
+
namespace?: string
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type ListAllUserRoleSummaryResponse = {
|
|
47
|
+
items?: {[key: string]: RoleSummary}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type RoleSummary = {
|
|
51
|
+
clusterRoles?: string[]
|
|
52
|
+
roles?: {[key: string]: RoleNames}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type RoleNames = {
|
|
56
|
+
names?: string[]
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type ListClusterPreferredResourcesRequest = {
|
|
60
|
+
cluster?: string
|
|
61
|
+
namespaced?: boolean
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type ListClusterPreferredResourcesResponse = {
|
|
65
|
+
resources?: APIResourceList[]
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export type APIResourceList = {
|
|
69
|
+
groupVersion?: string
|
|
70
|
+
resources?: APIResource[]
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export type APIResource = {
|
|
74
|
+
name?: string
|
|
75
|
+
namespaced?: boolean
|
|
76
|
+
group?: string
|
|
77
|
+
version?: string
|
|
78
|
+
kind?: string
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type CreateResourceRequest = {
|
|
82
|
+
cluster?: string
|
|
83
|
+
namespace?: string
|
|
84
|
+
data?: string[]
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export type CreateResourceResponse = {
|
|
88
|
+
data?: string[]
|
|
20
89
|
}
|
|
@@ -26,11 +26,23 @@ export class Kubernetes {
|
|
|
26
26
|
static EnableVolumeSnapshotClass(req: KcoralIoApiStorageV1alpha1Volumesnapshotclass.EnableVolumeSnapshotClassRequest, initReq?: fm.InitReq): Promise<KcoralIoApiStorageV1alpha1Volumesnapshotclass.VolumeSnapshotClass> {
|
|
27
27
|
return fm.fetchReq<KcoralIoApiStorageV1alpha1Volumesnapshotclass.EnableVolumeSnapshotClassRequest, KcoralIoApiStorageV1alpha1Volumesnapshotclass.VolumeSnapshotClass>(`/apis/kcoral.io/v1alpha1/clusters/${req["cluster"]}/enablevolumesnapshotclass/${req["name"]}:enable`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
28
28
|
}
|
|
29
|
+
static ListAllUserRoleSummary(req: KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.ListAllUserRoleSummaryRequest, initReq?: fm.InitReq): Promise<KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.ListAllUserRoleSummaryResponse> {
|
|
30
|
+
return fm.fetchReq<KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.ListAllUserRoleSummaryRequest, KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.ListAllUserRoleSummaryResponse>(`/apis/kcoral.io/v1alpha1/rolesummary?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
31
|
+
}
|
|
32
|
+
static ListClusterPreferredResources(req: KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.ListClusterPreferredResourcesRequest, initReq?: fm.InitReq): Promise<KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.ListClusterPreferredResourcesResponse> {
|
|
33
|
+
return fm.fetchReq<KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.ListClusterPreferredResourcesRequest, KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.ListClusterPreferredResourcesResponse>(`/apis/kcoral.io/v1alpha1/clusters/${req["cluster"]}/preferredresources?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
34
|
+
}
|
|
35
|
+
static CreateResource(req: KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.CreateResourceRequest, initReq?: fm.InitReq): Promise<KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.CreateResourceResponse> {
|
|
36
|
+
return fm.fetchReq<KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.CreateResourceRequest, KcoralIoApiKcoralclusterV1alpha1Kcoralcluster.CreateResourceResponse>(`/apis/kcoral.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/resources`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
37
|
+
}
|
|
29
38
|
}
|
|
30
39
|
export class BackupStorageLocation {
|
|
31
40
|
static ListBackupStorageLocations(req: KcoralIoApiVeleroV1alpha1Backupstoragelocation.ListBackupStorageLocationsRequest, initReq?: fm.InitReq): Promise<KcoralIoApiVeleroV1alpha1Backupstoragelocation.ListBackupStorageLocationsResponse> {
|
|
32
41
|
return fm.fetchReq<KcoralIoApiVeleroV1alpha1Backupstoragelocation.ListBackupStorageLocationsRequest, KcoralIoApiVeleroV1alpha1Backupstoragelocation.ListBackupStorageLocationsResponse>(`/apis/kcoral.io/v1alpha1/clusters/${req["cluster"]}/backupstoragelocations?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
33
42
|
}
|
|
43
|
+
static ListBackupStorageLocationsWithIdenticalBackend(req: KcoralIoApiVeleroV1alpha1Backupstoragelocation.ListBackupStorageLocationsWithIdenticalBackendRequest, initReq?: fm.InitReq): Promise<KcoralIoApiVeleroV1alpha1Backupstoragelocation.ListBackupStorageLocationsWithIdenticalBackendResponse> {
|
|
44
|
+
return fm.fetchReq<KcoralIoApiVeleroV1alpha1Backupstoragelocation.ListBackupStorageLocationsWithIdenticalBackendRequest, KcoralIoApiVeleroV1alpha1Backupstoragelocation.ListBackupStorageLocationsWithIdenticalBackendResponse>(`/apis/kcoral.io/v1alpha1/clusters/${req["cluster"]}/backupstoragelocationswithidenticalbackend?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
45
|
+
}
|
|
34
46
|
static GetBackupStorageLocation(req: KcoralIoApiVeleroV1alpha1Backupstoragelocation.GetBackupStorageLocationRequest, initReq?: fm.InitReq): Promise<KcoralIoApiVeleroV1alpha1Backupstoragelocation.BackupStorageLocation> {
|
|
35
47
|
return fm.fetchReq<KcoralIoApiVeleroV1alpha1Backupstoragelocation.GetBackupStorageLocationRequest, KcoralIoApiVeleroV1alpha1Backupstoragelocation.BackupStorageLocation>(`/apis/kcoral.io/v1alpha1/clusters/${req["cluster"]}/backupstoragelocations/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "name"])}`, {...initReq, method: "GET"})
|
|
36
48
|
}
|
|
@@ -19,6 +19,14 @@ export enum BackupStorageLocationStatusBackupStorageLocationPhase {
|
|
|
19
19
|
Unavailable = "Unavailable",
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
export type ListBackupStorageLocationsWithIdenticalBackendRequest = {
|
|
23
|
+
cluster?: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type ListBackupStorageLocationsWithIdenticalBackendResponse = {
|
|
27
|
+
clusterName?: string[]
|
|
28
|
+
}
|
|
29
|
+
|
|
22
30
|
export type ListBackupStorageLocationsResponse = {
|
|
23
31
|
items?: BackupStorageLocation[]
|
|
24
32
|
pagination?: KcoralIoApiTypesPage.Pagination
|
|
@@ -29,6 +29,7 @@ export type ListSchedulesRequest = {
|
|
|
29
29
|
sortDir?: KcoralIoApiTypesPage.SortDir
|
|
30
30
|
labelSelector?: string
|
|
31
31
|
fieldSelector?: string
|
|
32
|
+
showScheduleWithoutBackup?: boolean
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
export type GetScheduleRequest = {
|
|
@@ -79,4 +80,5 @@ export type ScheduleStatus = {
|
|
|
79
80
|
lastBackup?: string
|
|
80
81
|
phase?: ScheduleStatusSchedulePhase
|
|
81
82
|
validationErrors?: string[]
|
|
83
|
+
nextBackup?: string
|
|
82
84
|
}
|