...
1syntax = "proto3";
2
3package envoy.service.status.v3;
4
5import "envoy/admin/v3/config_dump.proto";
6import "envoy/config/core/v3/base.proto";
7import "envoy/type/matcher/v3/node.proto";
8
9import "google/api/annotations.proto";
10import "google/protobuf/struct.proto";
11
12import "udpa/annotations/migrate.proto";
13import "udpa/annotations/status.proto";
14import "udpa/annotations/versioning.proto";
15
16option java_package = "io.envoyproxy.envoy.service.status.v3";
17option java_outer_classname = "CsdsProto";
18option java_multiple_files = true;
19option java_generic_services = true;
20option (udpa.annotations.file_status).package_version_status = ACTIVE;
21
22// [#protodoc-title: Client Status Discovery Service (CSDS)]
23
24// CSDS is Client Status Discovery Service. It can be used to get the status of
25// an xDS-compliant client from the management server's point of view. It can
26// also be used to get the current xDS states directly from the client.
27service ClientStatusDiscoveryService {
28 rpc StreamClientStatus(stream ClientStatusRequest) returns (stream ClientStatusResponse) {
29 }
30
31 rpc FetchClientStatus(ClientStatusRequest) returns (ClientStatusResponse) {
32 option (google.api.http).post = "/v3/discovery:client_status";
33 option (google.api.http).body = "*";
34 }
35}
36
37// Status of a config from a management server view.
38enum ConfigStatus {
39 // Status info is not available/unknown.
40 UNKNOWN = 0;
41
42 // Management server has sent the config to client and received ACK.
43 SYNCED = 1;
44
45 // Config is not sent.
46 NOT_SENT = 2;
47
48 // Management server has sent the config to client but hasn’t received
49 // ACK/NACK.
50 STALE = 3;
51
52 // Management server has sent the config to client but received NACK. The
53 // attached config dump will be the latest config (the rejected one), since
54 // it is the persisted version in the management server.
55 ERROR = 4;
56}
57
58// Config status from a client-side view.
59enum ClientConfigStatus {
60 // Config status is not available/unknown.
61 CLIENT_UNKNOWN = 0;
62
63 // Client requested the config but hasn't received any config from management
64 // server yet.
65 CLIENT_REQUESTED = 1;
66
67 // Client received the config and replied with ACK.
68 CLIENT_ACKED = 2;
69
70 // Client received the config and replied with NACK. Notably, the attached
71 // config dump is not the NACKed version, but the most recent accepted one. If
72 // no config is accepted yet, the attached config dump will be empty.
73 CLIENT_NACKED = 3;
74}
75
76// Request for client status of clients identified by a list of NodeMatchers.
77message ClientStatusRequest {
78 option (udpa.annotations.versioning).previous_message_type =
79 "envoy.service.status.v2.ClientStatusRequest";
80
81 // Management server can use these match criteria to identify clients.
82 // The match follows OR semantics.
83 repeated type.matcher.v3.NodeMatcher node_matchers = 1;
84
85 // The node making the csds request.
86 config.core.v3.Node node = 2;
87}
88
89// Detailed config (per xDS) with status.
90// [#next-free-field: 8]
91message PerXdsConfig {
92 option (udpa.annotations.versioning).previous_message_type =
93 "envoy.service.status.v2.PerXdsConfig";
94
95 // Config status generated by management servers. Will not be present if the
96 // CSDS server is an xDS client.
97 ConfigStatus status = 1 [(udpa.annotations.field_migrate).oneof_promotion = "status_config"];
98
99 // Client config status is populated by xDS clients. Will not be present if
100 // the CSDS server is an xDS server. No matter what the client config status
101 // is, xDS clients should always dump the most recent accepted xDS config.
102 ClientConfigStatus client_status = 7
103 [(udpa.annotations.field_migrate).oneof_promotion = "status_config"];
104
105 oneof per_xds_config {
106 admin.v3.ListenersConfigDump listener_config = 2;
107
108 admin.v3.ClustersConfigDump cluster_config = 3;
109
110 admin.v3.RoutesConfigDump route_config = 4;
111
112 admin.v3.ScopedRoutesConfigDump scoped_route_config = 5;
113
114 admin.v3.EndpointsConfigDump endpoint_config = 6;
115 }
116}
117
118// All xds configs for a particular client.
119message ClientConfig {
120 option (udpa.annotations.versioning).previous_message_type =
121 "envoy.service.status.v2.ClientConfig";
122
123 // Node for a particular client.
124 config.core.v3.Node node = 1;
125
126 repeated PerXdsConfig xds_config = 2;
127}
128
129message ClientStatusResponse {
130 option (udpa.annotations.versioning).previous_message_type =
131 "envoy.service.status.v2.ClientStatusResponse";
132
133 // Client configs for the clients specified in the ClientStatusRequest.
134 repeated ClientConfig config = 1;
135}
View as plain text