1syntax = "proto3"; 2 3package envoy.config.core.v3; 4 5import "envoy/config/core/v3/base.proto"; 6import "envoy/config/core/v3/extension.proto"; 7import "envoy/config/core/v3/grpc_service.proto"; 8 9import "google/protobuf/any.proto"; 10import "google/protobuf/duration.proto"; 11import "google/protobuf/wrappers.proto"; 12 13import "xds/core/v3/authority.proto"; 14 15import "envoy/annotations/deprecation.proto"; 16import "udpa/annotations/status.proto"; 17import "udpa/annotations/versioning.proto"; 18import "validate/validate.proto"; 19 20option java_package = "io.envoyproxy.envoy.config.core.v3"; 21option java_outer_classname = "ConfigSourceProto"; 22option java_multiple_files = true; 23option go_package = "github.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3"; 24option (udpa.annotations.file_status).package_version_status = ACTIVE; 25 26// [#protodoc-title: Configuration sources] 27 28// xDS API and non-xDS services version. This is used to describe both resource and transport 29// protocol versions (in distinct configuration fields). 30enum ApiVersion { 31 // When not specified, we assume v2, to ease migration to Envoy's stable API 32 // versioning. If a client does not support v2 (e.g. due to deprecation), this 33 // is an invalid value. 34 AUTO = 0 [deprecated = true, (envoy.annotations.deprecated_at_minor_version_enum) = "3.0"]; 35 36 // Use xDS v2 API. 37 V2 = 1 [deprecated = true, (envoy.annotations.deprecated_at_minor_version_enum) = "3.0"]; 38 39 // Use xDS v3 API. 40 V3 = 2; 41} 42 43// API configuration source. This identifies the API type and cluster that Envoy 44// will use to fetch an xDS API. 45// [#next-free-field: 10] 46message ApiConfigSource { 47 option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.ApiConfigSource"; 48 49 // APIs may be fetched via either REST or gRPC. 50 enum ApiType { 51 // Ideally this would be 'reserved 0' but one can't reserve the default 52 // value. Instead we throw an exception if this is ever used. 53 DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE = 0 54 [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true]; 55 56 // REST-JSON v2 API. The `canonical JSON encoding 57 // <https://developers.google.com/protocol-buffers/docs/proto3#json>`_ for 58 // the v2 protos is used. 59 REST = 1; 60 61 // SotW gRPC service. 62 GRPC = 2; 63 64 // Using the delta xDS gRPC service, i.e. DeltaDiscovery{Request,Response} 65 // rather than Discovery{Request,Response}. Rather than sending Envoy the entire state 66 // with every update, the xDS server only sends what has changed since the last update. 67 DELTA_GRPC = 3; 68 69 // SotW xDS gRPC with ADS. All resources which resolve to this configuration source will be 70 // multiplexed on a single connection to an ADS endpoint. 71 // [#not-implemented-hide:] 72 AGGREGATED_GRPC = 5; 73 74 // Delta xDS gRPC with ADS. All resources which resolve to this configuration source will be 75 // multiplexed on a single connection to an ADS endpoint. 76 // [#not-implemented-hide:] 77 AGGREGATED_DELTA_GRPC = 6; 78 } 79 80 // API type (gRPC, REST, delta gRPC) 81 ApiType api_type = 1 [(validate.rules).enum = {defined_only: true}]; 82 83 // API version for xDS transport protocol. This describes the xDS gRPC/REST 84 // endpoint and version of [Delta]DiscoveryRequest/Response used on the wire. 85 ApiVersion transport_api_version = 8 [(validate.rules).enum = {defined_only: true}]; 86 87 // Cluster names should be used only with REST. If > 1 88 // cluster is defined, clusters will be cycled through if any kind of failure 89 // occurs. 90 // 91 // .. note:: 92 // 93 // The cluster with name ``cluster_name`` must be statically defined and its 94 // type must not be ``EDS``. 95 repeated string cluster_names = 2; 96 97 // Multiple gRPC services be provided for GRPC. If > 1 cluster is defined, 98 // services will be cycled through if any kind of failure occurs. 99 repeated GrpcService grpc_services = 4; 100 101 // For REST APIs, the delay between successive polls. 102 google.protobuf.Duration refresh_delay = 3; 103 104 // For REST APIs, the request timeout. If not set, a default value of 1s will be used. 105 google.protobuf.Duration request_timeout = 5 [(validate.rules).duration = {gt {}}]; 106 107 // For GRPC APIs, the rate limit settings. If present, discovery requests made by Envoy will be 108 // rate limited. 109 RateLimitSettings rate_limit_settings = 6; 110 111 // Skip the node identifier in subsequent discovery requests for streaming gRPC config types. 112 bool set_node_on_first_message_only = 7; 113 114 // A list of config validators that will be executed when a new update is 115 // received from the ApiConfigSource. Note that each validator handles a 116 // specific xDS service type, and only the validators corresponding to the 117 // type url (in ``:ref: DiscoveryResponse`` or ``:ref: DeltaDiscoveryResponse``) 118 // will be invoked. 119 // If the validator returns false or throws an exception, the config will be rejected by 120 // the client, and a NACK will be sent. 121 // [#extension-category: envoy.config.validators] 122 repeated TypedExtensionConfig config_validators = 9; 123} 124 125// Aggregated Discovery Service (ADS) options. This is currently empty, but when 126// set in :ref:`ConfigSource <envoy_v3_api_msg_config.core.v3.ConfigSource>` can be used to 127// specify that ADS is to be used. 128message AggregatedConfigSource { 129 option (udpa.annotations.versioning).previous_message_type = 130 "envoy.api.v2.core.AggregatedConfigSource"; 131} 132 133// [#not-implemented-hide:] 134// Self-referencing config source options. This is currently empty, but when 135// set in :ref:`ConfigSource <envoy_v3_api_msg_config.core.v3.ConfigSource>` can be used to 136// specify that other data can be obtained from the same server. 137message SelfConfigSource { 138 option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.SelfConfigSource"; 139 140 // API version for xDS transport protocol. This describes the xDS gRPC/REST 141 // endpoint and version of [Delta]DiscoveryRequest/Response used on the wire. 142 ApiVersion transport_api_version = 1 [(validate.rules).enum = {defined_only: true}]; 143} 144 145// Rate Limit settings to be applied for discovery requests made by Envoy. 146message RateLimitSettings { 147 option (udpa.annotations.versioning).previous_message_type = 148 "envoy.api.v2.core.RateLimitSettings"; 149 150 // Maximum number of tokens to be used for rate limiting discovery request calls. If not set, a 151 // default value of 100 will be used. 152 google.protobuf.UInt32Value max_tokens = 1; 153 154 // Rate at which tokens will be filled per second. If not set, a default fill rate of 10 tokens 155 // per second will be used. 156 google.protobuf.DoubleValue fill_rate = 2 [(validate.rules).double = {gt: 0.0}]; 157} 158 159// Local filesystem path configuration source. 160message PathConfigSource { 161 // Path on the filesystem to source and watch for configuration updates. 162 // When sourcing configuration for a :ref:`secret <envoy_v3_api_msg_extensions.transport_sockets.tls.v3.Secret>`, 163 // the certificate and key files are also watched for updates. 164 // 165 // .. note:: 166 // 167 // The path to the source must exist at config load time. 168 // 169 // .. note:: 170 // 171 // If ``watched_directory`` is *not* configured, Envoy will watch the file path for *moves*. 172 // This is because in general only moves are atomic. The same method of swapping files as is 173 // demonstrated in the :ref:`runtime documentation <config_runtime_symbolic_link_swap>` can be 174 // used here also. If ``watched_directory`` is configured, no watch will be placed directly on 175 // this path. Instead, the configured ``watched_directory`` will be used to trigger reloads of 176 // this path. This is required in certain deployment scenarios. See below for more information. 177 string path = 1 [(validate.rules).string = {min_len: 1}]; 178 179 // If configured, this directory will be watched for *moves*. When an entry in this directory is 180 // moved to, the ``path`` will be reloaded. This is required in certain deployment scenarios. 181 // 182 // Specifically, if trying to load an xDS resource using a 183 // `Kubernetes ConfigMap <https://kubernetes.io/docs/concepts/configuration/configmap/>`_, the 184 // following configuration might be used: 185 // 1. Store xds.yaml inside a ConfigMap. 186 // 2. Mount the ConfigMap to ``/config_map/xds`` 187 // 3. Configure path ``/config_map/xds/xds.yaml`` 188 // 4. Configure watched directory ``/config_map/xds`` 189 // 190 // The above configuration will ensure that Envoy watches the owning directory for moves which is 191 // required due to how Kubernetes manages ConfigMap symbolic links during atomic updates. 192 WatchedDirectory watched_directory = 2; 193} 194 195// Configuration for :ref:`listeners <config_listeners>`, :ref:`clusters 196// <config_cluster_manager>`, :ref:`routes 197// <envoy_v3_api_msg_config.route.v3.RouteConfiguration>`, :ref:`endpoints 198// <arch_overview_service_discovery>` etc. may either be sourced from the 199// filesystem or from an xDS API source. Filesystem configs are watched with 200// inotify for updates. 201// [#next-free-field: 9] 202message ConfigSource { 203 option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.ConfigSource"; 204 205 // Authorities that this config source may be used for. An authority specified in a xdstp:// URL 206 // is resolved to a ``ConfigSource`` prior to configuration fetch. This field provides the 207 // association between authority name and configuration source. 208 // [#not-implemented-hide:] 209 repeated xds.core.v3.Authority authorities = 7; 210 211 oneof config_source_specifier { 212 option (validate.required) = true; 213 214 // Deprecated in favor of ``path_config_source``. Use that field instead. 215 string path = 1 [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; 216 217 // Local filesystem path configuration source. 218 PathConfigSource path_config_source = 8; 219 220 // API configuration source. 221 ApiConfigSource api_config_source = 2; 222 223 // When set, ADS will be used to fetch resources. The ADS API configuration 224 // source in the bootstrap configuration is used. 225 AggregatedConfigSource ads = 3; 226 227 // [#not-implemented-hide:] 228 // When set, the client will access the resources from the same server it got the 229 // ConfigSource from, although not necessarily from the same stream. This is similar to the 230 // :ref:`ads<envoy_v3_api_field.ConfigSource.ads>` field, except that the client may use a 231 // different stream to the same server. As a result, this field can be used for things 232 // like LRS that cannot be sent on an ADS stream. It can also be used to link from (e.g.) 233 // LDS to RDS on the same server without requiring the management server to know its name 234 // or required credentials. 235 // [#next-major-version: In xDS v3, consider replacing the ads field with this one, since 236 // this field can implicitly mean to use the same stream in the case where the ConfigSource 237 // is provided via ADS and the specified data can also be obtained via ADS.] 238 SelfConfigSource self = 5; 239 } 240 241 // When this timeout is specified, Envoy will wait no longer than the specified time for first 242 // config response on this xDS subscription during the :ref:`initialization process 243 // <arch_overview_initialization>`. After reaching the timeout, Envoy will move to the next 244 // initialization phase, even if the first config is not delivered yet. The timer is activated 245 // when the xDS API subscription starts, and is disarmed on first config update or on error. 0 246 // means no timeout - Envoy will wait indefinitely for the first xDS config (unless another 247 // timeout applies). The default is 15s. 248 google.protobuf.Duration initial_fetch_timeout = 4; 249 250 // API version for xDS resources. This implies the type URLs that the client 251 // will request for resources and the resource type that the client will in 252 // turn expect to be delivered. 253 ApiVersion resource_api_version = 6 [(validate.rules).enum = {defined_only: true}]; 254} 255 256// Configuration source specifier for a late-bound extension configuration. The 257// parent resource is warmed until all the initial extension configurations are 258// received, unless the flag to apply the default configuration is set. 259// Subsequent extension updates are atomic on a per-worker basis. Once an 260// extension configuration is applied to a request or a connection, it remains 261// constant for the duration of processing. If the initial delivery of the 262// extension configuration fails, due to a timeout for example, the optional 263// default configuration is applied. Without a default configuration, the 264// extension is disabled, until an extension configuration is received. The 265// behavior of a disabled extension depends on the context. For example, a 266// filter chain with a disabled extension filter rejects all incoming streams. 267message ExtensionConfigSource { 268 ConfigSource config_source = 1 [(validate.rules).any = {required: true}]; 269 270 // Optional default configuration to use as the initial configuration if 271 // there is a failure to receive the initial extension configuration or if 272 // ``apply_default_config_without_warming`` flag is set. 273 google.protobuf.Any default_config = 2; 274 275 // Use the default config as the initial configuration without warming and 276 // waiting for the first discovery response. Requires the default configuration 277 // to be supplied. 278 bool apply_default_config_without_warming = 3; 279 280 // A set of permitted extension type URLs. Extension configuration updates are rejected 281 // if they do not match any type URL in the set. 282 repeated string type_urls = 4 [(validate.rules).repeated = {min_items: 1}]; 283} 284