Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cloud blueprints CRUD support #2778

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/continue-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ jobs:
name: Apply Policy
working_directory: .
command: |
go run ./cmd/aperturectl/main.go cloud apply policy --file ./playground/scenarios/<< parameters.scenario-name >>/policies/<< parameters.policy-name >>-cr.yaml \
go run ./cmd/aperturectl/main.go cloud policy apply --file ./playground/scenarios/<< parameters.scenario-name >>/policies/<< parameters.policy-name >>-cr.yaml \
--controller << parameters.controller-endpoint >> --api-key ${CONTROLLER_API_KEY} --project-name latest-dev -f -s
- save_cache:
name: Save go cache
Expand Down
52 changes: 52 additions & 0 deletions api/aperture/cloud/v1/blueprints.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
syntax = "proto3";

package aperture.cloud.v1;

import "google/api/annotations.proto";
import "google/protobuf/empty.proto";

// BlueprintsService is used to receive health and status info from agents.
service BlueprintsService {
rpc List(google.protobuf.Empty) returns (ListResponse) {
option (google.api.http) = {get: "/fluxninja/v1/blueprints"};
}

rpc Get(GetRequest) returns (GetResponse) {
option (google.api.http) = {get: "/fluxninja/v1/blueprints/{policy_name}"};
}

rpc Apply(ApplyRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {post: "/fluxninja/v1/blueprints"};
}

rpc Delete(DeleteRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {delete: "/fluxninja/v1/blueprints/{policy_name}"};
}
}

message Blueprint {
string blueprints_name = 1;
string version = 2;
string policy_name = 3;
bytes values = 4;
}

message ListResponse {
repeated Blueprint blueprints = 1;
}

message GetRequest {
string policy_name = 1;
}

message GetResponse {
Blueprint blueprint = 1;
}

message ApplyRequest {
Blueprint blueprint = 1;
}

message DeleteRequest {
string policy_name = 1;
}
1 change: 1 addition & 0 deletions api/aperture/cmd/v1/cmd.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ service Controller {
rpc PreviewFlowLabels(PreviewFlowLabelsRequest) returns (PreviewFlowLabelsControllerResponse);
rpc PreviewHTTPRequests(PreviewHTTPRequestsRequest) returns (PreviewHTTPRequestsControllerResponse);

rpc GetPolicy(aperture.policy.language.v1.GetPolicyRequest) returns (aperture.policy.language.v1.GetPolicyResponse);
rpc UpsertPolicy(aperture.policy.language.v1.UpsertPolicyRequest) returns (aperture.policy.language.v1.UpsertPolicyResponse);
rpc PostDynamicConfig(aperture.policy.language.v1.PostDynamicConfigRequest) returns (google.protobuf.Empty);
rpc DeletePolicy(aperture.policy.language.v1.DeletePolicyRequest) returns (google.protobuf.Empty);
Expand Down
Loading
Loading