csds.proto 6.8 KB

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