@daocloud-proto/kpanda 0.8.15-4 → 0.8.16
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/kpanda.io/api/apiextensions/v1alpha1/custom_resource_definition.pb.ts +24 -0
- package/kpanda.io/api/batch/v1alpha1/cronjob.pb.ts +23 -0
- package/kpanda.io/api/core/v1alpha1/pod.pb.ts +1 -0
- package/kpanda.io/api/types/objectmeta.pb.ts +2 -0
- package/kpanda.io/api/v1alpha1/kpanda.pb.ts +9 -0
- package/package.json +1 -1
|
@@ -13,6 +13,14 @@ export enum CustomResourceDefinitionSpecResourceScope {
|
|
|
13
13
|
CLUSTER = "CLUSTER",
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
export enum PatchCustomResourceRequestPatchType {
|
|
17
|
+
PATCH_TYPE_UNSPECIFIED = "PATCH_TYPE_UNSPECIFIED",
|
|
18
|
+
PATCH_TYPE_JSON = "PATCH_TYPE_JSON",
|
|
19
|
+
PATCH_TYPE_MERGE = "PATCH_TYPE_MERGE",
|
|
20
|
+
PATCH_TYPE_STRATEGIC_MERGE = "PATCH_TYPE_STRATEGIC_MERGE",
|
|
21
|
+
PATCH_TYPE_APPLY = "PATCH_TYPE_APPLY",
|
|
22
|
+
}
|
|
23
|
+
|
|
16
24
|
export type CustomResourceDefinition = {
|
|
17
25
|
metadata?: KpandaIoApiTypesObjectmeta.ObjectMeta
|
|
18
26
|
spec?: CustomResourceDefinitionSpec
|
|
@@ -253,6 +261,22 @@ export type UpdateCustomResourceResponse = {
|
|
|
253
261
|
data?: string
|
|
254
262
|
}
|
|
255
263
|
|
|
264
|
+
export type PatchCustomResourceRequest = {
|
|
265
|
+
cluster?: string
|
|
266
|
+
group?: string
|
|
267
|
+
version?: string
|
|
268
|
+
namespace?: string
|
|
269
|
+
resource?: string
|
|
270
|
+
name?: string
|
|
271
|
+
patchType?: PatchCustomResourceRequestPatchType
|
|
272
|
+
data?: string
|
|
273
|
+
subResources?: string[]
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export type PatchCustomResourceResponse = {
|
|
277
|
+
data?: string
|
|
278
|
+
}
|
|
279
|
+
|
|
256
280
|
export type DeleteCustomResourceRequest = {
|
|
257
281
|
cluster?: string
|
|
258
282
|
group?: string
|
|
@@ -28,6 +28,7 @@ export type CronJob = {
|
|
|
28
28
|
|
|
29
29
|
export type CronJobSpec = {
|
|
30
30
|
schedule?: string
|
|
31
|
+
paused?: boolean
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
export type CronJobStatusCronJobCondition = {
|
|
@@ -86,4 +87,26 @@ export type DeleteCronJobRequest = {
|
|
|
86
87
|
cluster?: string
|
|
87
88
|
namespace?: string
|
|
88
89
|
name?: string
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export type PauseCronJobRequest = {
|
|
93
|
+
cluster?: string
|
|
94
|
+
namespace?: string
|
|
95
|
+
name?: string
|
|
96
|
+
paused?: boolean
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export type PauseCronJobResponse = {
|
|
100
|
+
cronjob?: CronJob
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export type ResumeCronJobRequest = {
|
|
104
|
+
cluster?: string
|
|
105
|
+
namespace?: string
|
|
106
|
+
name?: string
|
|
107
|
+
paused?: boolean
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export type ResumeCronJobResponse = {
|
|
111
|
+
cronjob?: CronJob
|
|
89
112
|
}
|
|
@@ -96,6 +96,9 @@ export class Apiextensions {
|
|
|
96
96
|
static UpdateCustomResource(req: KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.UpdateCustomResourceRequest, initReq?: fm.InitReq): Promise<KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.UpdateCustomResourceResponse> {
|
|
97
97
|
return fm.fetchReq<KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.UpdateCustomResourceRequest, KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.UpdateCustomResourceResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/gvr/${req["group"]}/${req["version"]}/namespaces/${req["namespace"]}/${req["resource"]}/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
98
98
|
}
|
|
99
|
+
static PatchCustomResource(req: KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.PatchCustomResourceRequest, initReq?: fm.InitReq): Promise<KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.PatchCustomResourceResponse> {
|
|
100
|
+
return fm.fetchReq<KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.PatchCustomResourceRequest, KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.PatchCustomResourceResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/gvr/${req["group"]}/${req["version"]}/namespaces/${req["namespace"]}/${req["resource"]}/${req["name"]}`, {...initReq, method: "PATCH", body: JSON.stringify(req)})
|
|
101
|
+
}
|
|
99
102
|
static DeleteCustomResource(req: KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.DeleteCustomResourceRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
100
103
|
return fm.fetchReq<KpandaIoApiApiextensionsV1alpha1Custom_resource_definition.DeleteCustomResourceRequest, GoogleProtobufEmpty.Empty>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/gvr/${req["group"]}/${req["version"]}/namespaces/${req["namespace"]}/${req["resource"]}/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
101
104
|
}
|
|
@@ -208,6 +211,12 @@ export class Batch {
|
|
|
208
211
|
static GetCronJob(req: KpandaIoApiBatchV1alpha1Cronjob.GetCronJobRequest, initReq?: fm.InitReq): Promise<KpandaIoApiBatchV1alpha1Cronjob.CronJob> {
|
|
209
212
|
return fm.fetchReq<KpandaIoApiBatchV1alpha1Cronjob.GetCronJobRequest, KpandaIoApiBatchV1alpha1Cronjob.CronJob>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/cronjobs/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
210
213
|
}
|
|
214
|
+
static PauseCronJob(req: KpandaIoApiBatchV1alpha1Cronjob.PauseCronJobRequest, initReq?: fm.InitReq): Promise<KpandaIoApiBatchV1alpha1Cronjob.PauseCronJobResponse> {
|
|
215
|
+
return fm.fetchReq<KpandaIoApiBatchV1alpha1Cronjob.PauseCronJobRequest, KpandaIoApiBatchV1alpha1Cronjob.PauseCronJobResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/cronjobs/${req["name"]}:pause`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
216
|
+
}
|
|
217
|
+
static ResumeCronJob(req: KpandaIoApiBatchV1alpha1Cronjob.ResumeCronJobRequest, initReq?: fm.InitReq): Promise<KpandaIoApiBatchV1alpha1Cronjob.ResumeCronJobResponse> {
|
|
218
|
+
return fm.fetchReq<KpandaIoApiBatchV1alpha1Cronjob.ResumeCronJobRequest, KpandaIoApiBatchV1alpha1Cronjob.ResumeCronJobResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/cronjobs/${req["name"]}:resume`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
219
|
+
}
|
|
211
220
|
static DeleteCronJob(req: KpandaIoApiBatchV1alpha1Cronjob.DeleteCronJobRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
|
|
212
221
|
return fm.fetchReq<KpandaIoApiBatchV1alpha1Cronjob.DeleteCronJobRequest, GoogleProtobufEmpty.Empty>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/cronjobs/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
213
222
|
}
|