1syntax = "proto3"; 2 3package envoy.service.status.v3; 4 5import "envoy/admin/v3/config_dump_shared.proto"; 6import "envoy/config/core/v3/base.proto"; 7import "envoy/type/matcher/v3/node.proto"; 8 9import "google/api/annotations.proto"; 10import "google/protobuf/any.proto"; 11import "google/protobuf/timestamp.proto"; 12 13import "envoy/annotations/deprecation.proto"; 14import "udpa/annotations/status.proto"; 15import "udpa/annotations/versioning.proto"; 16 17option java_package = "io.envoyproxy.envoy.service.status.v3"; 18option java_outer_classname = "CsdsProto"; 19option java_multiple_files = true; 20option go_package = "github.com/envoyproxy/go-control-plane/envoy/service/status/v3;statusv3"; 21option (udpa.annotations.file_status).package_version_status = ACTIVE; 22 23// [#protodoc-title: Client status discovery service (CSDS)] 24 25// CSDS is Client Status Discovery Service. It can be used to get the status of 26// an xDS-compliant client from the management server's point of view. It can 27// also be used to get the current xDS states directly from the client. 28service ClientStatusDiscoveryService { 29 rpc StreamClientStatus(stream ClientStatusRequest) returns (stream ClientStatusResponse) { 30 } 31 32 rpc FetchClientStatus(ClientStatusRequest) returns (ClientStatusResponse) { 33 option (google.api.http).post = "/v3/discovery:client_status"; 34 option (google.api.http).body = "*"; 35 } 36} 37 38// Status of a config from a management server view. 39enum ConfigStatus { 40 // Status info is not available/unknown. 41 UNKNOWN = 0; 42 43 // Management server has sent the config to client and received ACK. 44 SYNCED = 1; 45 46 // Config is not sent. 47 NOT_SENT = 2; 48 49 // Management server has sent the config to client but hasn’t received 50 // ACK/NACK. 51 STALE = 3; 52 53 // Management server has sent the config to client but received NACK. The 54 // attached config dump will be the latest config (the rejected one), since 55 // it is the persisted version in the management server. 56 ERROR = 4; 57} 58 59// Config status from a client-side view. 60enum ClientConfigStatus { 61 // Config status is not available/unknown. 62 CLIENT_UNKNOWN = 0; 63 64 // Client requested the config but hasn't received any config from management 65 // server yet. 66 CLIENT_REQUESTED = 1; 67 68 // Client received the config and replied with ACK. 69 CLIENT_ACKED = 2; 70 71 // Client received the config and replied with NACK. Notably, the attached 72 // config dump is not the NACKed version, but the most recent accepted one. If 73 // no config is accepted yet, the attached config dump will be empty. 74 CLIENT_NACKED = 3; 75} 76 77// Request for client status of clients identified by a list of NodeMatchers. 78message ClientStatusRequest { 79 option (udpa.annotations.versioning).previous_message_type = 80 "envoy.service.status.v2.ClientStatusRequest"; 81 82 // Management server can use these match criteria to identify clients. 83 // The match follows OR semantics. 84 repeated type.matcher.v3.NodeMatcher node_matchers = 1; 85 86 // The node making the csds request. 87 config.core.v3.Node node = 2; 88} 89 90// Detailed config (per xDS) with status. 91// [#next-free-field: 8] 92message PerXdsConfig { 93 option (udpa.annotations.versioning).previous_message_type = 94 "envoy.service.status.v2.PerXdsConfig"; 95 96 // Config status generated by management servers. Will not be present if the 97 // CSDS server is an xDS client. 98 ConfigStatus status = 1; 99 100 // Client config status is populated by xDS clients. Will not be present if 101 // the CSDS server is an xDS server. No matter what the client config status 102 // is, xDS clients should always dump the most recent accepted xDS config. 103 // 104 // .. attention:: 105 // This field is deprecated. Use :ref:`ClientResourceStatus 106 // <envoy_v3_api_enum_admin.v3.ClientResourceStatus>` for per-resource 107 // config status instead. 108 ClientConfigStatus client_status = 7 109 [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; 110 111 oneof per_xds_config { 112 admin.v3.ListenersConfigDump listener_config = 2; 113 114 admin.v3.ClustersConfigDump cluster_config = 3; 115 116 admin.v3.RoutesConfigDump route_config = 4; 117 118 admin.v3.ScopedRoutesConfigDump scoped_route_config = 5; 119 120 admin.v3.EndpointsConfigDump endpoint_config = 6; 121 } 122} 123 124// All xds configs for a particular client. 125message ClientConfig { 126 option (udpa.annotations.versioning).previous_message_type = 127 "envoy.service.status.v2.ClientConfig"; 128 129 // GenericXdsConfig is used to specify the config status and the dump 130 // of any xDS resource identified by their type URL. It is the generalized 131 // version of the now deprecated ListenersConfigDump, ClustersConfigDump etc 132 // [#next-free-field: 10] 133 message GenericXdsConfig { 134 // Type_url represents the fully qualified name of xDS resource type 135 // like envoy.v3.Cluster, envoy.v3.ClusterLoadAssignment etc. 136 string type_url = 1; 137 138 // Name of the xDS resource 139 string name = 2; 140 141 // This is the :ref:`version_info <envoy_v3_api_field_service.discovery.v3.DiscoveryResponse.version_info>` 142 // in the last processed xDS discovery response. If there are only 143 // static bootstrap listeners, this field will be "" 144 string version_info = 3; 145 146 // The xDS resource config. Actual content depends on the type 147 google.protobuf.Any xds_config = 4; 148 149 // Timestamp when the xDS resource was last updated 150 google.protobuf.Timestamp last_updated = 5; 151 152 // Per xDS resource config status. It is generated by management servers. 153 // It will not be present if the CSDS server is an xDS client. 154 ConfigStatus config_status = 6; 155 156 // Per xDS resource status from the view of a xDS client 157 admin.v3.ClientResourceStatus client_status = 7; 158 159 // Set if the last update failed, cleared after the next successful 160 // update. The *error_state* field contains the rejected version of 161 // this particular resource along with the reason and timestamp. For 162 // successfully updated or acknowledged resource, this field should 163 // be empty. 164 // [#not-implemented-hide:] 165 admin.v3.UpdateFailureState error_state = 8; 166 167 // Is static resource is true if it is specified in the config supplied 168 // through the file at the startup. 169 bool is_static_resource = 9; 170 } 171 172 // Node for a particular client. 173 config.core.v3.Node node = 1; 174 175 // This field is deprecated in favor of generic_xds_configs which is 176 // much simpler and uniform in structure. 177 repeated PerXdsConfig xds_config = 2 178 [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; 179 180 // Represents generic xDS config and the exact config structure depends on 181 // the type URL (like Cluster if it is CDS) 182 repeated GenericXdsConfig generic_xds_configs = 3; 183} 184 185message ClientStatusResponse { 186 option (udpa.annotations.versioning).previous_message_type = 187 "envoy.service.status.v2.ClientStatusResponse"; 188 189 // Client configs for the clients specified in the ClientStatusRequest. 190 repeated ClientConfig config = 1; 191} 192