constellation/coordinator/pubapi/pubproto/pubapi.proto

147 lines
3.4 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
package pubapi;
option go_package = "github.com/edgelesssys/constellation/coordinator/pubapi/pubproto";
service API {
rpc GetState(GetStateRequest) returns (GetStateResponse);
rpc ActivateAsCoordinator(ActivateAsCoordinatorRequest) returns (stream ActivateAsCoordinatorResponse);
rpc ActivateAsNode(stream ActivateAsNodeRequest) returns (stream ActivateAsNodeResponse);
rpc ActivateAdditionalNodes(ActivateAdditionalNodesRequest) returns (stream ActivateAdditionalNodesResponse);
rpc ActivateAsAdditionalCoordinator(ActivateAsAdditionalCoordinatorRequest) returns (ActivateAsAdditionalCoordinatorResponse);
rpc ActivateAdditionalCoordinator(ActivateAdditionalCoordinatorRequest) returns (ActivateAdditionalCoordinatorResponse);
rpc JoinCluster(JoinClusterRequest) returns (JoinClusterResponse);
rpc TriggerNodeUpdate(TriggerNodeUpdateRequest) returns (TriggerNodeUpdateResponse);
rpc TriggerCoordinatorUpdate(TriggerCoordinatorUpdateRequest) returns (TriggerCoordinatorUpdateResponse);
rpc GetPeerVPNPublicKey(GetPeerVPNPublicKeyRequest) returns (GetPeerVPNPublicKeyResponse);
rpc RequestStateDiskKey(RequestStateDiskKeyRequest) returns (RequestStateDiskKeyResponse);
}
message GetStateRequest {
}
message GetStateResponse {
uint32 state = 1;
}
message ActivateAsCoordinatorRequest {
bytes admin_vpn_pub_key = 1;
repeated string node_public_ips = 2;
repeated string coordinator_public_ips = 3;
repeated string autoscaling_node_groups = 4;
bytes master_secret = 5;
string kms_uri = 6;
string storage_uri = 7;
string key_encryption_key_id = 8;
bool use_existing_kek = 9;
string cloud_service_account_uri = 10;
}
message ActivateAsCoordinatorResponse {
oneof content {
AdminConfig admin_config = 1;
Log log = 2;
}
}
message ActivateAsNodeRequest {
oneof request {
ActivateAsNodeInitialRequest initial_request = 1;
bytes state_disk_key = 2;
}
}
message ActivateAsNodeInitialRequest {
string node_vpn_ip = 1;
repeated Peer peers = 2;
bytes owner_id = 3;
bytes cluster_id = 4;
}
message ActivateAsNodeResponse {
oneof response {
bytes node_vpn_pub_key = 1;
string state_disk_uuid = 2;
}
}
message ActivateAdditionalNodesRequest {
repeated string node_public_ips = 1;
}
message ActivateAdditionalNodesResponse {
Log log = 1;
}
message ActivateAsAdditionalCoordinatorRequest {
string assigned_vpn_ip = 1;
Peer activating_coordinator_data = 2;
repeated Peer peers = 3;
bytes owner_id = 4;
bytes cluster_id = 5;
}
message ActivateAsAdditionalCoordinatorResponse {
}
message ActivateAdditionalCoordinatorRequest {
string coordinator_public_ip = 1;
}
message ActivateAdditionalCoordinatorResponse {
}
message JoinClusterRequest {
string coordinator_vpn_ip = 1;
}
message JoinClusterResponse {
}
message TriggerNodeUpdateRequest {
}
message TriggerNodeUpdateResponse {
}
message TriggerCoordinatorUpdateRequest {
}
message TriggerCoordinatorUpdateResponse {
}
message RequestStateDiskKeyRequest {
string disk_uuid = 1;
}
message RequestStateDiskKeyResponse {
}
message GetPeerVPNPublicKeyRequest {
}
message GetPeerVPNPublicKeyResponse {
bytes coordinator_pub_key = 1;
}
message AdminConfig {
string admin_vpn_ip = 1;
bytes coordinator_vpn_pub_key = 2;
bytes kubeconfig = 3;
bytes owner_id = 4;
bytes cluster_id = 5;
}
message Log {
string message = 1;
}
message Peer {
string public_ip = 1;
string vpn_ip = 2;
bytes vpn_pub_key = 3;
uint32 role = 4;
}