blob: d884efc9d356b6b50eab7c3f4e8c015ff750311b [file] [log] [blame]
syntax = "proto3";
package dubbo.mesh.v1alpha1;
option go_package = "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1";
import "google/protobuf/wrappers.proto";
import "google/protobuf/struct.proto";
import "api/mesh/options.proto";
// Mesh defines configuration of a single mesh.
message Mesh {
option (dubbo.mesh.resource).name = "MeshResource";
option (dubbo.mesh.resource).type = "Mesh";
option (dubbo.mesh.resource).package = "mesh";
option (dubbo.mesh.resource).global = true;
option (dubbo.mesh.resource).dds.send_to_zone = true;
option (dubbo.mesh.resource).ws.name = "mesh";
option (dubbo.mesh.resource).ws.plural = "meshes";
option (dubbo.mesh.resource).allow_to_inspect = true;
// mTLS settings of a Mesh.
message Mtls {
// Name of the enabled backend
string enabledBackend = 1;
// List of available Certificate Authority backends
repeated CertificateAuthorityBackend backends = 2;
}
// mTLS settings.
// +optional
Mtls mtls = 1;
// Tracing settings.
// +optional
Tracing tracing = 2;
// Logging settings.
// +optional
Logging logging = 3;
// Networking settings of the mesh
Networking networking = 5;
// Routing settings of the mesh
Routing routing = 6;
}
// CertificateAuthorityBackend defines Certificate Authority backend
message CertificateAuthorityBackend {
// Name of the backend
string name = 1;
// Type of the backend. Has to be one of the loaded plugins (Dubbo ships with
// builtin and provided)
string type = 2;
// DpCert defines settings for certificates generated for Dataplanes
message DpCert {
// Rotation defines rotation settings for Dataplane certificate
message Rotation {
// Time after which generated certificate for Dataplane will expire
string expiration = 1;
}
// Rotation settings
Rotation rotation = 1;
}
// Dataplane certificate settings
DpCert dpCert = 3;
// Configuration of the backend
google.protobuf.Struct conf = 4;
}
// Networking defines the networking configuration of the mesh
message Networking {
// Outbound describes the common mesh outbound settings
message Outbound {
// Control the passthrough cluster
google.protobuf.BoolValue passthrough = 1;
}
// Outbound settings
Outbound outbound = 1;
}
// Tracing defines tracing configuration of the mesh.
message Tracing {
// Name of the default backend
string defaultBackend = 1;
// List of available tracing backends
repeated TracingBackend backends = 2;
}
// TracingBackend defines tracing backend available to mesh. Backends can be
// used in TrafficTrace rules.
message TracingBackend {
// Name of the backend, can be then used in Mesh.tracing.defaultBackend or in
// TrafficTrace
string name = 1;
// Percentage of traces that will be sent to the backend (range 0.0 - 100.0).
// Empty value defaults to 100.0%
google.protobuf.DoubleValue sampling = 2;
// Type of the backend (Dubbo ships with 'zipkin')
string type = 3;
// Configuration of the backend
google.protobuf.Struct conf = 4;
}
message ZipkinTracingBackendConfig {
// Address of Zipkin collector.
string url = 1;
// Generate 128bit traces. Default: false
bool traceId128bit = 2;
// Version of the API. values: httpJson, httpJsonV1, httpProto. Default:
// httpJson see
// https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/trace/v3/trace.proto#envoy-v3-api-enum-config-trace-v3-zipkinconfig-collectorendpointversion
string apiVersion = 3;
// Determines whether client and server spans will share the same span
// context. Default: true.
// https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/trace/v3/zipkin.proto#config-trace-v3-zipkinconfig
google.protobuf.BoolValue sharedSpanContext = 4;
}
message Logging {
// Name of the default backend
string defaultBackend = 1;
// List of available logging backends
repeated LoggingBackend backends = 2;
}
// LoggingBackend defines logging backend available to mesh. Backends can be
// used in TrafficLog rules.
message LoggingBackend {
// Name of the backend, can be then used in Mesh.logging.defaultBackend or in
// TrafficLogging
string name = 1;
// Format of access logs. Placehodlers available on
// https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log
string format = 2;
// Type of the backend (Dubbo ships with 'tcp' and 'file')
string type = 3;
// Configuration of the backend
google.protobuf.Struct conf = 4;
}
// FileLoggingBackendConfig defines configuration for file based access logs
message FileLoggingBackendConfig {
// Path to a file that logs will be written to
string path = 1;
}
// TcpLoggingBackendConfig defines configuration for TCP based access logs
message TcpLoggingBackendConfig {
// Address to TCP service that will receive logs
string address = 1;
}
// Routing defines configuration for the routing in the mesh
message Routing {
// Enable the Locality Aware Load Balancing
bool localityAwareLoadBalancing = 1;
// Enable routing traffic to services in other zone or external services
// through ZoneEgress. Default: false
bool zoneEgress = 2;
}