bootstrap.proto 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. syntax = "proto3";
  2. package envoy.config.bootstrap.v2;
  3. import "envoy/api/v2/auth/secret.proto";
  4. import "envoy/api/v2/cluster.proto";
  5. import "envoy/api/v2/core/address.proto";
  6. import "envoy/api/v2/core/base.proto";
  7. import "envoy/api/v2/core/config_source.proto";
  8. import "envoy/api/v2/core/event_service_config.proto";
  9. import "envoy/api/v2/core/socket_option.proto";
  10. import "envoy/api/v2/listener.proto";
  11. import "envoy/config/metrics/v2/stats.proto";
  12. import "envoy/config/overload/v2alpha/overload.proto";
  13. import "envoy/config/trace/v2/http_tracer.proto";
  14. import "google/protobuf/duration.proto";
  15. import "google/protobuf/struct.proto";
  16. import "google/protobuf/wrappers.proto";
  17. import "envoy/annotations/deprecation.proto";
  18. import "udpa/annotations/status.proto";
  19. import "validate/validate.proto";
  20. option java_package = "io.envoyproxy.envoy.config.bootstrap.v2";
  21. option java_outer_classname = "BootstrapProto";
  22. option java_multiple_files = true;
  23. option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/bootstrap/v2;bootstrapv2";
  24. option (udpa.annotations.file_status).package_version_status = FROZEN;
  25. // [#protodoc-title: Bootstrap]
  26. // This proto is supplied via the :option:`-c` CLI flag and acts as the root
  27. // of the Envoy v2 configuration. See the :ref:`v2 configuration overview
  28. // <config_overview_bootstrap>` for more detail.
  29. // Bootstrap :ref:`configuration overview <config_overview_bootstrap>`.
  30. // [#next-free-field: 21]
  31. message Bootstrap {
  32. message StaticResources {
  33. // Static :ref:`Listeners <envoy_api_msg_Listener>`. These listeners are
  34. // available regardless of LDS configuration.
  35. repeated api.v2.Listener listeners = 1;
  36. // If a network based configuration source is specified for :ref:`cds_config
  37. // <envoy_api_field_config.bootstrap.v2.Bootstrap.DynamicResources.cds_config>`, it's necessary
  38. // to have some initial cluster definitions available to allow Envoy to know
  39. // how to speak to the management server. These cluster definitions may not
  40. // use :ref:`EDS <arch_overview_dynamic_config_eds>` (i.e. they should be static
  41. // IP or DNS-based).
  42. repeated api.v2.Cluster clusters = 2;
  43. // These static secrets can be used by :ref:`SdsSecretConfig
  44. // <envoy_api_msg_auth.SdsSecretConfig>`
  45. repeated api.v2.auth.Secret secrets = 3;
  46. }
  47. message DynamicResources {
  48. reserved 4;
  49. // All :ref:`Listeners <envoy_api_msg_Listener>` are provided by a single
  50. // :ref:`LDS <arch_overview_dynamic_config_lds>` configuration source.
  51. api.v2.core.ConfigSource lds_config = 1;
  52. // All post-bootstrap :ref:`Cluster <envoy_api_msg_Cluster>` definitions are
  53. // provided by a single :ref:`CDS <arch_overview_dynamic_config_cds>`
  54. // configuration source.
  55. api.v2.core.ConfigSource cds_config = 2;
  56. // A single :ref:`ADS <config_overview_ads>` source may be optionally
  57. // specified. This must have :ref:`api_type
  58. // <envoy_api_field_core.ApiConfigSource.api_type>` :ref:`GRPC
  59. // <envoy_api_enum_value_core.ApiConfigSource.ApiType.GRPC>`. Only
  60. // :ref:`ConfigSources <envoy_api_msg_core.ConfigSource>` that have
  61. // the :ref:`ads <envoy_api_field_core.ConfigSource.ads>` field set will be
  62. // streamed on the ADS channel.
  63. api.v2.core.ApiConfigSource ads_config = 3;
  64. }
  65. reserved 10;
  66. // Node identity to present to the management server and for instance
  67. // identification purposes (e.g. in generated headers).
  68. api.v2.core.Node node = 1;
  69. // Statically specified resources.
  70. StaticResources static_resources = 2;
  71. // xDS configuration sources.
  72. DynamicResources dynamic_resources = 3;
  73. // Configuration for the cluster manager which owns all upstream clusters
  74. // within the server.
  75. ClusterManager cluster_manager = 4;
  76. // Health discovery service config option.
  77. // (:ref:`core.ApiConfigSource <envoy_api_msg_core.ApiConfigSource>`)
  78. api.v2.core.ApiConfigSource hds_config = 14;
  79. // Optional file system path to search for startup flag files.
  80. string flags_path = 5;
  81. // Optional set of stats sinks.
  82. repeated metrics.v2.StatsSink stats_sinks = 6;
  83. // Configuration for internal processing of stats.
  84. metrics.v2.StatsConfig stats_config = 13;
  85. // Optional duration between flushes to configured stats sinks. For
  86. // performance reasons Envoy latches counters and only flushes counters and
  87. // gauges at a periodic interval. If not specified the default is 5000ms (5
  88. // seconds).
  89. // Duration must be at least 1ms and at most 5 min.
  90. google.protobuf.Duration stats_flush_interval = 7 [(validate.rules).duration = {
  91. lt {seconds: 300}
  92. gte {nanos: 1000000}
  93. }];
  94. // Optional watchdog configuration.
  95. Watchdog watchdog = 8;
  96. // Configuration for an external tracing provider.
  97. //
  98. // .. attention::
  99. // This field has been deprecated in favor of :ref:`HttpConnectionManager.Tracing.provider
  100. // <envoy_api_field_config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing.provider>`.
  101. trace.v2.Tracing tracing = 9;
  102. // Configuration for the runtime configuration provider (deprecated). If not
  103. // specified, a “null” provider will be used which will result in all defaults
  104. // being used.
  105. Runtime runtime = 11 [deprecated = true, (envoy.annotations.disallowed_by_default) = true];
  106. // Configuration for the runtime configuration provider. If not
  107. // specified, a “null” provider will be used which will result in all defaults
  108. // being used.
  109. LayeredRuntime layered_runtime = 17;
  110. // Configuration for the local administration HTTP server.
  111. Admin admin = 12;
  112. // Optional overload manager configuration.
  113. overload.v2alpha.OverloadManager overload_manager = 15;
  114. // Enable :ref:`stats for event dispatcher <operations_performance>`, defaults to false.
  115. // Note that this records a value for each iteration of the event loop on every thread. This
  116. // should normally be minimal overhead, but when using
  117. // :ref:`statsd <envoy_api_msg_config.metrics.v2.StatsdSink>`, it will send each observed value
  118. // over the wire individually because the statsd protocol doesn't have any way to represent a
  119. // histogram summary. Be aware that this can be a very large volume of data.
  120. bool enable_dispatcher_stats = 16;
  121. // Optional string which will be used in lieu of x-envoy in prefixing headers.
  122. //
  123. // For example, if this string is present and set to X-Foo, then x-envoy-retry-on will be
  124. // transformed into x-foo-retry-on etc.
  125. //
  126. // Note this applies to the headers Envoy will generate, the headers Envoy will sanitize, and the
  127. // headers Envoy will trust for core code and core extensions only. Be VERY careful making
  128. // changes to this string, especially in multi-layer Envoy deployments or deployments using
  129. // extensions which are not upstream.
  130. string header_prefix = 18;
  131. // Optional proxy version which will be used to set the value of :ref:`server.version statistic
  132. // <server_statistics>` if specified. Envoy will not process this value, it will be sent as is to
  133. // :ref:`stats sinks <envoy_api_msg_config.metrics.v2.StatsSink>`.
  134. google.protobuf.UInt64Value stats_server_version_override = 19;
  135. // Always use TCP queries instead of UDP queries for DNS lookups.
  136. // This may be overridden on a per-cluster basis in cds_config,
  137. // when :ref:`dns_resolvers <envoy_api_field_Cluster.dns_resolvers>` and
  138. // :ref:`use_tcp_for_dns_lookups <envoy_api_field_Cluster.use_tcp_for_dns_lookups>` are
  139. // specified.
  140. // Setting this value causes failure if the
  141. // ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during
  142. // server startup. Apple' API only uses UDP for DNS resolution.
  143. bool use_tcp_for_dns_lookups = 20;
  144. }
  145. // Administration interface :ref:`operations documentation
  146. // <operations_admin_interface>`.
  147. message Admin {
  148. // The path to write the access log for the administration server. If no
  149. // access log is desired specify ‘/dev/null’. This is only required if
  150. // :ref:`address <envoy_api_field_config.bootstrap.v2.Admin.address>` is set.
  151. string access_log_path = 1;
  152. // The cpu profiler output path for the administration server. If no profile
  153. // path is specified, the default is ‘/var/log/envoy/envoy.prof’.
  154. string profile_path = 2;
  155. // The TCP address that the administration server will listen on.
  156. // If not specified, Envoy will not start an administration server.
  157. api.v2.core.Address address = 3;
  158. // Additional socket options that may not be present in Envoy source code or
  159. // precompiled binaries.
  160. repeated api.v2.core.SocketOption socket_options = 4;
  161. }
  162. // Cluster manager :ref:`architecture overview <arch_overview_cluster_manager>`.
  163. message ClusterManager {
  164. message OutlierDetection {
  165. // Specifies the path to the outlier event log.
  166. string event_log_path = 1;
  167. // [#not-implemented-hide:]
  168. // The gRPC service for the outlier detection event service.
  169. // If empty, outlier detection events won't be sent to a remote endpoint.
  170. api.v2.core.EventServiceConfig event_service = 2;
  171. }
  172. // Name of the local cluster (i.e., the cluster that owns the Envoy running
  173. // this configuration). In order to enable :ref:`zone aware routing
  174. // <arch_overview_load_balancing_zone_aware_routing>` this option must be set.
  175. // If *local_cluster_name* is defined then :ref:`clusters
  176. // <envoy_api_msg_Cluster>` must be defined in the :ref:`Bootstrap
  177. // static cluster resources
  178. // <envoy_api_field_config.bootstrap.v2.Bootstrap.StaticResources.clusters>`. This is unrelated to
  179. // the :option:`--service-cluster` option which does not `affect zone aware
  180. // routing <https://github.com/envoyproxy/envoy/issues/774>`_.
  181. string local_cluster_name = 1;
  182. // Optional global configuration for outlier detection.
  183. OutlierDetection outlier_detection = 2;
  184. // Optional configuration used to bind newly established upstream connections.
  185. // This may be overridden on a per-cluster basis by upstream_bind_config in the cds_config.
  186. api.v2.core.BindConfig upstream_bind_config = 3;
  187. // A management server endpoint to stream load stats to via
  188. // *StreamLoadStats*. This must have :ref:`api_type
  189. // <envoy_api_field_core.ApiConfigSource.api_type>` :ref:`GRPC
  190. // <envoy_api_enum_value_core.ApiConfigSource.ApiType.GRPC>`.
  191. api.v2.core.ApiConfigSource load_stats_config = 4;
  192. }
  193. // Envoy process watchdog configuration. When configured, this monitors for
  194. // nonresponsive threads and kills the process after the configured thresholds.
  195. // See the :ref:`watchdog documentation <operations_performance_watchdog>` for more information.
  196. message Watchdog {
  197. // The duration after which Envoy counts a nonresponsive thread in the
  198. // *watchdog_miss* statistic. If not specified the default is 200ms.
  199. google.protobuf.Duration miss_timeout = 1;
  200. // The duration after which Envoy counts a nonresponsive thread in the
  201. // *watchdog_mega_miss* statistic. If not specified the default is
  202. // 1000ms.
  203. google.protobuf.Duration megamiss_timeout = 2;
  204. // If a watched thread has been nonresponsive for this duration, assume a
  205. // programming error and kill the entire Envoy process. Set to 0 to disable
  206. // kill behavior. If not specified the default is 0 (disabled).
  207. google.protobuf.Duration kill_timeout = 3;
  208. // If at least two watched threads have been nonresponsive for at least this
  209. // duration assume a true deadlock and kill the entire Envoy process. Set to 0
  210. // to disable this behavior. If not specified the default is 0 (disabled).
  211. google.protobuf.Duration multikill_timeout = 4;
  212. }
  213. // Runtime :ref:`configuration overview <config_runtime>` (deprecated).
  214. message Runtime {
  215. // The implementation assumes that the file system tree is accessed via a
  216. // symbolic link. An atomic link swap is used when a new tree should be
  217. // switched to. This parameter specifies the path to the symbolic link. Envoy
  218. // will watch the location for changes and reload the file system tree when
  219. // they happen. If this parameter is not set, there will be no disk based
  220. // runtime.
  221. string symlink_root = 1;
  222. // Specifies the subdirectory to load within the root directory. This is
  223. // useful if multiple systems share the same delivery mechanism. Envoy
  224. // configuration elements can be contained in a dedicated subdirectory.
  225. string subdirectory = 2;
  226. // Specifies an optional subdirectory to load within the root directory. If
  227. // specified and the directory exists, configuration values within this
  228. // directory will override those found in the primary subdirectory. This is
  229. // useful when Envoy is deployed across many different types of servers.
  230. // Sometimes it is useful to have a per service cluster directory for runtime
  231. // configuration. See below for exactly how the override directory is used.
  232. string override_subdirectory = 3;
  233. // Static base runtime. This will be :ref:`overridden
  234. // <config_runtime_layering>` by other runtime layers, e.g.
  235. // disk or admin. This follows the :ref:`runtime protobuf JSON representation
  236. // encoding <config_runtime_proto_json>`.
  237. google.protobuf.Struct base = 4;
  238. }
  239. // [#next-free-field: 6]
  240. message RuntimeLayer {
  241. // :ref:`Disk runtime <config_runtime_local_disk>` layer.
  242. message DiskLayer {
  243. // The implementation assumes that the file system tree is accessed via a
  244. // symbolic link. An atomic link swap is used when a new tree should be
  245. // switched to. This parameter specifies the path to the symbolic link.
  246. // Envoy will watch the location for changes and reload the file system tree
  247. // when they happen. See documentation on runtime :ref:`atomicity
  248. // <config_runtime_atomicity>` for further details on how reloads are
  249. // treated.
  250. string symlink_root = 1;
  251. // Specifies the subdirectory to load within the root directory. This is
  252. // useful if multiple systems share the same delivery mechanism. Envoy
  253. // configuration elements can be contained in a dedicated subdirectory.
  254. string subdirectory = 3;
  255. // :ref:`Append <config_runtime_local_disk_service_cluster_subdirs>` the
  256. // service cluster to the path under symlink root.
  257. bool append_service_cluster = 2;
  258. }
  259. // :ref:`Admin console runtime <config_runtime_admin>` layer.
  260. message AdminLayer {
  261. }
  262. // :ref:`Runtime Discovery Service (RTDS) <config_runtime_rtds>` layer.
  263. message RtdsLayer {
  264. // Resource to subscribe to at *rtds_config* for the RTDS layer.
  265. string name = 1;
  266. // RTDS configuration source.
  267. api.v2.core.ConfigSource rtds_config = 2;
  268. }
  269. // Descriptive name for the runtime layer. This is only used for the runtime
  270. // :http:get:`/runtime` output.
  271. string name = 1 [(validate.rules).string = {min_bytes: 1}];
  272. oneof layer_specifier {
  273. option (validate.required) = true;
  274. // :ref:`Static runtime <config_runtime_bootstrap>` layer.
  275. // This follows the :ref:`runtime protobuf JSON representation encoding
  276. // <config_runtime_proto_json>`. Unlike static xDS resources, this static
  277. // layer is overridable by later layers in the runtime virtual filesystem.
  278. google.protobuf.Struct static_layer = 2;
  279. DiskLayer disk_layer = 3;
  280. AdminLayer admin_layer = 4;
  281. RtdsLayer rtds_layer = 5;
  282. }
  283. }
  284. // Runtime :ref:`configuration overview <config_runtime>`.
  285. message LayeredRuntime {
  286. // The :ref:`layers <config_runtime_layering>` of the runtime. This is ordered
  287. // such that later layers in the list overlay earlier entries.
  288. repeated RuntimeLayer layers = 1;
  289. }