3
package kuma.system.v1alpha1;
5
option go_package = "github.com/kumahq/kuma/api/system/v1alpha1";
7
import "api/mesh/options.proto";
8
import "google/protobuf/timestamp.proto";
9
import "validate/validate.proto";
11
// ZoneInsight defines the observed state of a Zone Kuma CP.
14
option (kuma.mesh.resource).name = "ZoneInsightResource";
15
option (kuma.mesh.resource).type = "ZoneInsight";
16
option (kuma.mesh.resource).package = "system";
17
option (kuma.mesh.resource).global = true;
18
option (kuma.mesh.resource).ws.name = "zone-insight";
19
option (kuma.mesh.resource).ws.read_only = true;
21
// List of KDS subscriptions created by a given Zone Kuma CP.
22
repeated KDSSubscription subscriptions = 1;
24
// Statistics about Envoy Admin Streams
25
EnvoyAdminStreams envoy_admin_streams = 2;
27
HealthCheck health_check = 3;
30
message EnvoyAdminStreams {
31
// Global instance ID that handles XDS Config Dump streams.
32
string config_dump_global_instance_id = 1;
33
// Global instance ID that handles Stats streams.
34
string stats_global_instance_id = 2;
35
// Global instance ID that handles Clusters streams.
36
string clusters_global_instance_id = 3;
39
// KDSSubscription describes a single KDS subscription
40
// created by a Zone to the Global.
41
// Ideally, there should be only one such subscription per Zone lifecycle.
42
// Presence of multiple subscriptions might indicate one of the following
44
// - transient loss of network connection between Zone and Global Control
46
// - Zone Kuma CP restarts (i.e. hot restart or crash)
47
// - Global Kuma CP restarts (i.e. rolling update or crash)
49
message KDSSubscription {
51
// Unique id per KDS subscription.
52
string id = 1 [ (validate.rules).string.min_len = 1 ];
54
// Global CP instance that handled given subscription.
55
string global_instance_id = 2 [ (validate.rules).string.min_len = 1 ];
57
// Time when a given Zone connected to the Global.
58
google.protobuf.Timestamp connect_time = 3
59
[ (validate.rules).timestamp.required = true ];
61
// Time when a given Zone disconnected from the Global.
62
google.protobuf.Timestamp disconnect_time = 4;
64
// Status of the KDS subscription.
65
KDSSubscriptionStatus status = 5 [ (validate.rules).message.required = true ];
67
// Version of Zone Kuma CP.
70
// Generation is an integer number which is periodically increased by the
72
uint32 generation = 7;
74
// Config of Zone Kuma CP
77
// Indicates if subscription provided auth token
78
bool auth_token_provided = 9;
80
// Zone CP instance that handled the given subscription (This is the leader at
81
// time of connection).
82
string zone_instance_id = 10;
85
// KDSSubscriptionStatus defines status of an KDS subscription.
86
message KDSSubscriptionStatus {
88
// Time when status of a given KDS subscription was most recently updated.
89
google.protobuf.Timestamp last_update_time = 1;
91
// Total defines an aggregate over individual KDS stats.
92
KDSServiceStats total = 2;
94
map<string, KDSServiceStats> stat = 3;
97
// DiscoveryServiceStats defines all stats over a single xDS service.
98
message KDSServiceStats {
100
// Number of xDS responses sent to the Dataplane.
101
uint64 responses_sent = 1;
103
// Number of xDS responses ACKed by the Dataplane.
104
uint64 responses_acknowledged = 2;
106
// Number of xDS responses NACKed by the Dataplane.
107
uint64 responses_rejected = 3;
110
// Version defines version of Kuma ControlPlane
113
// Version of Zone Kuma CP
114
KumaCpVersion kumaCp = 1;
117
// KumaCpVersion describes details of Kuma ControlPlane version
118
message KumaCpVersion {
120
// Version number of Kuma ControlPlane
123
// Git tag of Kuma ControlPlane version
126
// Git commit of Kuma ControlPlane version
127
string gitCommit = 3;
129
// Build date of Kuma ControlPlane version
130
string buildDate = 4;
132
// True iff this Zone CP version is compatible with Global CP
133
bool kumaCpGlobalCompatible = 5;
136
// HealthCheck holds information about the received zone health check
138
// Time last health check received
139
google.protobuf.Timestamp time = 1;