forked from armadaproject/armada
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsubmit.proto
More file actions
161 lines (140 loc) · 3.74 KB
/
Copy pathsubmit.proto
File metadata and controls
161 lines (140 loc) · 3.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
syntax = 'proto3';
package api;
import "google/protobuf/empty.proto";
import "k8s.io/api/core/v1/generated.proto";
import "google/api/annotations.proto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.goproto_stringer_all) = false;
option (gogoproto.stringer_all) = true;
message JobSubmitRequestItem {
double priority = 1;
string namespace = 3;
string client_id = 8;
map<string, string> labels = 4;
map<string, string> annotations = 5;
map<string, string> required_node_labels = 6 [deprecated = true]; // Use PodSpec.NodeSelector instead
k8s.io.api.core.v1.PodSpec pod_spec = 2 [deprecated = true]; // Use PodSpecs instead
repeated k8s.io.api.core.v1.PodSpec pod_specs = 7;
repeated IngressConfig ingress = 9;
}
message IngressConfig {
IngressType type = 1;
repeated uint32 ports = 2;
map<string, string> annotations = 3;
}
enum IngressType {
NodePort = 0;
Ingress = 1;
}
// swagger:model
message JobSubmitRequest {
string queue = 1;
string job_set_id = 2;
repeated JobSubmitRequestItem job_request_items = 3;
}
// swagger:model
message JobCancelRequest {
string job_id = 1;
string job_set_id = 2;
string queue = 3;
}
// swagger:model
message JobReprioritizeRequest {
repeated string job_ids = 1;
string job_set_id = 2;
string queue = 3;
double new_priority = 4;
}
// swagger:model
message JobReprioritizeResponse {
map<string, string> reprioritization_results = 1;
}
message JobSubmitResponseItem {
string job_id = 1;
string error = 2;
}
// swagger:model
message JobSubmitResponse {
repeated JobSubmitResponseItem job_response_items = 1;
}
// swagger:model
message Queue {
string name = 1;
double priority_factor = 2;
repeated string user_owners = 3;
repeated string group_owners = 4;
map<string, double> resource_limits = 5;
}
// swagger:model
message CancellationResult {
repeated string cancelled_ids = 1 [(gogoproto.jsontag) = "cancelledIds"];
}
//swagger:model
message QueueGetRequest {
string name = 1;
}
//swagger:model
message QueueInfoRequest {
string name = 1;
}
//swagger:model
message QueueDeleteRequest {
string name = 1;
}
//swagger:model
message QueueInfo {
string name = 1;
repeated JobSetInfo active_job_sets = 2;
}
message JobSetInfo {
string name = 1;
int32 queued_jobs = 2;
int32 leased_jobs = 3;
}
service Submit {
rpc SubmitJobs (JobSubmitRequest) returns (JobSubmitResponse) {
option (google.api.http) = {
post: "/v1/job/submit"
body: "*"
};
}
rpc CancelJobs (JobCancelRequest) returns (CancellationResult) {
option (google.api.http) = {
post: "/v1/job/cancel"
body: "*"
};
}
rpc ReprioritizeJobs (JobReprioritizeRequest) returns (JobReprioritizeResponse) {
option (google.api.http) = {
post: "/v1/job/reprioritize"
body: "*"
};
}
rpc CreateQueue (Queue) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/v1/queue"
body: "*"
};
}
rpc UpdateQueue (Queue) returns (google.protobuf.Empty) {
option (google.api.http) = {
put: "/v1/queue/{name}"
body: "*"
};
}
rpc DeleteQueue (QueueDeleteRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/queue/{name}"
};
}
rpc GetQueue (QueueGetRequest) returns (Queue) {
option (google.api.http) = {
get: "/v1/queue/{name}"
};
}
rpc GetQueueInfo (QueueInfoRequest) returns (QueueInfo) {
option (google.api.http) = {
get: "/v1/queue/{name}/info"
};
}
}