@daocloud-proto/kpanda 0.15.0-dev-ac36bff9 → 0.15.0-dev-ab8752b0

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.
@@ -0,0 +1,194 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as KpandaIoApiTypesObjectmeta from "../../types/objectmeta.pb"
8
+ import * as KpandaIoApiTypesPage from "../../types/page.pb"
9
+
10
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
11
+ type OneOf<T> =
12
+ | { [k in keyof T]?: undefined }
13
+ | (
14
+ keyof T extends infer K ?
15
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
16
+ : never)
17
+ : never);
18
+
19
+ export enum EtcdBackupStrategySpecEtcdBackupType {
20
+ BACKUP_TYPE_UNSPECIFIED = "BACKUP_TYPE_UNSPECIFIED",
21
+ Manual = "Manual",
22
+ Timing = "Timing",
23
+ }
24
+
25
+ export enum EtcdBackupStrategyStatusBackupStrategyState {
26
+ BACKUP_STRATEGY_UNSPECIFIED = "BACKUP_STRATEGY_UNSPECIFIED",
27
+ Running = "Running",
28
+ Stopped = "Stopped",
29
+ }
30
+
31
+ export enum SnapshotterConfigGarbageCollectingPolicy {
32
+ ETCD_BACKUP_TYPE_UNSPECIFIED = "ETCD_BACKUP_TYPE_UNSPECIFIED",
33
+ Exponential = "Exponential",
34
+ LimitBased = "LimitBased",
35
+ }
36
+
37
+ export enum SnapStoreConfigSnapStoreProvider {
38
+ SNAP_STORE_PROVIDER_UNSPECIFIED = "SNAP_STORE_PROVIDER_UNSPECIFIED",
39
+ Local = "Local",
40
+ S3 = "S3",
41
+ }
42
+
43
+ export type EtcdBackupStrategy = {
44
+ metadata?: KpandaIoApiTypesObjectmeta.ObjectMeta
45
+ spec?: EtcdBackupStrategySpec
46
+ status?: EtcdBackupStrategyStatus
47
+ }
48
+
49
+ export type EtcdBackupStrategySpec = {
50
+ type?: EtcdBackupStrategySpecEtcdBackupType
51
+ maxBackups?: number
52
+ storeLocation?: string
53
+ config?: EtcdBackupStrategyConfig
54
+ }
55
+
56
+ export type EtcdBackupStrategyConfig = {
57
+ etcdConnectionConfig?: EtcdConnectionConfig
58
+ snapshotterConfig?: SnapshotterConfig
59
+ snapStoreConfig?: SnapStoreConfig
60
+ }
61
+
62
+ export type EtcdBackupStrategyStatus = {
63
+ phase?: EtcdBackupStrategyStatusBackupStrategyState
64
+ }
65
+
66
+ export type EtcdConnectionConfig = {
67
+ endpoints?: string[]
68
+ serviceEndpoints?: string[]
69
+ connectionTimeout?: string
70
+ snapshotTimeout?: string
71
+ insecureTransport?: boolean
72
+ insecureSkipVerify?: boolean
73
+ certData?: string
74
+ keyData?: string
75
+ caData?: string
76
+ }
77
+
78
+ export type SnapshotterConfig = {
79
+ fullSnapshotSchedule?: string
80
+ deltaSnapshotPeriod?: string
81
+ deltaSnapshotMemoryLimit?: number
82
+ garbageCollectionPeriod?: string
83
+ garbageCollectionPolicy?: SnapshotterConfigGarbageCollectingPolicy
84
+ maxBackups?: number
85
+ }
86
+
87
+ export type S3Config = {
88
+ accessKeyId?: string
89
+ region?: string
90
+ secretAccessKey?: string
91
+ bucket?: string
92
+ endpoint?: string
93
+ storePrefix?: string
94
+ consoleAddress?: string
95
+ }
96
+
97
+
98
+ type BaseSnapStoreConfig = {
99
+ provider?: SnapStoreConfigSnapStoreProvider
100
+ container?: string
101
+ prefix?: string
102
+ }
103
+
104
+ export type SnapStoreConfig = BaseSnapStoreConfig
105
+ & OneOf<{ s3Config: S3Config; tempDir: string }>
106
+
107
+ export type CreateOrUpdateEtcdBackupStrategyRequest = {
108
+ cluster?: string
109
+ name?: string
110
+ strategy?: EtcdBackupStrategy
111
+ }
112
+
113
+ export type GetEtcdBackupStrategyRequest = {
114
+ cluster?: string
115
+ name?: string
116
+ }
117
+
118
+ export type GetEtcdBackupStrategyJSONRequest = {
119
+ cluster?: string
120
+ name?: string
121
+ }
122
+
123
+ export type GetEtcdBackupStrategyJSONResponse = {
124
+ data?: string
125
+ }
126
+
127
+ export type ListEtcdBackupStrategiesRequest = {
128
+ cluster?: string
129
+ name?: string
130
+ page?: number
131
+ pageSize?: number
132
+ sortBy?: KpandaIoApiTypesPage.SortBy
133
+ sortDir?: KpandaIoApiTypesPage.SortDir
134
+ }
135
+
136
+ export type ListEtcdBackupStrategiesResponse = {
137
+ items?: EtcdBackupStrategy[]
138
+ pagination?: KpandaIoApiTypesPage.Pagination
139
+ }
140
+
141
+ export type PauseEtcdBackupStrategyRequest = {
142
+ cluster?: string
143
+ name?: string
144
+ }
145
+
146
+ export type PauseEtcdBackupStrategyResponse = {
147
+ strategy?: EtcdBackupStrategy
148
+ }
149
+
150
+ export type ResumeEtcdBackupStrategyRequest = {
151
+ cluster?: string
152
+ name?: string
153
+ }
154
+
155
+ export type ResumeEtcdBackupStrategyResponse = {
156
+ strategy?: EtcdBackupStrategy
157
+ }
158
+
159
+ export type ExecuteEtcdBackupStrategyRequest = {
160
+ cluster?: string
161
+ name?: string
162
+ }
163
+
164
+ export type ExecuteEtcdBackupStrategyResponse = {
165
+ strategy?: EtcdBackupStrategy
166
+ }
167
+
168
+ export type DeleteEtcdBackupStrategyRequest = {
169
+ cluster?: string
170
+ name?: string
171
+ }
172
+
173
+ export type ListEtcdSnapshotsRequest = {
174
+ cluster?: string
175
+ strategy?: string
176
+ }
177
+
178
+ export type Snapshot = {
179
+ lastModified?: string
180
+ key?: string
181
+ size?: string
182
+ externalUrl?: string
183
+ }
184
+
185
+ export type ListEtcdSnapshotsResponse = {
186
+ items?: Snapshot[]
187
+ }
188
+
189
+ export type DeleteEtcdSnapshotRequest = {
190
+ cluster?: string
191
+ strategy?: string
192
+ backup?: string
193
+ name?: string
194
+ }
@@ -39,6 +39,7 @@ import * as KpandaIoApiCoreV1alpha1Resourcequota from "../core/v1alpha1/resource
39
39
  import * as KpandaIoApiCoreV1alpha1Secret from "../core/v1alpha1/secret.pb"
