Skip to content

Commit

Permalink
Upgrade grpc-gateway to a version that supports internal api methods
Browse files Browse the repository at this point in the history
- Mark some soon to be removed endpoints as internal
  • Loading branch information
foot committed Oct 17, 2023
1 parent cf7795d commit 5c6f51f
Show file tree
Hide file tree
Showing 16 changed files with 1,308 additions and 1,155 deletions.
37 changes: 35 additions & 2 deletions api/core/core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ syntax = "proto3";
package gitops_core.v1;

import "google/api/annotations.proto";
import "google/api/visibility.proto";
import "google/protobuf/any.proto";
import "protoc-gen-openapiv2/options/annotations.proto";

Expand Down Expand Up @@ -68,6 +69,36 @@ service Core {
};
}

/*
* GetReconciledObjects returns a list of objects that were created
* as a result of reconciling a Flux automation.
* This list is derived by looking at the Kustomization or HelmRelease
* specified in the request body.
*/
rpc GetReconciledObjects(GetReconciledObjectsRequest)
returns (GetReconciledObjectsResponse) {
option (google.api.method_visibility).restriction = "INTERNAL";
option (google.api.http) = {
post: "/v1/reconciled_objects"
body: "*"
};
};

/*
* GetChildObjects returns the children of a given object,
* specified by a GroupVersionKind.
* Not all Kubernets objects have children. For example, a Deployment
* has a child ReplicaSet, but a Service has no child objects.
*/
rpc GetChildObjects(GetChildObjectsRequest)
returns (GetChildObjectsResponse) {
option (google.api.method_visibility).restriction = "INTERNAL";
option (google.api.http) = {
post: "/v1/child_objects"
body: "*"
};
};

/*
* List events for an object
*/
Expand All @@ -84,7 +115,7 @@ service Core {
rpc SyncFluxObject(SyncFluxObjectRequest) returns (SyncFluxObjectResponse) {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { tags: ["objects"]; };
option (google.api.http) = {
post: "/v1/sync"
patch: "/v1/sync"
body: "*"
};
}
Expand Down Expand Up @@ -115,7 +146,7 @@ service Core {
returns (ToggleSuspendResourceResponse) {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { tags: ["objects"]; };
option (google.api.http) = {
post: "/v1/suspend"
patch: "/v1/suspend"
body: "*"
};
}
Expand All @@ -124,6 +155,7 @@ service Core {
* Get the logs for a GitOpsRun session
*/
rpc GetSessionLogs(GetSessionLogsRequest) returns (GetSessionLogsResponse) {
option (google.api.method_visibility).restriction = "INTERNAL";
option (google.api.http) = {
get: "/v1/session-logs"
};
Expand All @@ -137,6 +169,7 @@ service Core {
* installed or not on that cluster.
*/
rpc IsCRDAvailable(IsCRDAvailableRequest) returns (IsCRDAvailableResponse) {
option (google.api.method_visibility).restriction = "INTERNAL";
option (google.api.http) = {
get : "/v1/crds/{name}/is-available",
};
Expand Down
Loading

0 comments on commit 5c6f51f

Please sign in to comment.