forked from armadaproject/armada
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathqueue.proto
More file actions
118 lines (98 loc) · 3.77 KB
/
Copy pathqueue.proto
File metadata and controls
118 lines (98 loc) · 3.77 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
syntax = 'proto3';
package api;
import "google/protobuf/timestamp.proto";
import "k8s.io/api/core/v1/generated.proto";
import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "google/protobuf/empty.proto";
import "pkg/api/submit.proto";
option (gogoproto.goproto_stringer_all) = false;
option (gogoproto.stringer_all) = true;
message Job {
string id = 1;
string client_id = 13;
string job_set_id = 2;
string queue = 3;
string namespace = 7;
map<string, string> labels = 9;
map<string, string> annotations = 10;
map<string, string> required_node_labels = 11 [deprecated = true];
string owner = 8;
repeated string queue_ownership_user_groups = 15;
double priority = 4;
k8s.io.api.core.v1.PodSpec pod_spec = 5 [deprecated = true]; // Use PodSpecs instead
repeated k8s.io.api.core.v1.PodSpec pod_specs = 12;
google.protobuf.Timestamp created = 6 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
repeated IngressConfig ingress = 14;
}
message LeaseRequest {
string cluster_id = 1;
string pool = 8;
map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> resources = 2 [(gogoproto.nullable) = false];
ClusterLeasedReport cluster_leased_report = 4 [(gogoproto.nullable) = false];
map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> minimum_job_size = 6 [(gogoproto.nullable) = false];
repeated NodeInfo nodes = 7 [(gogoproto.nullable) = false];
}
message NodeInfo {
string name = 1;
repeated k8s.io.api.core.v1.Taint taints = 2 [(gogoproto.nullable) = false];
map<string,string> labels = 3;
map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> allocatable_resources = 4 [(gogoproto.nullable) = false];
map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> available_resources = 5 [(gogoproto.nullable) = false];
}
message NodeType {
repeated k8s.io.api.core.v1.Taint taints = 1 [(gogoproto.nullable) = false];
map<string,string> labels = 2;
map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> allocatable_resources = 3 [(gogoproto.nullable) = false];
}
// Used to store last info in Redis
message ClusterSchedulingInfoReport {
string cluster_id = 1;
string pool = 7;
google.protobuf.Timestamp report_time = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
repeated NodeType node_types = 5;
map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> minimum_job_size = 6 [(gogoproto.nullable) = false];
}
message QueueLeasedReport {
string name = 1;
map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> resources_leased = 2 [(gogoproto.nullable) = false];
}
message ClusterLeasedReport {
string cluster_id = 1;
google.protobuf.Timestamp report_time = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
repeated QueueLeasedReport queues = 3;
}
message ComputeResource {
map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> resources = 1 [(gogoproto.nullable) = false];
}
message NodeLabeling {
map<string,string> labels = 3;
}
message JobLease {
repeated Job job = 1;
}
message IdList {
repeated string ids = 1;
}
message RenewLeaseRequest {
string cluster_id = 1;
repeated string ids = 2;
}
message ReturnLeaseRequest {
string cluster_id = 1;
string job_id = 2;
OrderedStringMap avoid_node_labels = 4;
}
service AggregatedQueue {
rpc LeaseJobs (LeaseRequest) returns (JobLease);
rpc RenewLease (RenewLeaseRequest) returns (IdList);
rpc ReturnLease (ReturnLeaseRequest) returns (google.protobuf.Empty);
rpc ReportDone (IdList) returns (IdList);
}
message StringKeyValuePair {
string key = 1;
string value = 2;
}
message OrderedStringMap {
repeated StringKeyValuePair entries = 1;
}