Skip to content

Commit

Permalink
k8s: add DescribeJob API (#2360)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbansal7 committed Sep 2, 2022
1 parent 8cb2e3d commit f9eb6f7
Show file tree
Hide file tree
Showing 12 changed files with 1,871 additions and 795 deletions.
26 changes: 26 additions & 0 deletions api/k8s/v1/k8s.proto
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,14 @@ service K8sAPI {
option (clutch.api.v1.action).type = DELETE;
}

rpc DescribeJob(DescribeJobRequest) returns (DescribeJobResponse) {
option (google.api.http) = {
post : "/v1/k8s/describeJob"
body : "*"
};
option (clutch.api.v1.action).type = READ;
}

rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {
option (google.api.http) = {
post : "/v1/k8s/listJobs"
Expand Down Expand Up @@ -995,6 +1003,24 @@ message Job {
map<string, string> labels = 5;
}

message DescribeJobRequest {
option (clutch.api.v1.id).patterns = {
type_url : "clutch.k8s.v1.Job",
pattern : "{cluster}/{namespace}/{name}"
};

string clientset = 1 [ (validate.rules).string = {min_bytes : 1} ];
string cluster = 2 [ (validate.rules).string = {min_bytes : 1} ];
string namespace = 3 [ (validate.rules).string = {min_bytes : 1} ];
string name = 4 [ (validate.rules).string = {min_bytes : 1} ];
}

message DescribeJobResponse {
option (clutch.api.v1.reference).fields = "job";

Job job = 1 [ (clutch.api.v1.log) = false ];
}

message ListJobsRequest {
option (clutch.api.v1.id).patterns = {
type_url : "clutch.k8s.v1.Namespace",
Expand Down

0 comments on commit f9eb6f7

Please sign in to comment.