40
40
  import * as KpandaIoApiCoreV1alpha1Service from "../core/v1alpha1/service.pb"
41
41
  import * as KpandaIoApiCoreV1alpha1Serviceaccount from "../core/v1alpha1/serviceaccount.pb"
42
+ import * as KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore from "../etcdbackuprestore/v1alpha1/etcdbackuprestore.pb"
42
43
  import * as KpandaIoApiGhippoV1alpha1Workspace from "../ghippo/v1alpha1/workspace.pb"
43
44
  import * as KpandaIoApiInsightV1alpha1Insight from "../insight/v1alpha1/insight.pb"
44
45
  import * as KpandaIoApiKangarooV1alpha1Image from "../kangaroo/v1alpha1/image.pb"
@@ -971,6 +972,41 @@ export class Addon {
971
972
  return fm.fetchReq<KpandaIoApiAddonV1alpha1Helmoperation.DeleteHelmOperationRequest, GoogleProtobufEmpty.Empty>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/helmoperations/${req["name"]}`, {...initReq, method: "DELETE"})
972
973
  }
973
974
  }
975
+ export class EtcdBackupRestore {
976
+ static CreateEtcdBackupStrategy(req: KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.CreateOrUpdateEtcdBackupStrategyRequest, initReq?: fm.InitReq): Promise<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.EtcdBackupStrategy> {
977
+ return fm.fetchReq<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.CreateOrUpdateEtcdBackupStrategyRequest, KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.EtcdBackupStrategy>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/etcdbackuprestore/strategies`, {...initReq, method: "POST", body: JSON.stringify(req)})
978
+ }
979
+ static GetEtcdBackupStrategy(req: KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.GetEtcdBackupStrategyRequest, initReq?: fm.InitReq): Promise<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.EtcdBackupStrategy> {
980
+ return fm.fetchReq<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.GetEtcdBackupStrategyRequest, KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.EtcdBackupStrategy>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/etcdbackuprestore/strategies/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "name"])}`, {...initReq, method: "GET"})
981
+ }
982
+ static GetEtcdBackupStrategyJSON(req: KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.GetEtcdBackupStrategyJSONRequest, initReq?: fm.InitReq): Promise<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.GetEtcdBackupStrategyJSONResponse> {
983
+ return fm.fetchReq<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.GetEtcdBackupStrategyJSONRequest, KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.GetEtcdBackupStrategyJSONResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/etcdbackuprestore/strategies/${req["name"]}/json?${fm.renderURLSearchParams(req, ["cluster", "name"])}`, {...initReq, method: "GET"})
984
+ }
985
+ static ListEtcdBackupStrategies(req: KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.ListEtcdBackupStrategiesRequest, initReq?: fm.InitReq): Promise<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.ListEtcdBackupStrategiesResponse> {
986
+ return fm.fetchReq<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.ListEtcdBackupStrategiesRequest, KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.ListEtcdBackupStrategiesResponse>(`/apis/kpanda.io/v1alpha1/etcdbackuprestore/strategies?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
987
+ }
988
+ static PauseEtcdBackupStrategy(req: KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.PauseEtcdBackupStrategyRequest, initReq?: fm.InitReq): Promise<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.PauseEtcdBackupStrategyResponse> {
989
+ return fm.fetchReq<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.PauseEtcdBackupStrategyRequest, KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.PauseEtcdBackupStrategyResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/etcdbackuprestore/strategies/${req["name"]}:pause`, {...initReq, method: "POST"})
990
+ }
991
+ static ResumeEtcdBackupStrategy(req: KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.ResumeEtcdBackupStrategyRequest, initReq?: fm.InitReq): Promise<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.ResumeEtcdBackupStrategyResponse> {
992
+ return fm.fetchReq<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.ResumeEtcdBackupStrategyRequest, KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.ResumeEtcdBackupStrategyResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/etcdbackuprestore/strategies/${req["name"]}:resume`, {...initReq, method: "POST"})
993
+ }
994
+ static ExecuteEtcdBackupStrategy(req: KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.ExecuteEtcdBackupStrategyRequest, initReq?: fm.InitReq): Promise<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.ExecuteEtcdBackupStrategyResponse> {
995
+ return fm.fetchReq<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.ExecuteEtcdBackupStrategyRequest, KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.ExecuteEtcdBackupStrategyResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/etcdbackuprestore/strategies/${req["name"]}:execute`, {...initReq, method: "POST"})
996
+ }
997
+ static UpdateEtcdBackupStrategy(req: KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.CreateOrUpdateEtcdBackupStrategyRequest, initReq?: fm.InitReq): Promise<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.EtcdBackupStrategy> {
998
+ return fm.fetchReq<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.CreateOrUpdateEtcdBackupStrategyRequest, KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.EtcdBackupStrategy>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/etcdbackuprestore/strategies/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
999
+ }
1000
+ static DeleteEtcdBackupStrategy(req: KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.DeleteEtcdBackupStrategyRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
1001
+ return fm.fetchReq<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.DeleteEtcdBackupStrategyRequest, GoogleProtobufEmpty.Empty>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/etcdbackuprestore/strategies/${req["name"]}`, {...initReq, method: "DELETE"})
1002
+ }
1003
+ static ListEtcdSnapshots(req: KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.ListEtcdSnapshotsRequest, initReq?: fm.InitReq): Promise<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.ListEtcdSnapshotsResponse> {
1004
+ return fm.fetchReq<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.ListEtcdSnapshotsRequest, KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.ListEtcdSnapshotsResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/etcdbackuprestore/strategies/${req["strategy"]}/snapshots?${fm.renderURLSearchParams(req, ["cluster", "strategy"])}`, {...initReq, method: "GET"})
1005
+ }
1006
+ static DeleteEtcdSnapshot(req: KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.DeleteEtcdSnapshotRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
1007
+ return fm.fetchReq<KpandaIoApiEtcdbackuprestoreV1alpha1Etcdbackuprestore.DeleteEtcdSnapshotRequest, GoogleProtobufEmpty.Empty>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/etcdbackuprestore/strategies/${req["strategy"]}/snapshots/${req["name"]}`, {...initReq, method: "DELETE"})
1008
+ }
1009
+ }
974
1010
  export class StreamService {
975
1011
  static ClusterUpdateStream(req: KpandaIoApiStreamV1alpha1Stream.ClusterStreamRequest, entityNotifier?: fm.NotifyStreamEntityArrival<KpandaIoApiStreamV1alpha1Stream.ClusterStreamResponse>, initReq?: fm.InitReq): Promise<void> {
976
1012
  return fm.fetchStreamingRequest<KpandaIoApiStreamV1alpha1Stream.ClusterStreamRequest, KpandaIoApiStreamV1alpha1Stream.ClusterStreamResponse>(`/kpanda.io.api.v1alpha1.StreamService/ClusterUpdateStream`, entityNotifier, {...initReq, method: "POST", body: JSON.stringify(req)})
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/kpanda",
3
- "version":"v0.15.0-dev-ac36bff9",
3
+ "version":"v0.15.0-dev-ab8752b0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {