2023-03-28 22:48:58 +00:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
2023-08-21 17:31:54 +00:00
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
2023-03-28 22:48:58 +00:00
|
|
|
|
2022-03-27 10:59:30 +00:00
|
|
|
// Package dataplane provides a service on Consul servers for the Consul Dataplane
|
|
|
|
|
|
|
|
syntax = "proto3";
|
|
|
|
|
2022-07-22 18:59:34 +00:00
|
|
|
package hashicorp.consul.dataplane;
|
2022-03-27 10:59:30 +00:00
|
|
|
|
2023-02-17 21:14:46 +00:00
|
|
|
import "annotations/ratelimit/ratelimit.proto";
|
2022-04-20 00:24:21 +00:00
|
|
|
import "google/protobuf/struct.proto";
|
2022-03-27 10:59:30 +00:00
|
|
|
|
2022-04-20 00:24:21 +00:00
|
|
|
message GetSupportedDataplaneFeaturesRequest {}
|
2022-03-27 10:59:30 +00:00
|
|
|
|
|
|
|
enum DataplaneFeatures {
|
2022-05-23 14:37:52 +00:00
|
|
|
DATAPLANE_FEATURES_UNSPECIFIED = 0;
|
|
|
|
DATAPLANE_FEATURES_WATCH_SERVERS = 1;
|
|
|
|
DATAPLANE_FEATURES_EDGE_CERTIFICATE_MANAGEMENT = 2;
|
|
|
|
DATAPLANE_FEATURES_ENVOY_BOOTSTRAP_CONFIGURATION = 3;
|
2023-05-31 15:53:37 +00:00
|
|
|
DATAPLANE_FEATURES_FIPS = 4;
|
2022-03-27 10:59:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message DataplaneFeatureSupport {
|
2022-04-20 00:24:21 +00:00
|
|
|
DataplaneFeatures feature_name = 1;
|
|
|
|
bool supported = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetSupportedDataplaneFeaturesResponse {
|
|
|
|
repeated DataplaneFeatureSupport supported_dataplane_features = 1;
|
2022-03-27 10:59:30 +00:00
|
|
|
}
|
|
|
|
|
2022-04-20 00:24:21 +00:00
|
|
|
message GetEnvoyBootstrapParamsRequest {
|
|
|
|
oneof node_spec {
|
|
|
|
string node_id = 1;
|
|
|
|
string node_name = 2;
|
|
|
|
}
|
|
|
|
// The proxy service ID
|
|
|
|
string service_id = 3;
|
|
|
|
string partition = 4;
|
|
|
|
string namespace = 5;
|
2022-03-27 10:59:30 +00:00
|
|
|
}
|
|
|
|
|
2022-04-20 00:24:21 +00:00
|
|
|
enum ServiceKind {
|
2022-05-23 14:37:52 +00:00
|
|
|
// ServiceKind UNSPECIFIED is a sentinel value for when a request
|
|
|
|
// did not specify a service kind. This will be treated the same
|
|
|
|
// as if TYPICAL was explicitly used.
|
|
|
|
SERVICE_KIND_UNSPECIFIED = 0;
|
|
|
|
|
2022-04-20 00:24:21 +00:00
|
|
|
// ServiceKind Typical is a typical, classic Consul service. This is
|
|
|
|
// represented by the absence of a value. This was chosen for ease of
|
|
|
|
// backwards compatibility: existing services in the catalog would
|
|
|
|
// default to the typical service.
|
2022-05-23 14:37:52 +00:00
|
|
|
SERVICE_KIND_TYPICAL = 1;
|
2022-04-20 00:24:21 +00:00
|
|
|
|
|
|
|
// ServiceKind Connect Proxy is a proxy for the Connect feature. This
|
|
|
|
// service proxies another service within Consul and speaks the connect
|
|
|
|
// protocol.
|
2022-05-23 14:37:52 +00:00
|
|
|
SERVICE_KIND_CONNECT_PROXY = 2;
|
2022-04-20 00:24:21 +00:00
|
|
|
|
|
|
|
// ServiceKind Mesh Gateway is a Mesh Gateway for the Connect feature. This
|
|
|
|
// service will proxy connections based off the SNI header set by other
|
|
|
|
// connect proxies.
|
2022-05-23 14:37:52 +00:00
|
|
|
SERVICE_KIND_MESH_GATEWAY = 3;
|
2022-04-20 00:24:21 +00:00
|
|
|
|
|
|
|
// ServiceKind Terminating Gateway is a Terminating Gateway for the Connect
|
|
|
|
// feature. This service will proxy connections to services outside the mesh.
|
2022-05-23 14:37:52 +00:00
|
|
|
SERVICE_KIND_TERMINATING_GATEWAY = 4;
|
2022-04-20 00:24:21 +00:00
|
|
|
|
|
|
|
// ServiceKind Ingress Gateway is an Ingress Gateway for the Connect feature.
|
|
|
|
// This service will ingress connections into the service mesh.
|
2022-05-23 14:37:52 +00:00
|
|
|
SERVICE_KIND_INGRESS_GATEWAY = 5;
|
2023-02-08 21:52:12 +00:00
|
|
|
|
|
|
|
// ServiceKind API Gateway is an API Gateway for the Connect feature.
|
|
|
|
// This service will ingress connections in to the service mesh.
|
|
|
|
SERVICE_KIND_API_GATEWAY = 6;
|
2022-04-20 00:24:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetEnvoyBootstrapParamsResponse {
|
|
|
|
ServiceKind service_kind = 1;
|
2022-08-24 11:03:15 +00:00
|
|
|
// service is be used to identify the service (as the local cluster name and
|
|
|
|
// in metric tags). If the service is a connect proxy it will be the name of
|
|
|
|
// the proxy's destination service, for gateways it will be the gateway
|
|
|
|
// service's name.
|
2022-04-20 00:24:21 +00:00
|
|
|
string service = 2;
|
|
|
|
string namespace = 3;
|
|
|
|
string partition = 4;
|
|
|
|
string datacenter = 5;
|
|
|
|
google.protobuf.Struct config = 6;
|
2022-08-24 11:03:15 +00:00
|
|
|
string node_id = 7;
|
|
|
|
string node_name = 8;
|
2023-01-11 18:40:09 +00:00
|
|
|
repeated string access_logs = 9;
|
2022-04-20 00:24:21 +00:00
|
|
|
}
|
2022-03-27 10:59:30 +00:00
|
|
|
|
|
|
|
service DataplaneService {
|
2023-01-04 16:07:02 +00:00
|
|
|
rpc GetSupportedDataplaneFeatures(GetSupportedDataplaneFeaturesRequest) returns (GetSupportedDataplaneFeaturesResponse) {
|
2023-03-20 15:24:29 +00:00
|
|
|
option (hashicorp.consul.internal.ratelimit.spec) = {
|
|
|
|
operation_type: OPERATION_TYPE_READ,
|
|
|
|
operation_category: OPERATION_CATEGORY_DATAPLANE
|
|
|
|
};
|
2023-01-04 16:07:02 +00:00
|
|
|
}
|
2022-04-20 00:24:21 +00:00
|
|
|
|
2023-01-04 16:07:02 +00:00
|
|
|
rpc GetEnvoyBootstrapParams(GetEnvoyBootstrapParamsRequest) returns (GetEnvoyBootstrapParamsResponse) {
|
2023-03-20 15:24:29 +00:00
|
|
|
option (hashicorp.consul.internal.ratelimit.spec) = {
|
|
|
|
operation_type: OPERATION_TYPE_READ,
|
|
|
|
operation_category: OPERATION_CATEGORY_DATAPLANE
|
|
|
|
};
|
2023-01-04 16:07:02 +00:00
|
|
|
}
|
2022-04-20 00:24:21 +00:00
|
|
|
}
|