blob: 45a6d2ee2c9b2dd8dc3530a9498b142151aed289 [file] [log] [blame]
syntax = "proto3";
package dubbo.mesh.v1alpha1;
option go_package = "github.com/apache/dubbo-kubernetes/api/mesh/v1alpha1";
import "api/mesh/options.proto";
import "google/protobuf/timestamp.proto";
import "validate/validate.proto";
// DataplaneInsight defines the observed state of a Dataplane.
message DataplaneInsight {
option (dubbo.mesh.resource).name = "DataplaneInsightResource";
option (dubbo.mesh.resource).type = "DataplaneInsight";
option (dubbo.mesh.resource).package = "mesh";
option (dubbo.mesh.resource).dds.send_to_global = true;
option (dubbo.mesh.resource).ws.name = "dataplane-insight";
option (dubbo.mesh.resource).ws.read_only = true;
option (dubbo.mesh.resource).scope_namespace = true;
// List of ADS subscriptions created by a given Dataplane.
repeated DiscoverySubscription subscriptions = 1;
// Insights about mTLS for Dataplane.
MTLS mTLS = 2;
// MTLS defines insights for mTLS
message MTLS {
// Expiration time of the last certificate that was generated for a
// Dataplane.
google.protobuf.Timestamp certificate_expiration_time = 1;
// Time on which the last certificate was generated.
google.protobuf.Timestamp last_certificate_regeneration = 2;
// Number of certificate regenerations for a Dataplane.
uint32 certificate_regenerations = 3;
// Backend that was used to generate current certificate
string issuedBackend = 4;
// Supported backends (CA).
repeated string supportedBackends = 5;
}
}
// DiscoverySubscription describes a single ADS subscription
// created by a Dataplane to the Control Plane.
// Ideally, there should be only one such subscription per Dataplane lifecycle.
// Presence of multiple subscriptions might indicate one of the following
// events:
// - transient loss of network connection between Dataplane and Control Plane
// - Dataplane restart (i.e. hot restart or crash)
// - Control Plane restart (i.e. rolling update or crash)
// - etc
message DiscoverySubscription {
// Unique id per ADS subscription.
string id = 1 [ (validate.rules).string.min_len = 1 ];
// Control Plane instance that handled given subscription.
string control_plane_instance_id = 2 [ (validate.rules).string.min_len = 1 ];
// Time when a given Dataplane connected to the Control Plane.
google.protobuf.Timestamp connect_time = 3
[ (validate.rules).timestamp.required = true ];
// Time when a given Dataplane disconnected from the Control Plane.
google.protobuf.Timestamp disconnect_time = 4;
// Status of the ADS subscription.
DiscoverySubscriptionStatus status = 5
[ (validate.rules).message.required = true ];
// Version of Envoy and Dubbo dataplane
Version version = 6;
// Generation is an integer number which is periodically increased by the
// status sink
uint32 generation = 7;
}
// DiscoverySubscriptionStatus defines status of an ADS subscription.
message DiscoverySubscriptionStatus {
// Time when status of a given ADS subscription was most recently updated.
google.protobuf.Timestamp last_update_time = 1;
// Total defines an aggregate over individual xDS stats.
DiscoveryServiceStats total = 2;
// CDS defines all CDS stats.
DiscoveryServiceStats cds = 3;
// EDS defines all EDS stats.
DiscoveryServiceStats eds = 4;
// LDS defines all LDS stats.
DiscoveryServiceStats lds = 5;
// RDS defines all RDS stats.
DiscoveryServiceStats rds = 6;
}
// DiscoveryServiceStats defines all stats over a single xDS service.
message DiscoveryServiceStats {
// Number of xDS responses sent to the Dataplane.
uint64 responses_sent = 1;
// Number of xDS responses ACKed by the Dataplane.
uint64 responses_acknowledged = 2;
// Number of xDS responses NACKed by the Dataplane.
uint64 responses_rejected = 3;
}
// Version defines version of Dubbo
message Version {
// Version of Dubbo Dataplane
DubboDpVersion DubboDp = 1;
// Version of Envoy
EnvoyVersion envoy = 2;
// Versions of other dependencies, i.e. CoreDNS
map<string, string> dependencies = 3;
}
message DubboDpVersion {
// Version number of Dubbo Dataplane
string version = 1;
// Git tag of Dubbo Dataplane version
string gitTag = 2;
// Git commit of Dubbo Dataplane version
string gitCommit = 3;
// Build date of Dubbo Dataplane version
string buildDate = 4;
// True iff Dubbo DP version is compatible with Dubbo CP version
bool DubboCpCompatible = 5;
}
message EnvoyVersion {
// Version number of Envoy
string version = 1;
// Full build tag of Envoy version
string build = 2;
// True iff Envoy version is compatible with Dubbo DP version
bool DubboDpCompatible = 3;
}