endpoint_components.proto 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. syntax = "proto3";
  2. package envoy.api.v2.endpoint;
  3. import "envoy/api/v2/core/address.proto";
  4. import "envoy/api/v2/core/base.proto";
  5. import "envoy/api/v2/core/health_check.proto";
  6. import "google/protobuf/wrappers.proto";
  7. import "udpa/annotations/migrate.proto";
  8. import "udpa/annotations/status.proto";
  9. import "validate/validate.proto";
  10. option java_package = "io.envoyproxy.envoy.api.v2.endpoint";
  11. option java_outer_classname = "EndpointComponentsProto";
  12. option java_multiple_files = true;
  13. option go_package = "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint";
  14. option (udpa.annotations.file_migrate).move_to_package = "envoy.config.endpoint.v3";
  15. option (udpa.annotations.file_status).package_version_status = FROZEN;
  16. // [#protodoc-title: Endpoints]
  17. // Upstream host identifier.
  18. message Endpoint {
  19. // The optional health check configuration.
  20. message HealthCheckConfig {
  21. // Optional alternative health check port value.
  22. //
  23. // By default the health check address port of an upstream host is the same
  24. // as the host's serving address port. This provides an alternative health
  25. // check port. Setting this with a non-zero value allows an upstream host
  26. // to have different health check address port.
  27. uint32 port_value = 1 [(validate.rules).uint32 = {lte: 65535}];
  28. // By default, the host header for L7 health checks is controlled by cluster level configuration
  29. // (see: :ref:`host <envoy_api_field_core.HealthCheck.HttpHealthCheck.host>` and
  30. // :ref:`authority <envoy_api_field_core.HealthCheck.GrpcHealthCheck.authority>`). Setting this
  31. // to a non-empty value allows overriding the cluster level configuration for a specific
  32. // endpoint.
  33. string hostname = 2;
  34. }
  35. // The upstream host address.
  36. //
  37. // .. attention::
  38. //
  39. // The form of host address depends on the given cluster type. For STATIC or EDS,
  40. // it is expected to be a direct IP address (or something resolvable by the
  41. // specified :ref:`resolver <envoy_api_field_core.SocketAddress.resolver_name>`
  42. // in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname,
  43. // and will be resolved via DNS.
  44. core.Address address = 1;
  45. // The optional health check configuration is used as configuration for the
  46. // health checker to contact the health checked host.
  47. //
  48. // .. attention::
  49. //
  50. // This takes into effect only for upstream clusters with
  51. // :ref:`active health checking <arch_overview_health_checking>` enabled.
  52. HealthCheckConfig health_check_config = 2;
  53. // The hostname associated with this endpoint. This hostname is not used for routing or address
  54. // resolution. If provided, it will be associated with the endpoint, and can be used for features
  55. // that require a hostname, like
  56. // :ref:`auto_host_rewrite <envoy_api_field_route.RouteAction.auto_host_rewrite>`.
  57. string hostname = 3;
  58. }
  59. // An Endpoint that Envoy can route traffic to.
  60. // [#next-free-field: 6]
  61. message LbEndpoint {
  62. // Upstream host identifier or a named reference.
  63. oneof host_identifier {
  64. Endpoint endpoint = 1;
  65. // [#not-implemented-hide:]
  66. string endpoint_name = 5;
  67. }
  68. // Optional health status when known and supplied by EDS server.
  69. core.HealthStatus health_status = 2;
  70. // The endpoint metadata specifies values that may be used by the load
  71. // balancer to select endpoints in a cluster for a given request. The filter
  72. // name should be specified as *envoy.lb*. An example boolean key-value pair
  73. // is *canary*, providing the optional canary status of the upstream host.
  74. // This may be matched against in a route's
  75. // :ref:`RouteAction <envoy_api_msg_route.RouteAction>` metadata_match field
  76. // to subset the endpoints considered in cluster load balancing.
  77. core.Metadata metadata = 3;
  78. // The optional load balancing weight of the upstream host; at least 1.
  79. // Envoy uses the load balancing weight in some of the built in load
  80. // balancers. The load balancing weight for an endpoint is divided by the sum
  81. // of the weights of all endpoints in the endpoint's locality to produce a
  82. // percentage of traffic for the endpoint. This percentage is then further
  83. // weighted by the endpoint's locality's load balancing weight from
  84. // LocalityLbEndpoints. If unspecified, each host is presumed to have equal
  85. // weight in a locality. The sum of the weights of all endpoints in the
  86. // endpoint's locality must not exceed uint32_t maximal value (4294967295).
  87. google.protobuf.UInt32Value load_balancing_weight = 4 [(validate.rules).uint32 = {gte: 1}];
  88. }
  89. // A group of endpoints belonging to a Locality.
  90. // One can have multiple LocalityLbEndpoints for a locality, but this is
  91. // generally only done if the different groups need to have different load
  92. // balancing weights or different priorities.
  93. // [#next-free-field: 7]
  94. message LocalityLbEndpoints {
  95. // Identifies location of where the upstream hosts run.
  96. core.Locality locality = 1;
  97. // The group of endpoints belonging to the locality specified.
  98. repeated LbEndpoint lb_endpoints = 2;
  99. // Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
  100. // balancing weight for a locality is divided by the sum of the weights of all
  101. // localities at the same priority level to produce the effective percentage
  102. // of traffic for the locality. The sum of the weights of all localities at
  103. // the same priority level must not exceed uint32_t maximal value (4294967295).
  104. //
  105. // Locality weights are only considered when :ref:`locality weighted load
  106. // balancing <arch_overview_load_balancing_locality_weighted_lb>` is
  107. // configured. These weights are ignored otherwise. If no weights are
  108. // specified when locality weighted load balancing is enabled, the locality is
  109. // assigned no load.
  110. google.protobuf.UInt32Value load_balancing_weight = 3 [(validate.rules).uint32 = {gte: 1}];
  111. // Optional: the priority for this LocalityLbEndpoints. If unspecified this will
  112. // default to the highest priority (0).
  113. //
  114. // Under usual circumstances, Envoy will only select endpoints for the highest
  115. // priority (0). In the event all endpoints for a particular priority are
  116. // unavailable/unhealthy, Envoy will fail over to selecting endpoints for the
  117. // next highest priority group.
  118. //
  119. // Priorities should range from 0 (highest) to N (lowest) without skipping.
  120. uint32 priority = 5 [(validate.rules).uint32 = {lte: 128}];
  121. // Optional: Per locality proximity value which indicates how close this
  122. // locality is from the source locality. This value only provides ordering
  123. // information (lower the value, closer it is to the source locality).
  124. // This will be consumed by load balancing schemes that need proximity order
  125. // to determine where to route the requests.
  126. // [#not-implemented-hide:]
  127. google.protobuf.UInt32Value proximity = 6;
  128. }