@daocloud-proto/kpanda 0.44.0-dev-c3df765e → 0.44.0-dev-12e923f2
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.
|
@@ -7,15 +7,6 @@
|
|
|
7
7
|
import * as KpandaIoApiTypesObjectmeta from "../../types/objectmeta.pb"
|
|
8
8
|
import * as KpandaIoApiTypesPage from "../../types/page.pb"
|
|
9
9
|
import * as KpandaIoApiBatchV1alpha1Job from "./job.pb"
|
|
10
|
-
|
|
11
|
-
export enum CronJobStatusCronJobState {
|
|
12
|
-
CRONJOB_STATE_UNSPECIFIED = "CRONJOB_STATE_UNSPECIFIED",
|
|
13
|
-
Waiting = "Waiting",
|
|
14
|
-
Activated = "Activated",
|
|
15
|
-
Stopped = "Stopped",
|
|
16
|
-
Deleting = "Deleting",
|
|
17
|
-
}
|
|
18
|
-
|
|
19
10
|
export type CronJob = {
|
|
20
11
|
metadata?: KpandaIoApiTypesObjectmeta.ObjectMeta
|
|
21
12
|
spec?: CronJobSpec
|
|
@@ -37,7 +28,7 @@ export type CronJobStatusCronJobCondition = {
|
|
|
37
28
|
}
|
|
38
29
|
|
|
39
30
|
export type CronJobStatus = {
|
|
40
|
-
phase?:
|
|
31
|
+
phase?: KpandaIoApiBatchV1alpha1Job.CronJobState
|
|
41
32
|
conditions?: CronJobStatusCronJobCondition[]
|
|
42
33
|
}
|
|
43
34
|
|
|
@@ -8,7 +8,7 @@ import * as KpandaIoApiCoreV1alpha1Pod from "../../core/v1alpha1/pod.pb"
|
|
|
8
8
|
import * as KpandaIoApiTypesObjectmeta from "../../types/objectmeta.pb"
|
|
9
9
|
import * as KpandaIoApiTypesPage from "../../types/page.pb"
|
|
10
10
|
|
|
11
|
-
export enum
|
|
11
|
+
export enum JobState {
|
|
12
12
|
JOB_STATE_UNSPECIFIED = "JOB_STATE_UNSPECIFIED",
|
|
13
13
|
Waiting = "Waiting",
|
|
14
14
|
Running = "Running",
|
|
@@ -17,6 +17,14 @@ export enum JobStatusJobState {
|
|
|
17
17
|
Failed = "Failed",
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
export enum CronJobState {
|
|
21
|
+
CRONJOB_STATE_UNSPECIFIED = "CRONJOB_STATE_UNSPECIFIED",
|
|
22
|
+
Waiting_CronJob = "Waiting_CronJob",
|
|
23
|
+
Activated_CronJob = "Activated_CronJob",
|
|
24
|
+
Stopped_CronJob = "Stopped_CronJob",
|
|
25
|
+
Deleting_CronJob = "Deleting_CronJob",
|
|
26
|
+
}
|
|
27
|
+
|
|
20
28
|
export type Job = {
|
|
21
29
|
metadata?: KpandaIoApiTypesObjectmeta.ObjectMeta
|
|
22
30
|
spec?: JobSpec
|
|
@@ -32,7 +40,7 @@ export type JobStatus = {
|
|
|
32
40
|
active?: number
|
|
33
41
|
succeed?: number
|
|
34
42
|
failed?: number
|
|
35
|
-
phase?:
|
|
43
|
+
phase?: JobState
|
|
36
44
|
conditions?: KpandaIoApiTypesObjectmeta.Condition[]
|
|
37
45
|
}
|
|
38
46
|
|
|
@@ -60,8 +68,8 @@ export type GetJobRequest = {
|
|
|
60
68
|
|
|
61
69
|
export type ListBatchRequest = {
|
|
62
70
|
cluster?: string
|
|
63
|
-
|
|
64
|
-
|
|
71
|
+
jobState?: JobState
|
|
72
|
+
cronjobState?: CronJobState
|
|
65
73
|
page?: number
|
|
66
74
|
pageSize?: number
|
|
67
75
|
sortBy?: KpandaIoApiTypesPage.SortBy
|
|
@@ -73,12 +81,28 @@ export type ListBatchRequest = {
|
|
|
73
81
|
gpuType?: string
|
|
74
82
|
}
|
|
75
83
|
|
|
76
|
-
export type
|
|
84
|
+
export type ListJobsResponse = {
|
|
77
85
|
items?: Job[]
|
|
78
86
|
pagination?: KpandaIoApiTypesPage.Pagination
|
|
79
87
|
}
|
|
80
88
|
|
|
81
|
-
export type
|
|
89
|
+
export type ListClusterBatchRequest = {
|
|
90
|
+
cluster?: string
|
|
91
|
+
namespace?: string
|
|
92
|
+
jobState?: JobState
|
|
93
|
+
cronjobState?: CronJobState
|
|
94
|
+
page?: number
|
|
95
|
+
pageSize?: number
|
|
96
|
+
sortBy?: KpandaIoApiTypesPage.SortBy
|
|
97
|
+
sortDir?: KpandaIoApiTypesPage.SortDir
|
|
98
|
+
name?: string
|
|
99
|
+
labelSelector?: string
|
|
100
|
+
fieldSelector?: string
|
|
101
|
+
fuzzyName?: string
|
|
102
|
+
gpuType?: string
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export type ListClusterJobsResponse = {
|
|
82
106
|
items?: Job[]
|
|
83
107
|
pagination?: KpandaIoApiTypesPage.Pagination
|
|
84
108
|
}
|
|
@@ -86,7 +110,8 @@ export type ListJobsResponse = {
|
|
|
86
110
|
export type ListAllBatchRequest = {
|
|
87
111
|
clusters?: string[]
|
|
88
112
|
namespace?: string
|
|
89
|
-
|
|
113
|
+
jobState?: JobState
|
|
114
|
+
cronjobState?: CronJobState
|
|
90
115
|
page?: number
|
|
91
116
|
pageSize?: number
|
|
92
117
|
sortBy?: KpandaIoApiTypesPage.SortBy
|
|
@@ -265,11 +265,11 @@ export class Batch {
|
|
|
265
265
|
static ListAllCronJobs(req: KpandaIoApiBatchV1alpha1Job.ListAllBatchRequest, initReq?: fm.InitReq): Promise<KpandaIoApiBatchV1alpha1Cronjob.ListClusterCronJobsResponse> {
|
|
266
266
|
return fm.fetchReq<KpandaIoApiBatchV1alpha1Job.ListAllBatchRequest, KpandaIoApiBatchV1alpha1Cronjob.ListClusterCronJobsResponse>(`/apis/kpanda.io/v1alpha1/asl/cronjobs?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
267
267
|
}
|
|
268
|
-
static ListCronJobs(req:
|
|
269
|
-
return fm.fetchReq<
|
|
268
|
+
static ListCronJobs(req: KpandaIoApiBatchV1alpha1Job.ListBatchRequest, initReq?: fm.InitReq): Promise<KpandaIoApiBatchV1alpha1Cronjob.ListCronJobsResponse> {
|
|
269
|
+
return fm.fetchReq<KpandaIoApiBatchV1alpha1Job.ListBatchRequest, KpandaIoApiBatchV1alpha1Cronjob.ListCronJobsResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/cronjobs?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
270
270
|
}
|
|
271
|
-
static ListClusterCronJobs(req: KpandaIoApiBatchV1alpha1Job.
|
|
272
|
-
return fm.fetchReq<KpandaIoApiBatchV1alpha1Job.
|
|
271
|
+
static ListClusterCronJobs(req: KpandaIoApiBatchV1alpha1Job.ListClusterBatchRequest, initReq?: fm.InitReq): Promise<KpandaIoApiBatchV1alpha1Cronjob.ListClusterCronJobsResponse> {
|
|
272
|
+
return fm.fetchReq<KpandaIoApiBatchV1alpha1Job.ListClusterBatchRequest, KpandaIoApiBatchV1alpha1Cronjob.ListClusterCronJobsResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/cronjobs?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
273
273
|
}
|
|
274
274
|
static GetCronJob(req: KpandaIoApiBatchV1alpha1Cronjob.GetCronJobRequest, initReq?: fm.InitReq): Promise<KpandaIoApiBatchV1alpha1Cronjob.CronJob> {
|
|
275
275
|
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"})
|
|
@@ -289,11 +289,11 @@ export class Batch {
|
|
|
289
289
|
static ListAllJobs(req: KpandaIoApiBatchV1alpha1Job.ListAllBatchRequest, initReq?: fm.InitReq): Promise<KpandaIoApiBatchV1alpha1Job.ListClusterJobsResponse> {
|
|
290
290
|
return fm.fetchReq<KpandaIoApiBatchV1alpha1Job.ListAllBatchRequest, KpandaIoApiBatchV1alpha1Job.ListClusterJobsResponse>(`/apis/kpanda.io/v1alpha1/asl/jobs?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
291
291
|
}
|
|
292
|
-
static ListJobs(req:
|
|
293
|
-
return fm.fetchReq<
|
|
292
|
+
static ListJobs(req: KpandaIoApiBatchV1alpha1Job.ListBatchRequest, initReq?: fm.InitReq): Promise<KpandaIoApiBatchV1alpha1Job.ListJobsResponse> {
|
|
293
|
+
return fm.fetchReq<KpandaIoApiBatchV1alpha1Job.ListBatchRequest, KpandaIoApiBatchV1alpha1Job.ListJobsResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/jobs?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
|
|
294
294
|
}
|
|
295
|
-
static ListClusterJobs(req: KpandaIoApiBatchV1alpha1Job.
|
|
296
|
-
return fm.fetchReq<KpandaIoApiBatchV1alpha1Job.
|
|
295
|
+
static ListClusterJobs(req: KpandaIoApiBatchV1alpha1Job.ListClusterBatchRequest, initReq?: fm.InitReq): Promise<KpandaIoApiBatchV1alpha1Job.ListClusterJobsResponse> {
|
|
296
|
+
return fm.fetchReq<KpandaIoApiBatchV1alpha1Job.ListClusterBatchRequest, KpandaIoApiBatchV1alpha1Job.ListClusterJobsResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/jobs?${fm.renderURLSearchParams(req, ["cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
297
297
|
}
|
|
298
298
|
static GetJob(req: KpandaIoApiBatchV1alpha1Job.GetJobRequest, initReq?: fm.InitReq): Promise<KpandaIoApiBatchV1alpha1Job.Job> {
|
|
299
299
|
return fm.fetchReq<KpandaIoApiBatchV1alpha1Job.GetJobRequest, KpandaIoApiBatchV1alpha1Job.Job>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/jobs/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|