From eb6f1338ab852e716f45099a199ba9ddd28c092f Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Mon, 14 Aug 2023 09:29:25 -0700 Subject: [PATCH 1/8] grpc-js-xds: Implement custom LB policies --- packages/grpc-js-xds/src/environment.ts | 1 + packages/grpc-js-xds/src/index.ts | 6 +- .../grpc-js-xds/src/lb-policy-registry.ts | 62 ++++++++++ .../src/lb-policy-registry/round-robin.ts | 36 ++++++ .../src/lb-policy-registry/typed-struct.ts | 110 +++++++++++++++++ packages/grpc-js-xds/src/load-balancer-cds.ts | 4 +- .../grpc-js-xds/src/load-balancer-priority.ts | 3 + .../src/load-balancer-xds-cluster-impl.ts | 54 +++++++-- .../src/load-balancer-xds-cluster-resolver.ts | 60 +++------- .../src/load-balancer-xds-wrr-locality.ts | 112 ++++++++++++++++++ .../cluster-resource-type.ts | 42 +++++-- 11 files changed, 421 insertions(+), 69 deletions(-) create mode 100644 packages/grpc-js-xds/src/lb-policy-registry.ts create mode 100644 packages/grpc-js-xds/src/lb-policy-registry/round-robin.ts create mode 100644 packages/grpc-js-xds/src/lb-policy-registry/typed-struct.ts create mode 100644 packages/grpc-js-xds/src/load-balancer-xds-wrr-locality.ts diff --git a/packages/grpc-js-xds/src/environment.ts b/packages/grpc-js-xds/src/environment.ts index 32c9f28ba..530bb256c 100644 --- a/packages/grpc-js-xds/src/environment.ts +++ b/packages/grpc-js-xds/src/environment.ts @@ -19,3 +19,4 @@ export const EXPERIMENTAL_FAULT_INJECTION = (process.env.GRPC_XDS_EXPERIMENTAL_F export const EXPERIMENTAL_OUTLIER_DETECTION = (process.env.GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION ?? 'true') === 'true'; export const EXPERIMENTAL_RETRY = (process.env.GRPC_XDS_EXPERIMENTAL_ENABLE_RETRY ?? 'true') === 'true'; export const EXPERIMENTAL_FEDERATION = (process.env.GRPC_EXPERIMENTAL_XDS_FEDERATION ?? 'false') === 'true'; +export const EXPERIMENTAL_CUSTOM_LB_CONFIG = (process.env.GRPC_EXPERIMENTAL_XDS_CUSTOM_LB_CONFIG ?? 'false') === 'true'; diff --git a/packages/grpc-js-xds/src/index.ts b/packages/grpc-js-xds/src/index.ts index 51926ac47..319719bde 100644 --- a/packages/grpc-js-xds/src/index.ts +++ b/packages/grpc-js-xds/src/index.ts @@ -19,10 +19,10 @@ import * as resolver_xds from './resolver-xds'; import * as load_balancer_cds from './load-balancer-cds'; import * as xds_cluster_resolver from './load-balancer-xds-cluster-resolver'; import * as xds_cluster_impl from './load-balancer-xds-cluster-impl'; -import * as load_balancer_lrs from './load-balancer-lrs'; import * as load_balancer_priority from './load-balancer-priority'; import * as load_balancer_weighted_target from './load-balancer-weighted-target'; import * as load_balancer_xds_cluster_manager from './load-balancer-xds-cluster-manager'; +import * as xds_wrr_locality from './load-balancer-xds-wrr-locality'; import * as router_filter from './http-filter/router-filter'; import * as fault_injection_filter from './http-filter/fault-injection-filter'; import * as csds from './csds'; @@ -35,11 +35,11 @@ export function register() { load_balancer_cds.setup(); xds_cluster_resolver.setup(); xds_cluster_impl.setup(); - load_balancer_lrs.setup(); load_balancer_priority.setup(); load_balancer_weighted_target.setup(); load_balancer_xds_cluster_manager.setup(); + xds_wrr_locality.setup(); router_filter.setup(); fault_injection_filter.setup(); csds.setup(); -} \ No newline at end of file +} diff --git a/packages/grpc-js-xds/src/lb-policy-registry.ts b/packages/grpc-js-xds/src/lb-policy-registry.ts new file mode 100644 index 000000000..18d86655e --- /dev/null +++ b/packages/grpc-js-xds/src/lb-policy-registry.ts @@ -0,0 +1,62 @@ +/* + * Copyright 2023 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import { LoadBalancingConfig, experimental, logVerbosity } from "@grpc/grpc-js"; +import { LoadBalancingPolicy__Output } from "./generated/envoy/config/cluster/v3/LoadBalancingPolicy"; +import { TypedExtensionConfig__Output } from "./generated/envoy/config/core/v3/TypedExtensionConfig"; + +const TRACER_NAME = 'lb_policy_registry'; +function trace(text: string) { + experimental.trace(logVerbosity.DEBUG, TRACER_NAME, text); +} + +const MAX_RECURSION_DEPTH = 16; + +interface ProtoLbPolicyConverter { + (protoPolicy: TypedExtensionConfig__Output, selectChildPolicy: (childPolicy: LoadBalancingPolicy__Output) => LoadBalancingConfig): LoadBalancingConfig +} + +interface RegisteredLbPolicy { + convertToLoadBalancingPolicy: ProtoLbPolicyConverter; +} + +const registry: {[typeUrl: string]: RegisteredLbPolicy} = {} + +export function registerLbPolicy(typeUrl: string, converter: ProtoLbPolicyConverter) { + registry[typeUrl] = {convertToLoadBalancingPolicy: converter}; +} + +export function convertToLoadBalancingConfig(protoPolicy: LoadBalancingPolicy__Output, recursionDepth = 0): LoadBalancingConfig { + if (recursionDepth > MAX_RECURSION_DEPTH) { + throw new Error(`convertToLoadBalancingConfig: Max recursion depth ${MAX_RECURSION_DEPTH} reached`); + } + for (const policyCandidate of protoPolicy.policies) { + const extensionConfig = policyCandidate.typed_extension_config; + if (!extensionConfig?.typed_config) { + continue; + } + const typeUrl = extensionConfig.typed_config.type_url; + if (typeUrl in registry) { + try { + return registry[typeUrl].convertToLoadBalancingPolicy(extensionConfig, childPolicy => convertToLoadBalancingConfig(childPolicy, recursionDepth + 1)); + } catch (e) { + throw new Error(`Error parsing ${typeUrl} LoadBalancingPolicy: ${(e as Error).message}`); + } + } + } + throw new Error('No registered LB policy found in list'); +} diff --git a/packages/grpc-js-xds/src/lb-policy-registry/round-robin.ts b/packages/grpc-js-xds/src/lb-policy-registry/round-robin.ts new file mode 100644 index 000000000..9585bfde2 --- /dev/null +++ b/packages/grpc-js-xds/src/lb-policy-registry/round-robin.ts @@ -0,0 +1,36 @@ +/* + * Copyright 2023 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import { LoadBalancingConfig } from "@grpc/grpc-js"; +import { LoadBalancingPolicy__Output } from "../generated/envoy/config/cluster/v3/LoadBalancingPolicy"; +import { TypedExtensionConfig__Output } from "../generated/envoy/config/core/v3/TypedExtensionConfig"; +import { registerLbPolicy } from "../lb-policy-registry"; + +const ROUND_ROBIN_TYPE_URL = 'envoy.extensions.load_balancing_policies.round_robin.v3.RoundRobin'; + +function convertToLoadBalancingPolicy(protoPolicy: TypedExtensionConfig__Output, selectChildPolicy: (childPolicy: LoadBalancingPolicy__Output) => LoadBalancingConfig): LoadBalancingConfig { + if (protoPolicy.typed_config?.type_url !== ROUND_ROBIN_TYPE_URL) { + throw new Error(`Round robin LB policy parsing error: unexpected type URL ${protoPolicy.typed_config?.type_url}`); + } + return { + round_robin: {} + }; +} + +export function setup() { + registerLbPolicy(ROUND_ROBIN_TYPE_URL, convertToLoadBalancingPolicy); +} diff --git a/packages/grpc-js-xds/src/lb-policy-registry/typed-struct.ts b/packages/grpc-js-xds/src/lb-policy-registry/typed-struct.ts new file mode 100644 index 000000000..70a6c02b3 --- /dev/null +++ b/packages/grpc-js-xds/src/lb-policy-registry/typed-struct.ts @@ -0,0 +1,110 @@ +/* + * Copyright 2023 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import { LoadBalancingConfig } from "@grpc/grpc-js"; +import { LoadBalancingPolicy__Output } from "../generated/envoy/config/cluster/v3/LoadBalancingPolicy"; +import { TypedExtensionConfig__Output } from "../generated/envoy/config/core/v3/TypedExtensionConfig"; +import { registerLbPolicy } from "../lb-policy-registry"; +import { loadProtosWithOptionsSync } from "@grpc/proto-loader/build/src/util"; +import { Any__Output } from "../generated/google/protobuf/Any"; +import { Struct__Output } from "../generated/google/protobuf/Struct"; +import { Value__Output } from "../generated/google/protobuf/Value"; +import { TypedStruct__Output } from "../generated/xds/type/v3/TypedStruct"; + +const XDS_TYPED_STRUCT_TYPE_URL = 'xds.type.v3.TypedStruct'; +const UDPA_TYPED_STRUCT_TYPE_URL = 'udpa.type.v1.TypedStruct'; + +const resourceRoot = loadProtosWithOptionsSync([ + 'xds/type/v3/typed_struct.proto', + 'udpa/type/v1/typed_struct.proto'], { + keepCase: true, + includeDirs: [ + // Paths are relative to src/build + __dirname + '/../../deps/xds/', + ], + } +); + +const toObjectOptions = { + longs: String, + enums: String, + defaults: true, + oneofs: true +} + +/* xds.type.v3.TypedStruct and udpa.type.v1.TypedStruct have identical interfaces */ +function decodeTypedStruct(message: Any__Output): TypedStruct__Output { + const name = message.type_url.substring(message.type_url.lastIndexOf('/') + 1); + const type = resourceRoot.lookup(name); + if (type) { + const decodedMessage = (type as any).decode(message.value); + return decodedMessage.$type.toObject(decodedMessage, toObjectOptions) as TypedStruct__Output; + } else { + throw new Error(`TypedStruct parsing error: unexpected type URL ${message.type_url}`); + } +} + +type FlatValue = boolean | null | number | string | FlatValue[] | FlatStruct; +interface FlatStruct { + [key: string]: FlatValue; +} + +function flattenValue(value: Value__Output): FlatValue { + switch (value.kind) { + case 'boolValue': + return value.boolValue!; + case 'listValue': + return value.listValue!.values.map(flattenValue); + case 'nullValue': + return null; + case 'numberValue': + return value.numberValue!; + case 'stringValue': + return value.stringValue!; + case 'structValue': + return flattenStruct(value.structValue!); + default: + throw new Error(`Struct parsing error: unexpected value kind ${value.kind}`); + } +} + +function flattenStruct(struct: Struct__Output): FlatStruct { + const result: FlatStruct = {}; + for (const [key, value] of Object.entries(struct.fields)) { + result[key] = flattenValue(value); + } + return result; +} + +function convertToLoadBalancingPolicy(protoPolicy: TypedExtensionConfig__Output, selectChildPolicy: (childPolicy: LoadBalancingPolicy__Output) => LoadBalancingConfig): LoadBalancingConfig { + if (protoPolicy.typed_config?.type_url !== XDS_TYPED_STRUCT_TYPE_URL && protoPolicy.typed_config?.type_url !== UDPA_TYPED_STRUCT_TYPE_URL) { + throw new Error(`Typed struct LB policy parsing error: unexpected type URL ${protoPolicy.typed_config?.type_url}`); + } + const typedStruct = decodeTypedStruct(protoPolicy.typed_config); + if (!typedStruct.value) { + throw new Error(`Typed struct LB parsing error: unexpected value ${typedStruct.value}`); + } + const policyName = typedStruct.type_url.substring(typedStruct.type_url.lastIndexOf('/') + 1); + return { + [policyName]: flattenStruct(typedStruct.value) + }; +} + +export function setup() { + registerLbPolicy(XDS_TYPED_STRUCT_TYPE_URL, convertToLoadBalancingPolicy); + registerLbPolicy(UDPA_TYPED_STRUCT_TYPE_URL, convertToLoadBalancingPolicy); +} diff --git a/packages/grpc-js-xds/src/load-balancer-cds.ts b/packages/grpc-js-xds/src/load-balancer-cds.ts index 44de10ac4..647ab2b97 100644 --- a/packages/grpc-js-xds/src/load-balancer-cds.ts +++ b/packages/grpc-js-xds/src/load-balancer-cds.ts @@ -193,11 +193,11 @@ export class CdsLoadBalancer implements LoadBalancer { this.reportError((e as Error).message); return; } + const rootClusterUpdate = this.clusterTree[this.latestConfig!.getCluster()].latestUpdate!; const clusterResolverConfig: LoadBalancingConfig = { xds_cluster_resolver: { discovery_mechanisms: discoveryMechanismList, - locality_picking_policy: [], - endpoint_picking_policy: [] + xds_lb_policy: rootClusterUpdate.lbPolicyConfig } }; let parsedClusterResolverConfig: TypedLoadBalancingConfig; diff --git a/packages/grpc-js-xds/src/load-balancer-priority.ts b/packages/grpc-js-xds/src/load-balancer-priority.ts index 4372b0eac..4a3e41a11 100644 --- a/packages/grpc-js-xds/src/load-balancer-priority.ts +++ b/packages/grpc-js-xds/src/load-balancer-priority.ts @@ -27,6 +27,7 @@ import QueuePicker = experimental.QueuePicker; import UnavailablePicker = experimental.UnavailablePicker; import ChildLoadBalancerHandler = experimental.ChildLoadBalancerHandler; import selectLbConfigFromList = experimental.selectLbConfigFromList; +import { Locality__Output } from './generated/envoy/config/core/v3/Locality'; const TRACER_NAME = 'priority'; @@ -41,6 +42,8 @@ const DEFAULT_RETENTION_INTERVAL_MS = 15 * 60 * 1000; export type LocalitySubchannelAddress = SubchannelAddress & { localityPath: string[]; + locality: Locality__Output; + weight: number; }; export function isLocalitySubchannelAddress( diff --git a/packages/grpc-js-xds/src/load-balancer-xds-cluster-impl.ts b/packages/grpc-js-xds/src/load-balancer-xds-cluster-impl.ts index 9a9304518..eb3df8c38 100644 --- a/packages/grpc-js-xds/src/load-balancer-xds-cluster-impl.ts +++ b/packages/grpc-js-xds/src/load-balancer-xds-cluster-impl.ts @@ -17,7 +17,8 @@ import { experimental, logVerbosity, status as Status, Metadata, connectivityState } from "@grpc/grpc-js"; import { validateXdsServerConfig, XdsServerConfig } from "./xds-bootstrap"; -import { getSingletonXdsClient, XdsClient, XdsClusterDropStats } from "./xds-client"; +import { getSingletonXdsClient, XdsClient, XdsClusterDropStats, XdsClusterLocalityStats } from "./xds-client"; +import { LocalitySubchannelAddress } from "./load-balancer-priority"; import LoadBalancer = experimental.LoadBalancer; import registerLoadBalancerType = experimental.registerLoadBalancerType; @@ -31,6 +32,8 @@ import ChildLoadBalancerHandler = experimental.ChildLoadBalancerHandler; import createChildChannelControlHelper = experimental.createChildChannelControlHelper; import TypedLoadBalancingConfig = experimental.TypedLoadBalancingConfig; import selectLbConfigFromList = experimental.selectLbConfigFromList; +import SubchannelInterface = experimental.SubchannelInterface; +import BaseSubchannelWrapper = experimental.BaseSubchannelWrapper; const TRACER_NAME = 'xds_cluster_impl'; @@ -80,7 +83,7 @@ class XdsClusterImplLoadBalancingConfig implements TypedLoadBalancingConfig { }; } - constructor(private cluster: string, private dropCategories: DropCategory[], private childPolicy: TypedLoadBalancingConfig, private edsServiceName?: string, private lrsLoadReportingServer?: XdsServerConfig, maxConcurrentRequests?: number) { + constructor(private cluster: string, private dropCategories: DropCategory[], private childPolicy: TypedLoadBalancingConfig, private edsServiceName: string, private lrsLoadReportingServer: XdsServerConfig, maxConcurrentRequests?: number) { this.maxConcurrentRequests = maxConcurrentRequests ?? DEFAULT_MAX_CONCURRENT_REQUESTS; } @@ -112,8 +115,8 @@ class XdsClusterImplLoadBalancingConfig implements TypedLoadBalancingConfig { if (!('cluster' in obj && typeof obj.cluster === 'string')) { throw new Error('xds_cluster_impl config must have a string field cluster'); } - if ('eds_service_name' in obj && !(obj.eds_service_name === undefined || typeof obj.eds_service_name === 'string')) { - throw new Error('xds_cluster_impl config eds_service_name field must be a string if provided'); + if (!('eds_service_name' in obj && typeof obj.eds_service_name === 'string')) { + throw new Error('xds_cluster_impl config must have a string field eds_service_name'); } if ('max_concurrent_requests' in obj && !(obj.max_concurrent_requests === undefined || typeof obj.max_concurrent_requests === 'number')) { throw new Error('xds_cluster_impl config max_concurrent_requests must be a number if provided'); @@ -128,7 +131,7 @@ class XdsClusterImplLoadBalancingConfig implements TypedLoadBalancingConfig { if (!childConfig) { throw new Error('xds_cluster_impl config child_policy parsing failed'); } - return new XdsClusterImplLoadBalancingConfig(obj.cluster, obj.drop_categories.map(validateDropCategory), childConfig, obj.eds_service_name, obj.lrs_load_reporting_server ? validateXdsServerConfig(obj.lrs_load_reporting_server) : undefined, obj.max_concurrent_requests); + return new XdsClusterImplLoadBalancingConfig(obj.cluster, obj.drop_categories.map(validateDropCategory), childConfig, obj.eds_service_name, validateXdsServerConfig(obj.lrs_load_reporting_server), obj.max_concurrent_requests); } } @@ -156,7 +159,25 @@ class CallCounterMap { const callCounterMap = new CallCounterMap(); -class DropPicker implements Picker { +class LocalitySubchannelWrapper extends BaseSubchannelWrapper implements SubchannelInterface { + constructor(child: SubchannelInterface, private statsObject: XdsClusterLocalityStats) { + super(child); + } + + getStatsObject() { + return this.statsObject; + } + + getWrappedSubchannel(): SubchannelInterface { + return this.child; + } +} + +/** + * This picker is responsible for implementing the drop configuration, and for + * recording drop stats and per-locality stats. + */ +class XdsClusterImplPicker implements Picker { constructor(private originalPicker: Picker, private callCounterMapKey: string, private maxConcurrentRequests: number, private dropCategories: DropCategory[], private clusterDropStats: XdsClusterDropStats | null) {} private checkForMaxConcurrentRequestsDrop(): boolean { @@ -186,16 +207,19 @@ class DropPicker implements Picker { } if (details === null) { const originalPick = this.originalPicker.pick(pickArgs); + const pickSubchannel = originalPick.subchannel ? (originalPick.subchannel as LocalitySubchannelWrapper) : null; return { pickResultType: originalPick.pickResultType, status: originalPick.status, - subchannel: originalPick.subchannel, + subchannel: pickSubchannel?.getWrappedSubchannel() ?? null, onCallStarted: () => { originalPick.onCallStarted?.(); + pickSubchannel?.getStatsObject().addCallStarted(); callCounterMap.startCall(this.callCounterMapKey); }, onCallEnded: status => { originalPick.onCallEnded?.(status); + pickSubchannel?.getStatsObject().addCallFinished(status !== Status.OK) callCounterMap.endCall(this.callCounterMapKey); } }; @@ -227,11 +251,25 @@ class XdsClusterImplBalancer implements LoadBalancer { constructor(private readonly channelControlHelper: ChannelControlHelper) { this.childBalancer = new ChildLoadBalancerHandler(createChildChannelControlHelper(channelControlHelper, { + createSubchannel: (subchannelAddress, subchannelArgs) => { + if (!this.xdsClient || !this.latestConfig) { + throw new Error('xds_cluster_impl: invalid state: createSubchannel called with xdsClient or latestConfig not populated'); + } + const locality = (subchannelAddress as LocalitySubchannelAddress).locality ?? ''; + const wrapperChild = channelControlHelper.createSubchannel(subchannelAddress, subchannelArgs); + const statsObj = this.xdsClient.addClusterLocalityStats( + this.latestConfig.getLrsLoadReportingServer(), + this.latestConfig.getCluster(), + this.latestConfig.getEdsServiceName(), + locality + ); + return new LocalitySubchannelWrapper(wrapperChild, statsObj); + }, updateState: (connectivityState, originalPicker) => { if (this.latestConfig === null) { channelControlHelper.updateState(connectivityState, originalPicker); } else { - const picker = new DropPicker(originalPicker, getCallCounterMapKey(this.latestConfig.getCluster(), this.latestConfig.getEdsServiceName()), this.latestConfig.getMaxConcurrentRequests(), this.latestConfig.getDropCategories(), this.clusterDropStats); + const picker = new XdsClusterImplPicker(originalPicker, getCallCounterMapKey(this.latestConfig.getCluster(), this.latestConfig.getEdsServiceName()), this.latestConfig.getMaxConcurrentRequests(), this.latestConfig.getDropCategories(), this.clusterDropStats); channelControlHelper.updateState(connectivityState, picker); } } diff --git a/packages/grpc-js-xds/src/load-balancer-xds-cluster-resolver.ts b/packages/grpc-js-xds/src/load-balancer-xds-cluster-resolver.ts index dd9b80107..6c11c52bf 100644 --- a/packages/grpc-js-xds/src/load-balancer-xds-cluster-resolver.ts +++ b/packages/grpc-js-xds/src/load-balancer-xds-cluster-resolver.ts @@ -38,7 +38,6 @@ import parseLoadBalancingConfig = experimental.parseLoadBalancingConfig; import UnavailablePicker = experimental.UnavailablePicker; import { serverConfigEqual, validateXdsServerConfig, XdsServerConfig } from "./xds-bootstrap"; import { EndpointResourceType } from "./xds-resource-type/endpoint-resource-type"; -import { WeightedTargetRaw } from "./load-balancer-weighted-target"; const TRACER_NAME = 'xds_cluster_resolver'; @@ -85,40 +84,31 @@ class XdsClusterResolverLoadBalancingConfig implements TypedLoadBalancingConfig return { [TYPE_NAME]: { discovery_mechanisms: this.discoveryMechanisms, - locality_picking_policy: this.localityPickingPolicy, - endpoint_picking_policy: this.endpointPickingPolicy + xds_lb_policy: this.xdsLbPolicy } } } - constructor(private discoveryMechanisms: DiscoveryMechanism[], private localityPickingPolicy: LoadBalancingConfig[], private endpointPickingPolicy: LoadBalancingConfig[]) {} + constructor(private discoveryMechanisms: DiscoveryMechanism[], private xdsLbPolicy: LoadBalancingConfig[]) {} getDiscoveryMechanisms() { return this.discoveryMechanisms; } - getLocalityPickingPolicy() { - return this.localityPickingPolicy; - } - - getEndpointPickingPolicy() { - return this.endpointPickingPolicy; + getXdsLbPolicy() { + return this.xdsLbPolicy; } static createFromJson(obj: any): XdsClusterResolverLoadBalancingConfig { if (!('discovery_mechanisms' in obj && Array.isArray(obj.discovery_mechanisms))) { throw new Error('xds_cluster_resolver config must have a discovery_mechanisms array'); } - if (!('locality_picking_policy' in obj && Array.isArray(obj.locality_picking_policy))) { - throw new Error('xds_cluster_resolver config must have a locality_picking_policy array'); - } - if (!('endpoint_picking_policy' in obj && Array.isArray(obj.endpoint_picking_policy))) { - throw new Error('xds_cluster_resolver config must have a endpoint_picking_policy array'); + if (!('xds_lb_policy' in obj && Array.isArray(obj.xds_lb_policy))) { + throw new Error('xds_cluster_resolver config must have a xds_lb_policy array'); } return new XdsClusterResolverLoadBalancingConfig( obj.discovery_mechanisms.map(validateDiscoveryMechanism), - obj.locality_picking_policy, - obj.endpoint_picking_policy + obj.xds_lb_policy ); } } @@ -223,7 +213,7 @@ function getDnsPriorities(addresses: SubchannelAddress[]): PriorityEntry[] { }]; } -function localityToName(locality: Locality__Output) { +export function localityToName(locality: Locality__Output) { return `{region=${locality.region},zone=${locality.zone},sub_zone=${locality.sub_zone}}`; } @@ -260,12 +250,11 @@ export class XdsClusterResolver implements LoadBalancer { const fullPriorityList: string[] = []; const priorityChildren: {[name: string]: PriorityChildRaw} = {}; const addressList: LocalitySubchannelAddress[] = []; + const edsChildPolicy = this.latestConfig.getXdsLbPolicy(); for (const entry of this.discoveryMechanismList) { const newPriorityNames: string[] = []; const newLocalityPriorities = new Map(); - const configEndpointPickingPolicy = this.latestConfig.getEndpointPickingPolicy(); - const defaultEndpointPickingPolicy: LoadBalancingConfig = entry.discoveryMechanism.type === 'EDS' ? { round_robin: {} } : { pick_first: {} }; - const endpointPickingPolicy: LoadBalancingConfig[] = configEndpointPickingPolicy.length > 0 ? configEndpointPickingPolicy : [defaultEndpointPickingPolicy]; + const xdsClusterImplChildPolicy: LoadBalancingConfig[] = entry.discoveryMechanism.type === 'EDS' ? edsChildPolicy : [{ pick_first: {} }]; for (const [priority, priorityEntry] of entry.latestUpdate!.entries()) { /** @@ -301,32 +290,15 @@ export class XdsClusterResolver implements LoadBalancer { } newPriorityNames[priority] = newPriorityName; - const childTargets: {[locality: string]: WeightedTargetRaw} = {}; for (const localityObj of priorityEntry.localities) { - let childPolicy: LoadBalancingConfig[]; - if (entry.discoveryMechanism.lrs_load_reporting_server !== undefined) { - childPolicy = [{ - lrs: { - cluster_name: entry.discoveryMechanism.cluster, - eds_service_name: entry.discoveryMechanism.eds_service_name ?? '', - locality: {...localityObj.locality}, - lrs_load_reporting_server: {...entry.discoveryMechanism.lrs_load_reporting_server}, - child_policy: endpointPickingPolicy - } - }]; - } else { - childPolicy = endpointPickingPolicy; - } - childTargets[localityToName(localityObj.locality)] = { - weight: localityObj.weight, - child_policy: childPolicy, - }; for (const address of localityObj.addresses) { addressList.push({ localityPath: [ newPriorityName, localityToName(localityObj.locality), ], + locality: localityObj.locality, + weight: localityObj.weight, ...address, }); } @@ -337,13 +309,9 @@ export class XdsClusterResolver implements LoadBalancer { cluster: entry.discoveryMechanism.cluster, drop_categories: priorityEntry.dropCategories, max_concurrent_requests: entry.discoveryMechanism.max_concurrent_requests, - eds_service_name: entry.discoveryMechanism.eds_service_name, + eds_service_name: entry.discoveryMechanism.eds_service_name ?? '', lrs_load_reporting_server: entry.discoveryMechanism.lrs_load_reporting_server, - child_policy: [{ - weighted_target: { - targets: childTargets - } - }] + child_policy: xdsClusterImplChildPolicy } } let priorityChildConfig: LoadBalancingConfig; diff --git a/packages/grpc-js-xds/src/load-balancer-xds-wrr-locality.ts b/packages/grpc-js-xds/src/load-balancer-xds-wrr-locality.ts new file mode 100644 index 000000000..757f9b93b --- /dev/null +++ b/packages/grpc-js-xds/src/load-balancer-xds-wrr-locality.ts @@ -0,0 +1,112 @@ +/* + * Copyright 2023 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import { LoadBalancingConfig, experimental, logVerbosity } from "@grpc/grpc-js"; +import { WeightedTargetRaw } from "./load-balancer-weighted-target"; +import { isLocalitySubchannelAddress } from "./load-balancer-priority"; +import { localityToName } from "./load-balancer-xds-cluster-resolver"; +import TypedLoadBalancingConfig = experimental.TypedLoadBalancingConfig; +import LoadBalancer = experimental.LoadBalancer; +import ChannelControlHelper = experimental.ChannelControlHelper; +import ChildLoadBalancerHandler = experimental.ChildLoadBalancerHandler; +import SubchannelAddress = experimental.SubchannelAddress; +import parseLoadBalancingConfig = experimental.parseLoadBalancingConfig; +import registerLoadBalancerType = experimental.registerLoadBalancerType; + +const TRACER_NAME = 'xds_wrr_locality'; + +function trace(text: string): void { + experimental.trace(logVerbosity.DEBUG, TRACER_NAME, text); +} + +const TYPE_NAME = 'xds_wrr_locality'; + +class XdsWrrLocalityLoadBalancingConfig implements TypedLoadBalancingConfig { + getLoadBalancerName(): string { + return TYPE_NAME; + } + toJsonObject(): object { + return { + [TYPE_NAME]: { + child_policy: this.childPolicy + } + } + } + + constructor(private childPolicy: LoadBalancingConfig[]) {} + + getChildPolicy() { + return this.childPolicy; + } + + static createFromJson(obj: any): XdsWrrLocalityLoadBalancingConfig { + if (!('child_policy' in obj && Array.isArray(obj.child_policy))) { + throw new Error('xds_wrr_locality config must have a child_policy array'); + } + return new XdsWrrLocalityLoadBalancingConfig( + obj.child_policy + ); + } +} + +class XdsWrrLocalityLoadBalancer implements LoadBalancer { + private childBalancer: ChildLoadBalancerHandler; + constructor(private readonly channelControlHelper: ChannelControlHelper) { + this.childBalancer = new ChildLoadBalancerHandler(channelControlHelper); + } + updateAddressList(addressList: SubchannelAddress[], lbConfig: TypedLoadBalancingConfig, attributes: { [key: string]: unknown; }): void { + if (!(lbConfig instanceof XdsWrrLocalityLoadBalancingConfig)) { + trace('Discarding address list update with unrecognized config ' + JSON.stringify(lbConfig, undefined, 2)); + return; + } + const targets: {[localityName: string]: WeightedTargetRaw} = {}; + for (const address of addressList) { + if (!isLocalitySubchannelAddress(address)) { + return; + } + const localityName = localityToName(address.locality); + if (!(localityName in targets)) { + targets[localityName] = { + child_policy: lbConfig.getChildPolicy(), + weight: address.weight + }; + } + } + const childConfig = { + weighted_target: { + targets: targets + } + }; + this.childBalancer.updateAddressList(addressList, parseLoadBalancingConfig(childConfig), attributes); + } + exitIdle(): void { + this.childBalancer.exitIdle(); + } + resetBackoff(): void { + this.childBalancer.resetBackoff(); + } + destroy(): void { + this.childBalancer.destroy(); + } + getTypeName(): string { + return TYPE_NAME; + } +} + +export function setup() { + registerLoadBalancerType(TYPE_NAME, XdsWrrLocalityLoadBalancer, XdsWrrLocalityLoadBalancingConfig); +} diff --git a/packages/grpc-js-xds/src/xds-resource-type/cluster-resource-type.ts b/packages/grpc-js-xds/src/xds-resource-type/cluster-resource-type.ts index e617bef94..726a5d2d2 100644 --- a/packages/grpc-js-xds/src/xds-resource-type/cluster-resource-type.ts +++ b/packages/grpc-js-xds/src/xds-resource-type/cluster-resource-type.ts @@ -17,19 +17,20 @@ import { CDS_TYPE_URL, CLUSTER_CONFIG_TYPE_URL, decodeSingleResource } from "../resources"; import { XdsDecodeContext, XdsDecodeResult, XdsResourceType } from "./xds-resource-type"; -import { experimental } from "@grpc/grpc-js"; +import { LoadBalancingConfig, experimental } from "@grpc/grpc-js"; import { XdsServerConfig } from "../xds-bootstrap"; import { Duration__Output } from "../generated/google/protobuf/Duration"; import { OutlierDetection__Output } from "../generated/envoy/config/cluster/v3/OutlierDetection"; -import { EXPERIMENTAL_OUTLIER_DETECTION } from "../environment"; +import { EXPERIMENTAL_CUSTOM_LB_CONFIG, EXPERIMENTAL_OUTLIER_DETECTION } from "../environment"; import { Cluster__Output } from "../generated/envoy/config/cluster/v3/Cluster"; import { UInt32Value__Output } from "../generated/google/protobuf/UInt32Value"; import { Any__Output } from "../generated/google/protobuf/Any"; - -import SuccessRateEjectionConfig = experimental.SuccessRateEjectionConfig; -import FailurePercentageEjectionConfig = experimental.FailurePercentageEjectionConfig; import { Watcher, XdsClient } from "../xds-client"; import { protoDurationToDuration } from "../duration"; +import { convertToLoadBalancingConfig } from "../lb-policy-registry"; +import SuccessRateEjectionConfig = experimental.SuccessRateEjectionConfig; +import FailurePercentageEjectionConfig = experimental.FailurePercentageEjectionConfig; +import parseLoadBalancingConfig = experimental.parseLoadBalancingConfig; export interface CdsUpdate { type: 'AGGREGATE' | 'EDS' | 'LOGICAL_DNS'; @@ -39,6 +40,7 @@ export interface CdsUpdate { maxConcurrentRequests?: number; edsServiceName?: string; dnsHostname?: string; + lbPolicyConfig: LoadBalancingConfig[]; outlierDetectionUpdate?: experimental.OutlierDetectionRawConfig; } @@ -85,7 +87,6 @@ function convertOutlierDetectionUpdate(outlierDetection: OutlierDetection__Outpu }; } - export class ClusterResourceType extends XdsResourceType { private static singleton: ClusterResourceType = new ClusterResourceType(); @@ -122,7 +123,25 @@ export class ClusterResourceType extends XdsResourceType { } private validateResource(context: XdsDecodeContext, message: Cluster__Output): CdsUpdate | null { - if (message.lb_policy !== 'ROUND_ROBIN') { + let lbPolicyConfig: LoadBalancingConfig; + if (EXPERIMENTAL_CUSTOM_LB_CONFIG && message.load_balancing_policy) { + try { + lbPolicyConfig = convertToLoadBalancingConfig(message.load_balancing_policy); + } catch (e) { + return null; + } + try { + parseLoadBalancingConfig(lbPolicyConfig); + } catch (e) { + return null; + } + } else if (message.lb_policy === 'ROUND_ROBIN') { + lbPolicyConfig = { + xds_wrr_locality: { + child_policy: [{round_robin: {}}] + } + }; + } else { return null; } if (message.lrs_server) { @@ -167,7 +186,8 @@ export class ClusterResourceType extends XdsResourceType { type: 'AGGREGATE', name: message.name, aggregateChildren: clusterConfig.clusters, - outlierDetectionUpdate: convertOutlierDetectionUpdate(null) + outlierDetectionUpdate: convertOutlierDetectionUpdate(null), + lbPolicyConfig: [lbPolicyConfig] }; } else { let maxConcurrentRequests: number | undefined = undefined; @@ -190,7 +210,8 @@ export class ClusterResourceType extends XdsResourceType { maxConcurrentRequests: maxConcurrentRequests, edsServiceName: message.eds_cluster_config.service_name === '' ? undefined : message.eds_cluster_config.service_name, lrsLoadReportingServer: message.lrs_server ? context.server : undefined, - outlierDetectionUpdate: convertOutlierDetectionUpdate(message.outlier_detection) + outlierDetectionUpdate: convertOutlierDetectionUpdate(message.outlier_detection), + lbPolicyConfig: [lbPolicyConfig] } } else if (message.type === 'LOGICAL_DNS') { if (!message.load_assignment) { @@ -219,7 +240,8 @@ export class ClusterResourceType extends XdsResourceType { maxConcurrentRequests: maxConcurrentRequests, dnsHostname: `${socketAddress.address}:${socketAddress.port_value}`, lrsLoadReportingServer: message.lrs_server ? context.server : undefined, - outlierDetectionUpdate: convertOutlierDetectionUpdate(message.outlier_detection) + outlierDetectionUpdate: convertOutlierDetectionUpdate(message.outlier_detection), + lbPolicyConfig: [lbPolicyConfig] }; } } From 13a6e6d273d1fe57bb4e5142431fee46d294779a Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Wed, 16 Aug 2023 10:24:47 -0700 Subject: [PATCH 2/8] grpc-js-xds: Update envoy-api dependency and code generation --- packages/grpc-js-xds/deps/envoy-api | 2 +- packages/grpc-js-xds/package.json | 2 +- packages/grpc-js-xds/src/generated/ads.ts | 7 +- packages/grpc-js-xds/src/generated/cluster.ts | 15 +- packages/grpc-js-xds/src/generated/csds.ts | 191 +------ .../grpc-js-xds/src/generated/endpoint.ts | 6 + .../envoy/admin/v3/ClientResourceStatus.ts | 2 +- .../envoy/admin/v3/ClustersConfigDump.ts | 6 +- .../envoy/admin/v3/EcdsConfigDump.ts | 100 ++++ .../envoy/admin/v3/EndpointsConfigDump.ts | 6 +- .../envoy/admin/v3/ListenersConfigDump.ts | 6 +- .../envoy/admin/v3/RoutesConfigDump.ts | 6 +- .../envoy/admin/v3/ScopedRoutesConfigDump.ts | 6 +- .../envoy/admin/v3/UpdateFailureState.ts | 2 +- .../envoy/config/accesslog/v3/AccessLog.ts | 8 +- .../config/accesslog/v3/AccessLogFilter.ts | 19 +- .../config/accesslog/v3/DurationFilter.ts | 10 +- .../config/accesslog/v3/LogTypeFilter.ts | 33 ++ .../config/accesslog/v3/RuntimeFilter.ts | 12 +- .../config/cluster/v3/CircuitBreakers.ts | 32 ++ .../envoy/config/cluster/v3/Cluster.ts | 401 +++++++++------ .../config/cluster/v3/ClusterCollection.ts | 4 +- .../envoy/config/cluster/v3/Filter.ts | 12 +- .../config/cluster/v3/LoadBalancingPolicy.ts | 6 + .../config/cluster/v3/OutlierDetection.ts | 30 +- .../cluster/v3/UpstreamConnectionOptions.ts | 12 + .../generated/envoy/config/core/v3/Address.ts | 6 +- .../core/v3/AlternateProtocolsCacheOptions.ts | 80 +++ .../envoy/config/core/v3/ApiConfigSource.ts | 27 +- .../envoy/config/core/v3/BindConfig.ts | 51 +- .../envoy/config/core/v3/ConfigSource.ts | 49 +- .../envoy/config/core/v3/DataSource.ts | 16 +- .../config/core/v3/DnsResolutionConfig.ts | 6 - .../config/core/v3/DnsResolverOptions.ts | 6 - .../config/core/v3/EnvoyInternalAddress.ts | 28 +- .../envoy/config/core/v3/Extension.ts | 12 +- .../config/core/v3/ExtensionConfigSource.ts | 6 +- .../config/core/v3/ExtraSourceAddress.ts | 38 ++ .../envoy/config/core/v3/GrpcService.ts | 23 +- .../envoy/config/core/v3/HeaderValue.ts | 4 +- .../envoy/config/core/v3/HeaderValueOption.ts | 36 +- .../envoy/config/core/v3/HealthCheck.ts | 129 ++++- .../envoy/config/core/v3/HealthStatus.ts | 6 +- .../envoy/config/core/v3/HealthStatusSet.ts | 17 + .../config/core/v3/Http1ProtocolOptions.ts | 94 +++- .../config/core/v3/Http2ProtocolOptions.ts | 72 ++- .../config/core/v3/HttpProtocolOptions.ts | 20 +- .../generated/envoy/config/core/v3/HttpUri.ts | 4 +- .../envoy/config/core/v3/KeepaliveSettings.ts | 12 +- .../envoy/config/core/v3/Metadata.ts | 24 +- .../generated/envoy/config/core/v3/Node.ts | 8 +- .../envoy/config/core/v3/PathConfigSource.ts | 85 ++++ .../config/core/v3/ProxyProtocolConfig.ts | 11 + .../core/v3/ProxyProtocolPassThroughTLVs.ts | 43 ++ .../config/core/v3/QuicKeepAliveSettings.ts | 53 ++ .../config/core/v3/QuicProtocolOptions.ts | 35 +- .../core/v3/RuntimeFractionalPercent.ts | 4 +- .../envoy/config/core/v3/SocketAddress.ts | 12 +- .../envoy/config/core/v3/SocketOption.ts | 40 ++ .../config/core/v3/SocketOptionsOverride.ts | 11 + .../core/v3/SubstitutionFormatString.ts | 12 +- .../config/core/v3/TypedExtensionConfig.ts | 10 +- .../core/v3/UpstreamHttpProtocolOptions.ts | 14 +- .../envoy/config/endpoint/v3/ClusterStats.ts | 12 +- .../envoy/config/endpoint/v3/Endpoint.ts | 26 + .../envoy/config/endpoint/v3/LbEndpoint.ts | 20 +- .../config/endpoint/v3/LocalityLbEndpoints.ts | 18 +- .../config/listener/v3/AdditionalAddress.ts | 38 ++ .../config/listener/v3/ApiListenerManager.ts | 18 + .../envoy/config/listener/v3/Filter.ts | 6 +- .../envoy/config/listener/v3/FilterChain.ts | 34 +- .../config/listener/v3/FilterChainMatch.ts | 2 + .../envoy/config/listener/v3/Listener.ts | 191 +++++-- .../config/listener/v3/ListenerCollection.ts | 4 +- .../config/listener/v3/ListenerFilter.ts | 29 +- .../config/listener/v3/ListenerManager.ts | 18 + .../config/listener/v3/QuicProtocolOptions.ts | 52 +- .../config/listener/v3/UdpListenerConfig.ts | 31 +- .../listener/v3/ValidationListenerManager.ts | 18 + .../config/route/v3/ClusterSpecifierPlugin.ts | 18 +- .../envoy/config/route/v3/CorsPolicy.ts | 54 +- .../config/route/v3/DirectResponseAction.ts | 4 +- .../envoy/config/route/v3/FilterConfig.ts | 36 +- .../envoy/config/route/v3/HeaderMatcher.ts | 106 +++- .../config/route/v3/QueryParameterMatcher.ts | 4 +- .../envoy/config/route/v3/RateLimit.ts | 197 +++++++- .../envoy/config/route/v3/RedirectAction.ts | 16 +- .../envoy/config/route/v3/RetryPolicy.ts | 16 +- .../generated/envoy/config/route/v3/Route.ts | 68 ++- .../envoy/config/route/v3/RouteAction.ts | 298 ++++++++--- .../config/route/v3/RouteConfiguration.ts | 100 +++- .../envoy/config/route/v3/RouteList.ts | 25 + .../envoy/config/route/v3/RouteMatch.ts | 65 ++- .../route/v3/ScopedRouteConfiguration.ts | 27 +- .../envoy/config/route/v3/Tracing.ts | 4 +- .../envoy/config/route/v3/VirtualCluster.ts | 4 +- .../envoy/config/route/v3/VirtualHost.ts | 90 +++- .../envoy/config/route/v3/WeightedCluster.ts | 106 ++-- .../data/accesslog/v3/AccessLogCommon.ts | 421 ++++++++++++++++ .../envoy/data/accesslog/v3/AccessLogType.ts | 15 + .../data/accesslog/v3/ConnectionProperties.ts | 31 ++ .../data/accesslog/v3/HTTPAccessLogEntry.ts | 50 ++ .../accesslog/v3/HTTPRequestProperties.ts | 163 ++++++ .../accesslog/v3/HTTPResponseProperties.ts | 92 ++++ .../envoy/data/accesslog/v3/ResponseFlags.ts | 255 ++++++++++ .../data/accesslog/v3/TCPAccessLogEntry.ts | 26 + .../envoy/data/accesslog/v3/TLSProperties.ts | 131 +++++ .../filters/http/fault/v3/HTTPFault.ts | 41 +- .../v3/HttpConnectionManager.ts | 465 ++++++++++++++++-- .../http_connection_manager/v3/HttpFilter.ts | 10 +- .../v3/ResponseMapper.ts | 12 +- .../wrr_locality/v3/WrrLocality.ts | 25 + .../v3/AggregatedDiscoveryService.ts | 4 +- .../discovery/v3/DeltaDiscoveryRequest.ts | 53 +- .../discovery/v3/DeltaDiscoveryResponse.ts | 17 +- .../service/discovery/v3/DiscoveryRequest.ts | 29 +- .../v3/DynamicParameterConstraints.ts | 119 +++++ .../envoy/service/discovery/v3/Resource.ts | 32 +- .../service/discovery/v3/ResourceLocator.ts | 34 ++ .../service/discovery/v3/ResourceName.ts | 33 ++ .../load_stats/v3/LoadStatsResponse.ts | 20 +- .../envoy/type/http/v3/PathTransformation.ts | 16 +- .../envoy/type/matcher/v3/RegexMatcher.ts | 40 +- .../envoy/type/matcher/v3/StringMatcher.ts | 20 +- .../envoy/type/matcher/v3/StructMatcher.ts | 4 +- .../envoy/type/metadata/v3/MetadataKey.ts | 4 +- packages/grpc-js-xds/src/generated/fault.ts | 26 +- .../google/protobuf/MethodOptions.ts | 3 - .../src/generated/http_connection_manager.ts | 33 ++ .../grpc-js-xds/src/generated/listener.ts | 38 ++ packages/grpc-js-xds/src/generated/lrs.ts | 2 + packages/grpc-js-xds/src/generated/route.ts | 16 + .../grpc-js-xds/src/generated/wrr_locality.ts | 231 +++++++++ .../xds/core/v3/TypedExtensionConfig.ts | 43 ++ .../xds/type/matcher/v3/ListStringMatcher.ts | 17 + .../generated/xds/type/matcher/v3/Matcher.ts | 307 ++++++++++++ .../xds/type/matcher/v3/RegexMatcher.ts | 80 +++ .../xds/type/matcher/v3/StringMatcher.ts | 109 ++++ packages/grpc-js-xds/src/load-balancer-lrs.ts | 200 -------- 139 files changed, 5715 insertions(+), 1347 deletions(-) create mode 100644 packages/grpc-js-xds/src/generated/envoy/admin/v3/EcdsConfigDump.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/LogTypeFilter.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/config/core/v3/ExtraSourceAddress.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/config/core/v3/HealthStatusSet.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/config/core/v3/PathConfigSource.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/config/core/v3/ProxyProtocolPassThroughTLVs.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/config/core/v3/QuicKeepAliveSettings.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/config/core/v3/SocketOptionsOverride.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/config/listener/v3/AdditionalAddress.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ApiListenerManager.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ListenerManager.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ValidationListenerManager.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/config/route/v3/RouteList.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/AccessLogCommon.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/AccessLogType.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/ConnectionProperties.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/HTTPAccessLogEntry.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/HTTPRequestProperties.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/HTTPResponseProperties.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/ResponseFlags.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/TCPAccessLogEntry.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/TLSProperties.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/extensions/load_balancing_policies/wrr_locality/v3/WrrLocality.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/DynamicParameterConstraints.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/ResourceLocator.ts create mode 100644 packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/ResourceName.ts create mode 100644 packages/grpc-js-xds/src/generated/wrr_locality.ts create mode 100644 packages/grpc-js-xds/src/generated/xds/core/v3/TypedExtensionConfig.ts create mode 100644 packages/grpc-js-xds/src/generated/xds/type/matcher/v3/ListStringMatcher.ts create mode 100644 packages/grpc-js-xds/src/generated/xds/type/matcher/v3/Matcher.ts create mode 100644 packages/grpc-js-xds/src/generated/xds/type/matcher/v3/RegexMatcher.ts create mode 100644 packages/grpc-js-xds/src/generated/xds/type/matcher/v3/StringMatcher.ts delete mode 100644 packages/grpc-js-xds/src/load-balancer-lrs.ts diff --git a/packages/grpc-js-xds/deps/envoy-api b/packages/grpc-js-xds/deps/envoy-api index 20b1b5fce..e53e7bbd0 160000 --- a/packages/grpc-js-xds/deps/envoy-api +++ b/packages/grpc-js-xds/deps/envoy-api @@ -1 +1 @@ -Subproject commit 20b1b5fcee88a20a08b71051a961181839ec7268 +Subproject commit e53e7bbd012f81965f2e79848ad9a58ceb67201f diff --git a/packages/grpc-js-xds/package.json b/packages/grpc-js-xds/package.json index 7fd7e700d..3c61b7383 100644 --- a/packages/grpc-js-xds/package.json +++ b/packages/grpc-js-xds/package.json @@ -12,7 +12,7 @@ "prepare": "npm run compile", "pretest": "npm run compile", "posttest": "npm run check", - "generate-types": "proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --includeDirs deps/envoy-api/ deps/xds/ deps/googleapis/ deps/protoc-gen-validate/ -O src/generated/ --grpcLib @grpc/grpc-js envoy/service/discovery/v3/ads.proto envoy/service/load_stats/v3/lrs.proto envoy/config/listener/v3/listener.proto envoy/config/route/v3/route.proto envoy/config/cluster/v3/cluster.proto envoy/config/endpoint/v3/endpoint.proto envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto udpa/type/v1/typed_struct.proto xds/type/v3/typed_struct.proto envoy/extensions/filters/http/fault/v3/fault.proto envoy/service/status/v3/csds.proto", + "generate-types": "proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --includeDirs deps/envoy-api/ deps/xds/ deps/googleapis/ deps/protoc-gen-validate/ -O src/generated/ --grpcLib @grpc/grpc-js envoy/service/discovery/v3/ads.proto envoy/service/load_stats/v3/lrs.proto envoy/config/listener/v3/listener.proto envoy/config/route/v3/route.proto envoy/config/cluster/v3/cluster.proto envoy/config/endpoint/v3/endpoint.proto envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto udpa/type/v1/typed_struct.proto xds/type/v3/typed_struct.proto envoy/extensions/filters/http/fault/v3/fault.proto envoy/service/status/v3/csds.proto envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto", "generate-interop-types": "proto-loader-gen-types --keep-case --longs String --enums String --defaults --oneofs --json --includeComments --includeDirs proto/ -O interop/generated --grpcLib @grpc/grpc-js grpc/testing/test.proto", "generate-test-types": "proto-loader-gen-types --keep-case --longs String --enums String --defaults --oneofs --json --includeComments --includeDirs proto/ -O test/generated --grpcLib @grpc/grpc-js grpc/testing/echo.proto" }, diff --git a/packages/grpc-js-xds/src/generated/ads.ts b/packages/grpc-js-xds/src/generated/ads.ts index 228f6f1d4..d7483075c 100644 --- a/packages/grpc-js-xds/src/generated/ads.ts +++ b/packages/grpc-js-xds/src/generated/ads.ts @@ -24,6 +24,7 @@ export interface ProtoGrpcType { DataSource: MessageTypeDefinition EnvoyInternalAddress: MessageTypeDefinition Extension: MessageTypeDefinition + ExtraSourceAddress: MessageTypeDefinition HeaderMap: MessageTypeDefinition HeaderValue: MessageTypeDefinition HeaderValueOption: MessageTypeDefinition @@ -44,6 +45,7 @@ export interface ProtoGrpcType { RuntimeUInt32: MessageTypeDefinition SocketAddress: MessageTypeDefinition SocketOption: MessageTypeDefinition + SocketOptionsOverride: MessageTypeDefinition TcpKeepalive: MessageTypeDefinition TrafficDirection: EnumTypeDefinition TransportSocket: MessageTypeDefinition @@ -56,7 +58,7 @@ export interface ProtoGrpcType { v3: { AdsDummy: MessageTypeDefinition /** - * See https://github.com/lyft/envoy-api#apis for a description of the role of + * See https://github.com/envoyproxy/envoy-api#apis for a description of the role of * ADS and how it is intended to be used by a management server. ADS requests * have the same structure as their singleton xDS counterparts, but can * multiplex many resource types on a single stream. The type_url in the @@ -68,7 +70,10 @@ export interface ProtoGrpcType { DeltaDiscoveryResponse: MessageTypeDefinition DiscoveryRequest: MessageTypeDefinition DiscoveryResponse: MessageTypeDefinition + DynamicParameterConstraints: MessageTypeDefinition Resource: MessageTypeDefinition + ResourceLocator: MessageTypeDefinition + ResourceName: MessageTypeDefinition } } } diff --git a/packages/grpc-js-xds/src/generated/cluster.ts b/packages/grpc-js-xds/src/generated/cluster.ts index 681bc5a2d..1aa37589b 100644 --- a/packages/grpc-js-xds/src/generated/cluster.ts +++ b/packages/grpc-js-xds/src/generated/cluster.ts @@ -20,7 +20,6 @@ export interface ProtoGrpcType { LoadBalancingPolicy: MessageTypeDefinition OutlierDetection: MessageTypeDefinition TrackClusterStats: MessageTypeDefinition - UpstreamBindConfig: MessageTypeDefinition UpstreamConnectionOptions: MessageTypeDefinition } } @@ -45,6 +44,7 @@ export interface ProtoGrpcType { EventServiceConfig: MessageTypeDefinition Extension: MessageTypeDefinition ExtensionConfigSource: MessageTypeDefinition + ExtraSourceAddress: MessageTypeDefinition GrpcProtocolOptions: MessageTypeDefinition GrpcService: MessageTypeDefinition HeaderMap: MessageTypeDefinition @@ -52,6 +52,7 @@ export interface ProtoGrpcType { HeaderValueOption: MessageTypeDefinition HealthCheck: MessageTypeDefinition HealthStatus: EnumTypeDefinition + HealthStatusSet: MessageTypeDefinition Http1ProtocolOptions: MessageTypeDefinition Http2ProtocolOptions: MessageTypeDefinition Http3ProtocolOptions: MessageTypeDefinition @@ -61,8 +62,10 @@ export interface ProtoGrpcType { Locality: MessageTypeDefinition Metadata: MessageTypeDefinition Node: MessageTypeDefinition + PathConfigSource: MessageTypeDefinition Pipe: MessageTypeDefinition QueryParameter: MessageTypeDefinition + QuicKeepAliveSettings: MessageTypeDefinition QuicProtocolOptions: MessageTypeDefinition RateLimitSettings: MessageTypeDefinition RemoteDataSource: MessageTypeDefinition @@ -78,6 +81,7 @@ export interface ProtoGrpcType { SelfConfigSource: MessageTypeDefinition SocketAddress: MessageTypeDefinition SocketOption: MessageTypeDefinition + SocketOptionsOverride: MessageTypeDefinition TcpKeepalive: MessageTypeDefinition TcpProtocolOptions: MessageTypeDefinition TrafficDirection: EnumTypeDefinition @@ -97,15 +101,6 @@ export interface ProtoGrpcType { } } } - extensions: { - clusters: { - aggregate: { - v3: { - ClusterConfig: MessageTypeDefinition - } - } - } - } type: { matcher: { v3: { diff --git a/packages/grpc-js-xds/src/generated/csds.ts b/packages/grpc-js-xds/src/generated/csds.ts index 58e903bc9..e09151f50 100644 --- a/packages/grpc-js-xds/src/generated/csds.ts +++ b/packages/grpc-js-xds/src/generated/csds.ts @@ -11,109 +11,41 @@ export interface ProtoGrpcType { envoy: { admin: { v3: { - BootstrapConfigDump: MessageTypeDefinition ClientResourceStatus: EnumTypeDefinition ClustersConfigDump: MessageTypeDefinition - ConfigDump: MessageTypeDefinition + EcdsConfigDump: MessageTypeDefinition EndpointsConfigDump: MessageTypeDefinition ListenersConfigDump: MessageTypeDefinition RoutesConfigDump: MessageTypeDefinition ScopedRoutesConfigDump: MessageTypeDefinition - SecretsConfigDump: MessageTypeDefinition UpdateFailureState: MessageTypeDefinition } } annotations: { } config: { - accesslog: { - v3: { - AccessLog: MessageTypeDefinition - AccessLogFilter: MessageTypeDefinition - AndFilter: MessageTypeDefinition - ComparisonFilter: MessageTypeDefinition - DurationFilter: MessageTypeDefinition - ExtensionFilter: MessageTypeDefinition - GrpcStatusFilter: MessageTypeDefinition - HeaderFilter: MessageTypeDefinition - MetadataFilter: MessageTypeDefinition - NotHealthCheckFilter: MessageTypeDefinition - OrFilter: MessageTypeDefinition - ResponseFlagFilter: MessageTypeDefinition - RuntimeFilter: MessageTypeDefinition - StatusCodeFilter: MessageTypeDefinition - TraceableFilter: MessageTypeDefinition - } - } - bootstrap: { - v3: { - Admin: MessageTypeDefinition - Bootstrap: MessageTypeDefinition - ClusterManager: MessageTypeDefinition - CustomInlineHeader: MessageTypeDefinition - FatalAction: MessageTypeDefinition - LayeredRuntime: MessageTypeDefinition - Runtime: MessageTypeDefinition - RuntimeLayer: MessageTypeDefinition - Watchdog: MessageTypeDefinition - Watchdogs: MessageTypeDefinition - } - } - cluster: { - v3: { - CircuitBreakers: MessageTypeDefinition - Cluster: MessageTypeDefinition - ClusterCollection: MessageTypeDefinition - Filter: MessageTypeDefinition - LoadBalancingPolicy: MessageTypeDefinition - OutlierDetection: MessageTypeDefinition - TrackClusterStats: MessageTypeDefinition - UpstreamBindConfig: MessageTypeDefinition - UpstreamConnectionOptions: MessageTypeDefinition - } - } core: { v3: { Address: MessageTypeDefinition - AggregatedConfigSource: MessageTypeDefinition - AlternateProtocolsCacheOptions: MessageTypeDefinition - ApiConfigSource: MessageTypeDefinition - ApiVersion: EnumTypeDefinition AsyncDataSource: MessageTypeDefinition BackoffStrategy: MessageTypeDefinition BindConfig: MessageTypeDefinition BuildVersion: MessageTypeDefinition CidrRange: MessageTypeDefinition - ConfigSource: MessageTypeDefinition ControlPlane: MessageTypeDefinition DataSource: MessageTypeDefinition - DnsResolutionConfig: MessageTypeDefinition - DnsResolverOptions: MessageTypeDefinition EnvoyInternalAddress: MessageTypeDefinition - EventServiceConfig: MessageTypeDefinition Extension: MessageTypeDefinition - ExtensionConfigSource: MessageTypeDefinition - GrpcProtocolOptions: MessageTypeDefinition - GrpcService: MessageTypeDefinition + ExtraSourceAddress: MessageTypeDefinition HeaderMap: MessageTypeDefinition HeaderValue: MessageTypeDefinition HeaderValueOption: MessageTypeDefinition - HealthCheck: MessageTypeDefinition - HealthStatus: EnumTypeDefinition - Http1ProtocolOptions: MessageTypeDefinition - Http2ProtocolOptions: MessageTypeDefinition - Http3ProtocolOptions: MessageTypeDefinition - HttpProtocolOptions: MessageTypeDefinition HttpUri: MessageTypeDefinition - KeepaliveSettings: MessageTypeDefinition Locality: MessageTypeDefinition Metadata: MessageTypeDefinition Node: MessageTypeDefinition Pipe: MessageTypeDefinition - ProxyProtocolConfig: MessageTypeDefinition QueryParameter: MessageTypeDefinition - QuicProtocolOptions: MessageTypeDefinition - RateLimitSettings: MessageTypeDefinition RemoteDataSource: MessageTypeDefinition RequestMethod: EnumTypeDefinition RetryPolicy: MessageTypeDefinition @@ -123,114 +55,15 @@ export interface ProtoGrpcType { RuntimeFractionalPercent: MessageTypeDefinition RuntimePercent: MessageTypeDefinition RuntimeUInt32: MessageTypeDefinition - SchemeHeaderTransformation: MessageTypeDefinition - SelfConfigSource: MessageTypeDefinition SocketAddress: MessageTypeDefinition SocketOption: MessageTypeDefinition + SocketOptionsOverride: MessageTypeDefinition TcpKeepalive: MessageTypeDefinition - TcpProtocolOptions: MessageTypeDefinition TrafficDirection: EnumTypeDefinition TransportSocket: MessageTypeDefinition - TypedExtensionConfig: MessageTypeDefinition - UdpSocketConfig: MessageTypeDefinition - UpstreamHttpProtocolOptions: MessageTypeDefinition WatchedDirectory: MessageTypeDefinition } } - endpoint: { - v3: { - ClusterLoadAssignment: MessageTypeDefinition - Endpoint: MessageTypeDefinition - LbEndpoint: MessageTypeDefinition - LedsClusterLocalityConfig: MessageTypeDefinition - LocalityLbEndpoints: MessageTypeDefinition - } - } - listener: { - v3: { - ActiveRawUdpListenerConfig: MessageTypeDefinition - ApiListener: MessageTypeDefinition - Filter: MessageTypeDefinition - FilterChain: MessageTypeDefinition - FilterChainMatch: MessageTypeDefinition - Listener: MessageTypeDefinition - ListenerCollection: MessageTypeDefinition - ListenerFilter: MessageTypeDefinition - ListenerFilterChainMatchPredicate: MessageTypeDefinition - QuicProtocolOptions: MessageTypeDefinition - UdpListenerConfig: MessageTypeDefinition - } - } - metrics: { - v3: { - DogStatsdSink: MessageTypeDefinition - HistogramBucketSettings: MessageTypeDefinition - HystrixSink: MessageTypeDefinition - StatsConfig: MessageTypeDefinition - StatsMatcher: MessageTypeDefinition - StatsSink: MessageTypeDefinition - StatsdSink: MessageTypeDefinition - TagSpecifier: MessageTypeDefinition - } - } - overload: { - v3: { - BufferFactoryConfig: MessageTypeDefinition - OverloadAction: MessageTypeDefinition - OverloadManager: MessageTypeDefinition - ResourceMonitor: MessageTypeDefinition - ScaleTimersOverloadActionConfig: MessageTypeDefinition - ScaledTrigger: MessageTypeDefinition - ThresholdTrigger: MessageTypeDefinition - Trigger: MessageTypeDefinition - } - } - route: { - v3: { - CorsPolicy: MessageTypeDefinition - Decorator: MessageTypeDefinition - DirectResponseAction: MessageTypeDefinition - FilterAction: MessageTypeDefinition - FilterConfig: MessageTypeDefinition - HeaderMatcher: MessageTypeDefinition - HedgePolicy: MessageTypeDefinition - InternalRedirectPolicy: MessageTypeDefinition - NonForwardingAction: MessageTypeDefinition - QueryParameterMatcher: MessageTypeDefinition - RateLimit: MessageTypeDefinition - RedirectAction: MessageTypeDefinition - RetryPolicy: MessageTypeDefinition - Route: MessageTypeDefinition - RouteAction: MessageTypeDefinition - RouteMatch: MessageTypeDefinition - Tracing: MessageTypeDefinition - VirtualCluster: MessageTypeDefinition - VirtualHost: MessageTypeDefinition - WeightedCluster: MessageTypeDefinition - } - } - trace: { - v3: { - Tracing: MessageTypeDefinition - } - } - } - extensions: { - transport_sockets: { - tls: { - v3: { - CertificateProviderPluginInstance: MessageTypeDefinition - CertificateValidationContext: MessageTypeDefinition - GenericSecret: MessageTypeDefinition - PrivateKeyProvider: MessageTypeDefinition - SdsSecretConfig: MessageTypeDefinition - Secret: MessageTypeDefinition - TlsCertificate: MessageTypeDefinition - TlsParameters: MessageTypeDefinition - TlsSessionTicketKeys: MessageTypeDefinition - } - } - } } service: { status: { @@ -256,7 +89,6 @@ export interface ProtoGrpcType { DoubleMatcher: MessageTypeDefinition ListMatcher: MessageTypeDefinition ListStringMatcher: MessageTypeDefinition - MetadataMatcher: MessageTypeDefinition NodeMatcher: MessageTypeDefinition RegexMatchAndSubstitute: MessageTypeDefinition RegexMatcher: MessageTypeDefinition @@ -265,19 +97,7 @@ export interface ProtoGrpcType { ValueMatcher: MessageTypeDefinition } } - metadata: { - v3: { - MetadataKey: MessageTypeDefinition - MetadataKind: MessageTypeDefinition - } - } - tracing: { - v3: { - CustomTag: MessageTypeDefinition - } - } v3: { - CodecClientType: EnumTypeDefinition DoubleRange: MessageTypeDefinition FractionalPercent: MessageTypeDefinition Int32Range: MessageTypeDefinition @@ -300,7 +120,6 @@ export interface ProtoGrpcType { DescriptorProto: MessageTypeDefinition DoubleValue: MessageTypeDefinition Duration: MessageTypeDefinition - Empty: MessageTypeDefinition EnumDescriptorProto: MessageTypeDefinition EnumOptions: MessageTypeDefinition EnumValueDescriptorProto: MessageTypeDefinition @@ -336,7 +155,6 @@ export interface ProtoGrpcType { udpa: { annotations: { FieldMigrateAnnotation: MessageTypeDefinition - FieldSecurityAnnotation: MessageTypeDefinition FileMigrateAnnotation: MessageTypeDefinition MigrateAnnotation: MessageTypeDefinition PackageVersionStatus: EnumTypeDefinition @@ -382,10 +200,7 @@ export interface ProtoGrpcType { } core: { v3: { - Authority: MessageTypeDefinition - CollectionEntry: MessageTypeDefinition ContextParams: MessageTypeDefinition - ResourceLocator: MessageTypeDefinition } } } diff --git a/packages/grpc-js-xds/src/generated/endpoint.ts b/packages/grpc-js-xds/src/generated/endpoint.ts index 9a87bc9a5..4fcf914e3 100644 --- a/packages/grpc-js-xds/src/generated/endpoint.ts +++ b/packages/grpc-js-xds/src/generated/endpoint.ts @@ -28,16 +28,20 @@ export interface ProtoGrpcType { EnvoyInternalAddress: MessageTypeDefinition EventServiceConfig: MessageTypeDefinition Extension: MessageTypeDefinition + ExtensionConfigSource: MessageTypeDefinition + ExtraSourceAddress: MessageTypeDefinition GrpcService: MessageTypeDefinition HeaderMap: MessageTypeDefinition HeaderValue: MessageTypeDefinition HeaderValueOption: MessageTypeDefinition HealthCheck: MessageTypeDefinition HealthStatus: EnumTypeDefinition + HealthStatusSet: MessageTypeDefinition HttpUri: MessageTypeDefinition Locality: MessageTypeDefinition Metadata: MessageTypeDefinition Node: MessageTypeDefinition + PathConfigSource: MessageTypeDefinition Pipe: MessageTypeDefinition QueryParameter: MessageTypeDefinition RateLimitSettings: MessageTypeDefinition @@ -53,9 +57,11 @@ export interface ProtoGrpcType { SelfConfigSource: MessageTypeDefinition SocketAddress: MessageTypeDefinition SocketOption: MessageTypeDefinition + SocketOptionsOverride: MessageTypeDefinition TcpKeepalive: MessageTypeDefinition TrafficDirection: EnumTypeDefinition TransportSocket: MessageTypeDefinition + TypedExtensionConfig: MessageTypeDefinition WatchedDirectory: MessageTypeDefinition } } diff --git a/packages/grpc-js-xds/src/generated/envoy/admin/v3/ClientResourceStatus.ts b/packages/grpc-js-xds/src/generated/envoy/admin/v3/ClientResourceStatus.ts index 31c3a813a..8488bbdd7 100644 --- a/packages/grpc-js-xds/src/generated/envoy/admin/v3/ClientResourceStatus.ts +++ b/packages/grpc-js-xds/src/generated/envoy/admin/v3/ClientResourceStatus.ts @@ -1,4 +1,4 @@ -// Original file: deps/envoy-api/envoy/admin/v3/config_dump.proto +// Original file: deps/envoy-api/envoy/admin/v3/config_dump_shared.proto /** * Resource status from the view of a xDS client, which tells the synchronization diff --git a/packages/grpc-js-xds/src/generated/envoy/admin/v3/ClustersConfigDump.ts b/packages/grpc-js-xds/src/generated/envoy/admin/v3/ClustersConfigDump.ts index ab7c528bf..aabcd212a 100644 --- a/packages/grpc-js-xds/src/generated/envoy/admin/v3/ClustersConfigDump.ts +++ b/packages/grpc-js-xds/src/generated/envoy/admin/v3/ClustersConfigDump.ts @@ -1,4 +1,4 @@ -// Original file: deps/envoy-api/envoy/admin/v3/config_dump.proto +// Original file: deps/envoy-api/envoy/admin/v3/config_dump_shared.proto import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../google/protobuf/Any'; import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../google/protobuf/Timestamp'; @@ -27,7 +27,7 @@ export interface _envoy_admin_v3_ClustersConfigDump_DynamicCluster { 'last_updated'?: (_google_protobuf_Timestamp | null); /** * Set if the last update failed, cleared after the next successful update. - * The *error_state* field contains the rejected version of this particular + * The ``error_state`` field contains the rejected version of this particular * resource along with the reason and timestamp. For successfully updated or * acknowledged resource, this field should be empty. * [#not-implemented-hide:] @@ -62,7 +62,7 @@ export interface _envoy_admin_v3_ClustersConfigDump_DynamicCluster__Output { 'last_updated': (_google_protobuf_Timestamp__Output | null); /** * Set if the last update failed, cleared after the next successful update. - * The *error_state* field contains the rejected version of this particular + * The ``error_state`` field contains the rejected version of this particular * resource along with the reason and timestamp. For successfully updated or * acknowledged resource, this field should be empty. * [#not-implemented-hide:] diff --git a/packages/grpc-js-xds/src/generated/envoy/admin/v3/EcdsConfigDump.ts b/packages/grpc-js-xds/src/generated/envoy/admin/v3/EcdsConfigDump.ts new file mode 100644 index 000000000..e63307cb5 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/admin/v3/EcdsConfigDump.ts @@ -0,0 +1,100 @@ +// Original file: deps/envoy-api/envoy/admin/v3/config_dump_shared.proto + +import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../google/protobuf/Any'; +import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../google/protobuf/Timestamp'; +import type { UpdateFailureState as _envoy_admin_v3_UpdateFailureState, UpdateFailureState__Output as _envoy_admin_v3_UpdateFailureState__Output } from '../../../envoy/admin/v3/UpdateFailureState'; +import type { ClientResourceStatus as _envoy_admin_v3_ClientResourceStatus } from '../../../envoy/admin/v3/ClientResourceStatus'; + +/** + * [#next-free-field: 6] + */ +export interface _envoy_admin_v3_EcdsConfigDump_EcdsFilterConfig { + /** + * This is the per-resource version information. This version is currently + * taken from the :ref:`version_info + * ` + * field at the time that the ECDS filter was loaded. + */ + 'version_info'?: (string); + /** + * The ECDS filter config. + */ + 'ecds_filter'?: (_google_protobuf_Any | null); + /** + * The timestamp when the ECDS filter was last updated. + */ + 'last_updated'?: (_google_protobuf_Timestamp | null); + /** + * Set if the last update failed, cleared after the next successful update. + * The ``error_state`` field contains the rejected version of this + * particular resource along with the reason and timestamp. For successfully + * updated or acknowledged resource, this field should be empty. + * [#not-implemented-hide:] + */ + 'error_state'?: (_envoy_admin_v3_UpdateFailureState | null); + /** + * The client status of this resource. + * [#not-implemented-hide:] + */ + 'client_status'?: (_envoy_admin_v3_ClientResourceStatus | keyof typeof _envoy_admin_v3_ClientResourceStatus); +} + +/** + * [#next-free-field: 6] + */ +export interface _envoy_admin_v3_EcdsConfigDump_EcdsFilterConfig__Output { + /** + * This is the per-resource version information. This version is currently + * taken from the :ref:`version_info + * ` + * field at the time that the ECDS filter was loaded. + */ + 'version_info': (string); + /** + * The ECDS filter config. + */ + 'ecds_filter': (_google_protobuf_Any__Output | null); + /** + * The timestamp when the ECDS filter was last updated. + */ + 'last_updated': (_google_protobuf_Timestamp__Output | null); + /** + * Set if the last update failed, cleared after the next successful update. + * The ``error_state`` field contains the rejected version of this + * particular resource along with the reason and timestamp. For successfully + * updated or acknowledged resource, this field should be empty. + * [#not-implemented-hide:] + */ + 'error_state': (_envoy_admin_v3_UpdateFailureState__Output | null); + /** + * The client status of this resource. + * [#not-implemented-hide:] + */ + 'client_status': (keyof typeof _envoy_admin_v3_ClientResourceStatus); +} + +/** + * Envoy's ECDS service fills this message with all currently extension + * configuration. Extension configuration information can be used to recreate + * an Envoy ECDS listener and HTTP filters as static filters or by returning + * them in ECDS response. + */ +export interface EcdsConfigDump { + /** + * The ECDS filter configs. + */ + 'ecds_filters'?: (_envoy_admin_v3_EcdsConfigDump_EcdsFilterConfig)[]; +} + +/** + * Envoy's ECDS service fills this message with all currently extension + * configuration. Extension configuration information can be used to recreate + * an Envoy ECDS listener and HTTP filters as static filters or by returning + * them in ECDS response. + */ +export interface EcdsConfigDump__Output { + /** + * The ECDS filter configs. + */ + 'ecds_filters': (_envoy_admin_v3_EcdsConfigDump_EcdsFilterConfig__Output)[]; +} diff --git a/packages/grpc-js-xds/src/generated/envoy/admin/v3/EndpointsConfigDump.ts b/packages/grpc-js-xds/src/generated/envoy/admin/v3/EndpointsConfigDump.ts index d68b27e7c..ab5485dbe 100644 --- a/packages/grpc-js-xds/src/generated/envoy/admin/v3/EndpointsConfigDump.ts +++ b/packages/grpc-js-xds/src/generated/envoy/admin/v3/EndpointsConfigDump.ts @@ -1,4 +1,4 @@ -// Original file: deps/envoy-api/envoy/admin/v3/config_dump.proto +// Original file: deps/envoy-api/envoy/admin/v3/config_dump_shared.proto import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../google/protobuf/Any'; import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../google/protobuf/Timestamp'; @@ -25,7 +25,7 @@ export interface _envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig { 'last_updated'?: (_google_protobuf_Timestamp | null); /** * Set if the last update failed, cleared after the next successful update. - * The *error_state* field contains the rejected version of this particular + * The ``error_state`` field contains the rejected version of this particular * resource along with the reason and timestamp. For successfully updated or * acknowledged resource, this field should be empty. * [#not-implemented-hide:] @@ -58,7 +58,7 @@ export interface _envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig__Outp 'last_updated': (_google_protobuf_Timestamp__Output | null); /** * Set if the last update failed, cleared after the next successful update. - * The *error_state* field contains the rejected version of this particular + * The ``error_state`` field contains the rejected version of this particular * resource along with the reason and timestamp. For successfully updated or * acknowledged resource, this field should be empty. * [#not-implemented-hide:] diff --git a/packages/grpc-js-xds/src/generated/envoy/admin/v3/ListenersConfigDump.ts b/packages/grpc-js-xds/src/generated/envoy/admin/v3/ListenersConfigDump.ts index 745abedae..946e37953 100644 --- a/packages/grpc-js-xds/src/generated/envoy/admin/v3/ListenersConfigDump.ts +++ b/packages/grpc-js-xds/src/generated/envoy/admin/v3/ListenersConfigDump.ts @@ -1,4 +1,4 @@ -// Original file: deps/envoy-api/envoy/admin/v3/config_dump.proto +// Original file: deps/envoy-api/envoy/admin/v3/config_dump_shared.proto import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../google/protobuf/Any'; import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../google/protobuf/Timestamp'; @@ -35,7 +35,7 @@ export interface _envoy_admin_v3_ListenersConfigDump_DynamicListener { 'draining_state'?: (_envoy_admin_v3_ListenersConfigDump_DynamicListenerState | null); /** * Set if the last update failed, cleared after the next successful update. - * The *error_state* field contains the rejected version of this particular + * The ``error_state`` field contains the rejected version of this particular * resource along with the reason and timestamp. For successfully updated or * acknowledged resource, this field should be empty. */ @@ -77,7 +77,7 @@ export interface _envoy_admin_v3_ListenersConfigDump_DynamicListener__Output { 'draining_state': (_envoy_admin_v3_ListenersConfigDump_DynamicListenerState__Output | null); /** * Set if the last update failed, cleared after the next successful update. - * The *error_state* field contains the rejected version of this particular + * The ``error_state`` field contains the rejected version of this particular * resource along with the reason and timestamp. For successfully updated or * acknowledged resource, this field should be empty. */ diff --git a/packages/grpc-js-xds/src/generated/envoy/admin/v3/RoutesConfigDump.ts b/packages/grpc-js-xds/src/generated/envoy/admin/v3/RoutesConfigDump.ts index 2a62e9b74..7b9bb29d0 100644 --- a/packages/grpc-js-xds/src/generated/envoy/admin/v3/RoutesConfigDump.ts +++ b/packages/grpc-js-xds/src/generated/envoy/admin/v3/RoutesConfigDump.ts @@ -1,4 +1,4 @@ -// Original file: deps/envoy-api/envoy/admin/v3/config_dump.proto +// Original file: deps/envoy-api/envoy/admin/v3/config_dump_shared.proto import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../google/protobuf/Any'; import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../google/protobuf/Timestamp'; @@ -25,7 +25,7 @@ export interface _envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig { 'last_updated'?: (_google_protobuf_Timestamp | null); /** * Set if the last update failed, cleared after the next successful update. - * The *error_state* field contains the rejected version of this particular + * The ``error_state`` field contains the rejected version of this particular * resource along with the reason and timestamp. For successfully updated or * acknowledged resource, this field should be empty. * [#not-implemented-hide:] @@ -58,7 +58,7 @@ export interface _envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig__Output { 'last_updated': (_google_protobuf_Timestamp__Output | null); /** * Set if the last update failed, cleared after the next successful update. - * The *error_state* field contains the rejected version of this particular + * The ``error_state`` field contains the rejected version of this particular * resource along with the reason and timestamp. For successfully updated or * acknowledged resource, this field should be empty. * [#not-implemented-hide:] diff --git a/packages/grpc-js-xds/src/generated/envoy/admin/v3/ScopedRoutesConfigDump.ts b/packages/grpc-js-xds/src/generated/envoy/admin/v3/ScopedRoutesConfigDump.ts index f271635bc..c0723ce69 100644 --- a/packages/grpc-js-xds/src/generated/envoy/admin/v3/ScopedRoutesConfigDump.ts +++ b/packages/grpc-js-xds/src/generated/envoy/admin/v3/ScopedRoutesConfigDump.ts @@ -1,4 +1,4 @@ -// Original file: deps/envoy-api/envoy/admin/v3/config_dump.proto +// Original file: deps/envoy-api/envoy/admin/v3/config_dump_shared.proto import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../google/protobuf/Any'; import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../google/protobuf/Timestamp'; @@ -29,7 +29,7 @@ export interface _envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfig 'last_updated'?: (_google_protobuf_Timestamp | null); /** * Set if the last update failed, cleared after the next successful update. - * The *error_state* field contains the rejected version of this particular + * The ``error_state`` field contains the rejected version of this particular * resource along with the reason and timestamp. For successfully updated or * acknowledged resource, this field should be empty. * [#not-implemented-hide:] @@ -66,7 +66,7 @@ export interface _envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfig 'last_updated': (_google_protobuf_Timestamp__Output | null); /** * Set if the last update failed, cleared after the next successful update. - * The *error_state* field contains the rejected version of this particular + * The ``error_state`` field contains the rejected version of this particular * resource along with the reason and timestamp. For successfully updated or * acknowledged resource, this field should be empty. * [#not-implemented-hide:] diff --git a/packages/grpc-js-xds/src/generated/envoy/admin/v3/UpdateFailureState.ts b/packages/grpc-js-xds/src/generated/envoy/admin/v3/UpdateFailureState.ts index b98e8cd4d..100c65a1b 100644 --- a/packages/grpc-js-xds/src/generated/envoy/admin/v3/UpdateFailureState.ts +++ b/packages/grpc-js-xds/src/generated/envoy/admin/v3/UpdateFailureState.ts @@ -1,4 +1,4 @@ -// Original file: deps/envoy-api/envoy/admin/v3/config_dump.proto +// Original file: deps/envoy-api/envoy/admin/v3/config_dump_shared.proto import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../google/protobuf/Any'; import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../google/protobuf/Timestamp'; diff --git a/packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/AccessLog.ts b/packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/AccessLog.ts index 367d8f302..73a031fdd 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/AccessLog.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/AccessLog.ts @@ -5,9 +5,7 @@ import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__ export interface AccessLog { /** - * The name of the access log extension to instantiate. - * The name must match one of the compiled in loggers. - * See the :ref:`extensions listed in typed_config below ` for the default list of available loggers. + * The name of the access log extension configuration. */ 'name'?: (string); /** @@ -24,9 +22,7 @@ export interface AccessLog { export interface AccessLog__Output { /** - * The name of the access log extension to instantiate. - * The name must match one of the compiled in loggers. - * See the :ref:`extensions listed in typed_config below ` for the default list of available loggers. + * The name of the access log extension configuration. */ 'name': (string); /** diff --git a/packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/AccessLogFilter.ts b/packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/AccessLogFilter.ts index 85a952c9c..09563cb7a 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/AccessLogFilter.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/AccessLogFilter.ts @@ -12,9 +12,10 @@ import type { ResponseFlagFilter as _envoy_config_accesslog_v3_ResponseFlagFilte import type { GrpcStatusFilter as _envoy_config_accesslog_v3_GrpcStatusFilter, GrpcStatusFilter__Output as _envoy_config_accesslog_v3_GrpcStatusFilter__Output } from '../../../../envoy/config/accesslog/v3/GrpcStatusFilter'; import type { ExtensionFilter as _envoy_config_accesslog_v3_ExtensionFilter, ExtensionFilter__Output as _envoy_config_accesslog_v3_ExtensionFilter__Output } from '../../../../envoy/config/accesslog/v3/ExtensionFilter'; import type { MetadataFilter as _envoy_config_accesslog_v3_MetadataFilter, MetadataFilter__Output as _envoy_config_accesslog_v3_MetadataFilter__Output } from '../../../../envoy/config/accesslog/v3/MetadataFilter'; +import type { LogTypeFilter as _envoy_config_accesslog_v3_LogTypeFilter, LogTypeFilter__Output as _envoy_config_accesslog_v3_LogTypeFilter__Output } from '../../../../envoy/config/accesslog/v3/LogTypeFilter'; /** - * [#next-free-field: 13] + * [#next-free-field: 14] */ export interface AccessLogFilter { /** @@ -59,17 +60,22 @@ export interface AccessLogFilter { 'grpc_status_filter'?: (_envoy_config_accesslog_v3_GrpcStatusFilter | null); /** * Extension filter. + * [#extension-category: envoy.access_loggers.extension_filters] */ 'extension_filter'?: (_envoy_config_accesslog_v3_ExtensionFilter | null); /** * Metadata Filter */ 'metadata_filter'?: (_envoy_config_accesslog_v3_MetadataFilter | null); - 'filter_specifier'?: "status_code_filter"|"duration_filter"|"not_health_check_filter"|"traceable_filter"|"runtime_filter"|"and_filter"|"or_filter"|"header_filter"|"response_flag_filter"|"grpc_status_filter"|"extension_filter"|"metadata_filter"; + /** + * Log Type Filter + */ + 'log_type_filter'?: (_envoy_config_accesslog_v3_LogTypeFilter | null); + 'filter_specifier'?: "status_code_filter"|"duration_filter"|"not_health_check_filter"|"traceable_filter"|"runtime_filter"|"and_filter"|"or_filter"|"header_filter"|"response_flag_filter"|"grpc_status_filter"|"extension_filter"|"metadata_filter"|"log_type_filter"; } /** - * [#next-free-field: 13] + * [#next-free-field: 14] */ export interface AccessLogFilter__Output { /** @@ -114,11 +120,16 @@ export interface AccessLogFilter__Output { 'grpc_status_filter'?: (_envoy_config_accesslog_v3_GrpcStatusFilter__Output | null); /** * Extension filter. + * [#extension-category: envoy.access_loggers.extension_filters] */ 'extension_filter'?: (_envoy_config_accesslog_v3_ExtensionFilter__Output | null); /** * Metadata Filter */ 'metadata_filter'?: (_envoy_config_accesslog_v3_MetadataFilter__Output | null); - 'filter_specifier': "status_code_filter"|"duration_filter"|"not_health_check_filter"|"traceable_filter"|"runtime_filter"|"and_filter"|"or_filter"|"header_filter"|"response_flag_filter"|"grpc_status_filter"|"extension_filter"|"metadata_filter"; + /** + * Log Type Filter + */ + 'log_type_filter'?: (_envoy_config_accesslog_v3_LogTypeFilter__Output | null); + 'filter_specifier': "status_code_filter"|"duration_filter"|"not_health_check_filter"|"traceable_filter"|"runtime_filter"|"and_filter"|"or_filter"|"header_filter"|"response_flag_filter"|"grpc_status_filter"|"extension_filter"|"metadata_filter"|"log_type_filter"; } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/DurationFilter.ts b/packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/DurationFilter.ts index ee61e55fa..024936704 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/DurationFilter.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/DurationFilter.ts @@ -3,7 +3,10 @@ import type { ComparisonFilter as _envoy_config_accesslog_v3_ComparisonFilter, ComparisonFilter__Output as _envoy_config_accesslog_v3_ComparisonFilter__Output } from '../../../../envoy/config/accesslog/v3/ComparisonFilter'; /** - * Filters on total request duration in milliseconds. + * Filters based on the duration of the request or stream, in milliseconds. + * For end of stream access logs, the total duration of the stream will be used. + * For :ref:`periodic access logs`, + * the duration of the stream at the time of log recording will be used. */ export interface DurationFilter { /** @@ -13,7 +16,10 @@ export interface DurationFilter { } /** - * Filters on total request duration in milliseconds. + * Filters based on the duration of the request or stream, in milliseconds. + * For end of stream access logs, the total duration of the stream will be used. + * For :ref:`periodic access logs`, + * the duration of the stream at the time of log recording will be used. */ export interface DurationFilter__Output { /** diff --git a/packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/LogTypeFilter.ts b/packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/LogTypeFilter.ts new file mode 100644 index 000000000..8d51cd33f --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/LogTypeFilter.ts @@ -0,0 +1,33 @@ +// Original file: deps/envoy-api/envoy/config/accesslog/v3/accesslog.proto + +import type { AccessLogType as _envoy_data_accesslog_v3_AccessLogType } from '../../../../envoy/data/accesslog/v3/AccessLogType'; + +/** + * Filters based on access log type. + */ +export interface LogTypeFilter { + /** + * Logs only records which their type is one of the types defined in this field. + */ + 'types'?: (_envoy_data_accesslog_v3_AccessLogType | keyof typeof _envoy_data_accesslog_v3_AccessLogType)[]; + /** + * If this field is set to true, the filter will instead block all records + * with a access log type in types field, and allow all other records. + */ + 'exclude'?: (boolean); +} + +/** + * Filters based on access log type. + */ +export interface LogTypeFilter__Output { + /** + * Logs only records which their type is one of the types defined in this field. + */ + 'types': (keyof typeof _envoy_data_accesslog_v3_AccessLogType)[]; + /** + * If this field is set to true, the filter will instead block all records + * with a access log type in types field, and allow all other records. + */ + 'exclude': (boolean); +} diff --git a/packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/RuntimeFilter.ts b/packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/RuntimeFilter.ts index 83b075388..b1c940088 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/RuntimeFilter.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/accesslog/v3/RuntimeFilter.ts @@ -8,7 +8,7 @@ import type { FractionalPercent as _envoy_type_v3_FractionalPercent, FractionalP export interface RuntimeFilter { /** * Runtime key to get an optional overridden numerator for use in the - * *percent_sampled* field. If found in runtime, this value will replace the + * ``percent_sampled`` field. If found in runtime, this value will replace the * default numerator. */ 'runtime_key'?: (string); @@ -24,9 +24,9 @@ export interface RuntimeFilter { * is present, the filter will consistently sample across multiple hosts based * on the runtime key value and the value extracted from * :ref:`x-request-id`. If it is - * missing, or *use_independent_randomness* is set to true, the filter will + * missing, or ``use_independent_randomness`` is set to true, the filter will * randomly sample based on the runtime key value alone. - * *use_independent_randomness* can be used for logging kill switches within + * ``use_independent_randomness`` can be used for logging kill switches within * complex nested :ref:`AndFilter * ` and :ref:`OrFilter * ` blocks that are easier to @@ -43,7 +43,7 @@ export interface RuntimeFilter { export interface RuntimeFilter__Output { /** * Runtime key to get an optional overridden numerator for use in the - * *percent_sampled* field. If found in runtime, this value will replace the + * ``percent_sampled`` field. If found in runtime, this value will replace the * default numerator. */ 'runtime_key': (string); @@ -59,9 +59,9 @@ export interface RuntimeFilter__Output { * is present, the filter will consistently sample across multiple hosts based * on the runtime key value and the value extracted from * :ref:`x-request-id`. If it is - * missing, or *use_independent_randomness* is set to true, the filter will + * missing, or ``use_independent_randomness`` is set to true, the filter will * randomly sample based on the runtime key value alone. - * *use_independent_randomness* can be used for logging kill switches within + * ``use_independent_randomness`` can be used for logging kill switches within * complex nested :ref:`AndFilter * ` and :ref:`OrFilter * ` blocks that are easier to diff --git a/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/CircuitBreakers.ts b/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/CircuitBreakers.ts index 12731b056..4a8a4be36 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/CircuitBreakers.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/CircuitBreakers.ts @@ -59,11 +59,13 @@ export interface _envoy_config_cluster_v3_CircuitBreakers_Thresholds { /** * The maximum number of pending requests that Envoy will allow to the * upstream cluster. If not specified, the default is 1024. + * This limit is applied as a connection limit for non-HTTP traffic. */ 'max_pending_requests'?: (_google_protobuf_UInt32Value | null); /** * The maximum number of parallel requests that Envoy will make to the * upstream cluster. If not specified, the default is 1024. + * This limit does not apply to non-HTTP traffic. */ 'max_requests'?: (_google_protobuf_UInt32Value | null); /** @@ -121,11 +123,13 @@ export interface _envoy_config_cluster_v3_CircuitBreakers_Thresholds__Output { /** * The maximum number of pending requests that Envoy will allow to the * upstream cluster. If not specified, the default is 1024. + * This limit is applied as a connection limit for non-HTTP traffic. */ 'max_pending_requests': (_google_protobuf_UInt32Value__Output | null); /** * The maximum number of parallel requests that Envoy will make to the * upstream cluster. If not specified, the default is 1024. + * This limit does not apply to non-HTTP traffic. */ 'max_requests': (_google_protobuf_UInt32Value__Output | null); /** @@ -177,6 +181,20 @@ export interface CircuitBreakers { * are used. */ 'thresholds'?: (_envoy_config_cluster_v3_CircuitBreakers_Thresholds)[]; + /** + * Optional per-host limits which apply to each individual host in a cluster. + * + * .. note:: + * currently only the :ref:`max_connections + * ` field is supported for per-host limits. + * + * If multiple per-host :ref:`Thresholds` + * are defined with the same :ref:`RoutingPriority`, + * the first one in the list is used. If no per-host Thresholds are defined for a given + * :ref:`RoutingPriority`, + * the cluster will not have per-host limits. + */ + 'per_host_thresholds'?: (_envoy_config_cluster_v3_CircuitBreakers_Thresholds)[]; } /** @@ -192,4 +210,18 @@ export interface CircuitBreakers__Output { * are used. */ 'thresholds': (_envoy_config_cluster_v3_CircuitBreakers_Thresholds__Output)[]; + /** + * Optional per-host limits which apply to each individual host in a cluster. + * + * .. note:: + * currently only the :ref:`max_connections + * ` field is supported for per-host limits. + * + * If multiple per-host :ref:`Thresholds` + * are defined with the same :ref:`RoutingPriority`, + * the first one in the list is used. If no per-host Thresholds are defined for a given + * :ref:`RoutingPriority`, + * the cluster will not have per-host limits. + */ + 'per_host_thresholds': (_envoy_config_cluster_v3_CircuitBreakers_Thresholds__Output)[]; } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/Cluster.ts b/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/Cluster.ts index 12ec7b633..be30d8212 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/Cluster.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/Cluster.ts @@ -25,8 +25,9 @@ import type { DnsResolutionConfig as _envoy_config_core_v3_DnsResolutionConfig, import type { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../../google/protobuf/BoolValue'; import type { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../google/protobuf/Struct'; import type { RuntimeDouble as _envoy_config_core_v3_RuntimeDouble, RuntimeDouble__Output as _envoy_config_core_v3_RuntimeDouble__Output } from '../../../../envoy/config/core/v3/RuntimeDouble'; -import type { UInt64Value as _google_protobuf_UInt64Value, UInt64Value__Output as _google_protobuf_UInt64Value__Output } from '../../../../google/protobuf/UInt64Value'; import type { Percent as _envoy_type_v3_Percent, Percent__Output as _envoy_type_v3_Percent__Output } from '../../../../envoy/type/v3/Percent'; +import type { UInt64Value as _google_protobuf_UInt64Value, UInt64Value__Output as _google_protobuf_UInt64Value__Output } from '../../../../google/protobuf/UInt64Value'; +import type { HealthStatusSet as _envoy_config_core_v3_HealthStatusSet, HealthStatusSet__Output as _envoy_config_core_v3_HealthStatusSet__Output } from '../../../../envoy/config/core/v3/HealthStatusSet'; import type { DoubleValue as _google_protobuf_DoubleValue, DoubleValue__Output as _google_protobuf_DoubleValue__Output } from '../../../../google/protobuf/DoubleValue'; import type { Long } from '@grpc/proto-loader'; @@ -47,7 +48,7 @@ export enum _envoy_config_cluster_v3_Cluster_ClusterProtocolSelection { /** * Common configuration for all load balancer implementations. - * [#next-free-field: 8] + * [#next-free-field: 9] */ export interface _envoy_config_cluster_v3_Cluster_CommonLbConfig { /** @@ -85,7 +86,7 @@ export interface _envoy_config_cluster_v3_Cluster_CommonLbConfig { */ 'ignore_new_hosts_until_first_hc'?: (boolean); /** - * If set to `true`, the cluster manager will drain all existing + * If set to ``true``, the cluster manager will drain all existing * connections to upstream hosts whenever hosts are added or removed from the cluster. */ 'close_connections_on_host_set_change'?: (boolean); @@ -93,12 +94,21 @@ export interface _envoy_config_cluster_v3_Cluster_CommonLbConfig { * Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) */ 'consistent_hashing_lb_config'?: (_envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig | null); + /** + * This controls what hosts are considered valid when using + * :ref:`host overrides `, which is used by some + * filters to modify the load balancing decision. + * + * If this is unset then [UNKNOWN, HEALTHY, DEGRADED] will be applied by default. If this is + * set with an empty set of statuses then host overrides will be ignored by the load balancing. + */ + 'override_host_status'?: (_envoy_config_core_v3_HealthStatusSet | null); 'locality_config_specifier'?: "zone_aware_lb_config"|"locality_weighted_lb_config"; } /** * Common configuration for all load balancer implementations. - * [#next-free-field: 8] + * [#next-free-field: 9] */ export interface _envoy_config_cluster_v3_Cluster_CommonLbConfig__Output { /** @@ -136,7 +146,7 @@ export interface _envoy_config_cluster_v3_Cluster_CommonLbConfig__Output { */ 'ignore_new_hosts_until_first_hc': (boolean); /** - * If set to `true`, the cluster manager will drain all existing + * If set to ``true``, the cluster manager will drain all existing * connections to upstream hosts whenever hosts are added or removed from the cluster. */ 'close_connections_on_host_set_change': (boolean); @@ -144,6 +154,15 @@ export interface _envoy_config_cluster_v3_Cluster_CommonLbConfig__Output { * Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.) */ 'consistent_hashing_lb_config': (_envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig__Output | null); + /** + * This controls what hosts are considered valid when using + * :ref:`host overrides `, which is used by some + * filters to modify the load balancing decision. + * + * If this is unset then [UNKNOWN, HEALTHY, DEGRADED] will be applied by default. If this is + * set with an empty set of statuses then host overrides will be ignored by the load balancing. + */ + 'override_host_status': (_envoy_config_core_v3_HealthStatusSet__Output | null); 'locality_config_specifier': "zone_aware_lb_config"|"locality_weighted_lb_config"; } @@ -152,7 +171,7 @@ export interface _envoy_config_cluster_v3_Cluster_CommonLbConfig__Output { */ export interface _envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig { /** - * If set to `true`, the cluster will use hostname instead of the resolved + * If set to ``true``, the cluster will use hostname instead of the resolved * address as the key to consistently hash to an upstream host. Only valid for StrictDNS clusters with hostnames which resolve to a single IP address. */ 'use_hostname_for_hashing'?: (boolean); @@ -165,7 +184,7 @@ export interface _envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashi * Applies to both Ring Hash and Maglev load balancers. * * This is implemented based on the method described in the paper https://arxiv.org/abs/1608.01350. For the specified - * `hash_balance_factor`, requests to any upstream host are capped at `hash_balance_factor/100` times the average number of requests + * ``hash_balance_factor``, requests to any upstream host are capped at ``hash_balance_factor/100`` times the average number of requests * across the cluster. When a request arrives for an upstream host that is currently serving at its max capacity, linear probing * is used to identify an eligible host. Further, the linear probe is implemented using a random jump in hosts ring/table to identify * the eligible host (this technique is as described in the paper https://arxiv.org/abs/1908.08762 - the random jump avoids the @@ -173,7 +192,7 @@ export interface _envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashi * * If weights are specified on the hosts, they are respected. * - * This is an O(N) algorithm, unlike other load balancers. Using a lower `hash_balance_factor` results in more hosts + * This is an O(N) algorithm, unlike other load balancers. Using a lower ``hash_balance_factor`` results in more hosts * being probed, so use a higher value if you require better performance. */ 'hash_balance_factor'?: (_google_protobuf_UInt32Value | null); @@ -184,7 +203,7 @@ export interface _envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashi */ export interface _envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig__Output { /** - * If set to `true`, the cluster will use hostname instead of the resolved + * If set to ``true``, the cluster will use hostname instead of the resolved * address as the key to consistently hash to an upstream host. Only valid for StrictDNS clusters with hostnames which resolve to a single IP address. */ 'use_hostname_for_hashing': (boolean); @@ -197,7 +216,7 @@ export interface _envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashi * Applies to both Ring Hash and Maglev load balancers. * * This is implemented based on the method described in the paper https://arxiv.org/abs/1608.01350. For the specified - * `hash_balance_factor`, requests to any upstream host are capped at `hash_balance_factor/100` times the average number of requests + * ``hash_balance_factor``, requests to any upstream host are capped at ``hash_balance_factor/100`` times the average number of requests * across the cluster. When a request arrives for an upstream host that is currently serving at its max capacity, linear probing * is used to identify an eligible host. Further, the linear probe is implemented using a random jump in hosts ring/table to identify * the eligible host (this technique is as described in the paper https://arxiv.org/abs/1908.08762 - the random jump avoids the @@ -205,7 +224,7 @@ export interface _envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashi * * If weights are specified on the hosts, they are respected. * - * This is an O(N) algorithm, unlike other load balancers. Using a lower `hash_balance_factor` results in more hosts + * This is an O(N) algorithm, unlike other load balancers. Using a lower ``hash_balance_factor`` results in more hosts * being probed, so use a higher value if you require better performance. */ 'hash_balance_factor': (_google_protobuf_UInt32Value__Output | null); @@ -294,6 +313,10 @@ export enum _envoy_config_cluster_v3_Cluster_DiscoveryType { * If V4_PREFERRED is specified, the DNS resolver will first perform a lookup for addresses in the * IPv4 family and fallback to a lookup for addresses in the IPv6 family. i.e., the callback * target will only get v6 addresses if there were NO v4 addresses to return. + * If ALL is specified, the DNS resolver will perform a lookup for both IPv4 and IPv6 families, + * and return all resolved addresses. When this is used, Happy Eyeballs will be enabled for + * upstream connections. Refer to :ref:`Happy Eyeballs Support ` + * for more information. * For cluster types other than * :ref:`STRICT_DNS` and * :ref:`LOGICAL_DNS`, @@ -306,6 +329,7 @@ export enum _envoy_config_cluster_v3_Cluster_DnsLookupFamily { V4_ONLY = 1, V6_ONLY = 2, V4_PREFERRED = 3, + ALL = 4, } /** @@ -403,9 +427,9 @@ export enum _envoy_config_cluster_v3_Cluster_LbPolicy { /** * Use the new :ref:`load_balancing_policy * ` field to determine the LB policy. - * [#next-major-version: In the v3 API, we should consider deprecating the lb_policy field - * and instead using the new load_balancing_policy field as the one and only mechanism for - * configuring this.] + * This has been deprecated in favor of using the :ref:`load_balancing_policy + * ` field without + * setting any value in :ref:`lb_policy`. */ LOAD_BALANCING_POLICY_CONFIG = 7, } @@ -413,7 +437,7 @@ export enum _envoy_config_cluster_v3_Cluster_LbPolicy { /** * Optionally divide the endpoints in this cluster into subsets defined by * endpoint metadata and selected by route and weighted cluster metadata. - * [#next-free-field: 8] + * [#next-free-field: 9] */ export interface _envoy_config_cluster_v3_Cluster_LbSubsetConfig { /** @@ -427,7 +451,7 @@ export interface _envoy_config_cluster_v3_Cluster_LbSubsetConfig { * fallback_policy is * :ref:`DEFAULT_SUBSET`. * Each field in default_subset is - * compared to the matching LbEndpoint.Metadata under the *envoy.lb* + * compared to the matching LbEndpoint.Metadata under the ``envoy.lb`` * namespace. It is valid for no hosts to match, in which case the behavior * is the same as a fallback_policy of * :ref:`NO_FALLBACK`. @@ -435,7 +459,7 @@ export interface _envoy_config_cluster_v3_Cluster_LbSubsetConfig { 'default_subset'?: (_google_protobuf_Struct | null); /** * For each entry, LbEndpoint.Metadata's - * *envoy.lb* namespace is traversed and a subset is created for each unique + * ``envoy.lb`` namespace is traversed and a subset is created for each unique * combination of key and value. For example: * * .. code-block:: json @@ -485,12 +509,22 @@ export interface _envoy_config_cluster_v3_Cluster_LbSubsetConfig { * and any of the elements in the list matches the criteria. */ 'list_as_any'?: (boolean); + /** + * Fallback mechanism that allows to try different route metadata until a host is found. + * If load balancing process, including all its mechanisms (like + * :ref:`fallback_policy`) + * fails to select a host, this policy decides if and how the process is repeated using another metadata. + * + * The value defaults to + * :ref:`METADATA_NO_FALLBACK`. + */ + 'metadata_fallback_policy'?: (_envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetMetadataFallbackPolicy | keyof typeof _envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetMetadataFallbackPolicy); } /** * Optionally divide the endpoints in this cluster into subsets defined by * endpoint metadata and selected by route and weighted cluster metadata. - * [#next-free-field: 8] + * [#next-free-field: 9] */ export interface _envoy_config_cluster_v3_Cluster_LbSubsetConfig__Output { /** @@ -504,7 +538,7 @@ export interface _envoy_config_cluster_v3_Cluster_LbSubsetConfig__Output { * fallback_policy is * :ref:`DEFAULT_SUBSET`. * Each field in default_subset is - * compared to the matching LbEndpoint.Metadata under the *envoy.lb* + * compared to the matching LbEndpoint.Metadata under the ``envoy.lb`` * namespace. It is valid for no hosts to match, in which case the behavior * is the same as a fallback_policy of * :ref:`NO_FALLBACK`. @@ -512,7 +546,7 @@ export interface _envoy_config_cluster_v3_Cluster_LbSubsetConfig__Output { 'default_subset': (_google_protobuf_Struct__Output | null); /** * For each entry, LbEndpoint.Metadata's - * *envoy.lb* namespace is traversed and a subset is created for each unique + * ``envoy.lb`` namespace is traversed and a subset is created for each unique * combination of key and value. For example: * * .. code-block:: json @@ -562,6 +596,16 @@ export interface _envoy_config_cluster_v3_Cluster_LbSubsetConfig__Output { * and any of the elements in the list matches the criteria. */ 'list_as_any': (boolean); + /** + * Fallback mechanism that allows to try different route metadata until a host is found. + * If load balancing process, including all its mechanisms (like + * :ref:`fallback_policy`) + * fails to select a host, this policy decides if and how the process is repeated using another metadata. + * + * The value defaults to + * :ref:`METADATA_NO_FALLBACK`. + */ + 'metadata_fallback_policy': (keyof typeof _envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetMetadataFallbackPolicy); } // Original file: deps/envoy-api/envoy/config/cluster/v3/cluster.proto @@ -579,6 +623,57 @@ export enum _envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetFallbackPoli DEFAULT_SUBSET = 2, } +// Original file: deps/envoy-api/envoy/config/cluster/v3/cluster.proto + +export enum _envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetMetadataFallbackPolicy { + /** + * No fallback. Route metadata will be used as-is. + */ + METADATA_NO_FALLBACK = 0, + /** + * A special metadata key ``fallback_list`` will be used to provide variants of metadata to try. + * Value of ``fallback_list`` key has to be a list. Every list element has to be a struct - it will + * be merged with route metadata, overriding keys that appear in both places. + * ``fallback_list`` entries will be used in order until a host is found. + * + * ``fallback_list`` key itself is removed from metadata before subset load balancing is performed. + * + * Example: + * + * for metadata: + * + * .. code-block:: yaml + * + * version: 1.0 + * fallback_list: + * - version: 2.0 + * hardware: c64 + * - hardware: c32 + * - version: 3.0 + * + * at first, metadata: + * + * .. code-block:: json + * + * {"version": "2.0", "hardware": "c64"} + * + * will be used for load balancing. If no host is found, metadata: + * + * .. code-block:: json + * + * {"version": "1.0", "hardware": "c32"} + * + * is next to try. If it still results in no host, finally metadata: + * + * .. code-block:: json + * + * {"version": "3.0"} + * + * is used. + */ + FALLBACK_LIST = 1, +} + /** * Specifications for subsets. */ @@ -591,12 +686,9 @@ export interface _envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelecto * Selects a mode of operation in which each subset has only one host. This mode uses the same rules for * choosing a host, but updating hosts is faster, especially for large numbers of hosts. * - * If a match is found to a host, that host will be used regardless of priority levels, unless the host is unhealthy. - * - * Currently, this mode is only supported if `subset_selectors` has only one entry, and `keys` contains - * only one entry. + * If a match is found to a host, that host will be used regardless of priority levels. * - * When this mode is enabled, configurations that contain more than one host with the same metadata value for the single key in `keys` + * When this mode is enabled, configurations that contain more than one host with the same metadata value for the single key in ``keys`` * will use only one of the hosts with the given key; no requests will be routed to the others. The cluster gauge * :ref:`lb_subsets_single_host_per_subset_duplicate` indicates how many duplicates are * present in the current configuration. @@ -616,7 +708,7 @@ export interface _envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelecto * For any other fallback policy the parameter is not used and should not be set. * Only values also present in * :ref:`keys` are allowed, but - * `fallback_keys_subset` cannot be equal to `keys`. + * ``fallback_keys_subset`` cannot be equal to ``keys``. */ 'fallback_keys_subset'?: (string)[]; } @@ -633,12 +725,9 @@ export interface _envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelecto * Selects a mode of operation in which each subset has only one host. This mode uses the same rules for * choosing a host, but updating hosts is faster, especially for large numbers of hosts. * - * If a match is found to a host, that host will be used regardless of priority levels, unless the host is unhealthy. + * If a match is found to a host, that host will be used regardless of priority levels. * - * Currently, this mode is only supported if `subset_selectors` has only one entry, and `keys` contains - * only one entry. - * - * When this mode is enabled, configurations that contain more than one host with the same metadata value for the single key in `keys` + * When this mode is enabled, configurations that contain more than one host with the same metadata value for the single key in ``keys`` * will use only one of the hosts with the given key; no requests will be routed to the others. The cluster gauge * :ref:`lb_subsets_single_host_per_subset_duplicate` indicates how many duplicates are * present in the current configuration. @@ -658,7 +747,7 @@ export interface _envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelecto * For any other fallback policy the parameter is not used and should not be set. * Only values also present in * :ref:`keys` are allowed, but - * `fallback_keys_subset` cannot be equal to `keys`. + * ``fallback_keys_subset`` cannot be equal to ``keys``. */ 'fallback_keys_subset': (string)[]; } @@ -710,18 +799,18 @@ export interface _envoy_config_cluster_v3_Cluster_LeastRequestLbConfig { * The following formula is used to calculate the dynamic weights when hosts have different load * balancing weights: * - * `weight = load_balancing_weight / (active_requests + 1)^active_request_bias` + * ``weight = load_balancing_weight / (active_requests + 1)^active_request_bias`` * * The larger the active request bias is, the more aggressively active requests will lower the * effective weight when all host weights are not equal. * - * `active_request_bias` must be greater than or equal to 0.0. + * ``active_request_bias`` must be greater than or equal to 0.0. * - * When `active_request_bias == 0.0` the Least Request Load Balancer doesn't consider the number + * When ``active_request_bias == 0.0`` the Least Request Load Balancer doesn't consider the number * of active requests at the time it picks a host and behaves like the Round Robin Load * Balancer. * - * When `active_request_bias > 0.0` the Least Request Load Balancer scales the load balancing + * When ``active_request_bias > 0.0`` the Least Request Load Balancer scales the load balancing * weight by the number of active requests at the time it does a pick. * * The value is cached for performance reasons and refreshed whenever one of the Load Balancer's @@ -752,18 +841,18 @@ export interface _envoy_config_cluster_v3_Cluster_LeastRequestLbConfig__Output { * The following formula is used to calculate the dynamic weights when hosts have different load * balancing weights: * - * `weight = load_balancing_weight / (active_requests + 1)^active_request_bias` + * ``weight = load_balancing_weight / (active_requests + 1)^active_request_bias`` * * The larger the active request bias is, the more aggressively active requests will lower the * effective weight when all host weights are not equal. * - * `active_request_bias` must be greater than or equal to 0.0. + * ``active_request_bias`` must be greater than or equal to 0.0. * - * When `active_request_bias == 0.0` the Least Request Load Balancer doesn't consider the number + * When ``active_request_bias == 0.0`` the Least Request Load Balancer doesn't consider the number * of active requests at the time it picks a host and behaves like the Round Robin Load * Balancer. * - * When `active_request_bias > 0.0` the Least Request Load Balancer scales the load balancing + * When ``active_request_bias > 0.0`` the Least Request Load Balancer scales the load balancing * weight by the number of active requests at the time it does a pick. * * The value is cached for performance reasons and refreshed whenever one of the Load Balancer's @@ -801,8 +890,8 @@ export interface _envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeighte */ export interface _envoy_config_cluster_v3_Cluster_MaglevLbConfig { /** - * The table size for Maglev hashing. The Maglev aims for ‘minimal disruption’ rather than an absolute guarantee. - * Minimal disruption means that when the set of upstreams changes, a connection will likely be sent to the same + * The table size for Maglev hashing. Maglev aims for "minimal disruption" rather than an absolute guarantee. + * Minimal disruption means that when the set of upstream hosts change, a connection will likely be sent to the same * upstream as it was before. Increasing the table size reduces the amount of disruption. * The table size must be prime number limited to 5000011. If it is not specified, the default is 65537. */ @@ -815,8 +904,8 @@ export interface _envoy_config_cluster_v3_Cluster_MaglevLbConfig { */ export interface _envoy_config_cluster_v3_Cluster_MaglevLbConfig__Output { /** - * The table size for Maglev hashing. The Maglev aims for ‘minimal disruption’ rather than an absolute guarantee. - * Minimal disruption means that when the set of upstreams changes, a connection will likely be sent to the same + * The table size for Maglev hashing. Maglev aims for "minimal disruption" rather than an absolute guarantee. + * Minimal disruption means that when the set of upstream hosts change, a connection will likely be sent to the same * upstream as it was before. Increasing the table size reduces the amount of disruption. * The table size must be prime number limited to 5000011. If it is not specified, the default is 65537. */ @@ -827,12 +916,12 @@ export interface _envoy_config_cluster_v3_Cluster_MaglevLbConfig__Output { * Specific configuration for the * :ref:`Original Destination ` * load balancing policy. + * [#extension: envoy.clusters.original_dst] */ export interface _envoy_config_cluster_v3_Cluster_OriginalDstLbConfig { /** - * When true, :ref:`x-envoy-original-dst-host - * ` can be used to override destination - * address. + * When true, a HTTP header can be used to override the original dst address. The default header is + * :ref:`x-envoy-original-dst-host `. * * .. attention:: * @@ -845,18 +934,28 @@ export interface _envoy_config_cluster_v3_Cluster_OriginalDstLbConfig { * If the header appears multiple times only the first value is used. */ 'use_http_header'?: (boolean); + /** + * The http header to override destination address if :ref:`use_http_header `. + * is set to true. If the value is empty, :ref:`x-envoy-original-dst-host ` will be used. + */ + 'http_header_name'?: (string); + /** + * The port to override for the original dst address. This port + * will take precedence over filter state and header override ports + */ + 'upstream_port_override'?: (_google_protobuf_UInt32Value | null); } /** * Specific configuration for the * :ref:`Original Destination ` * load balancing policy. + * [#extension: envoy.clusters.original_dst] */ export interface _envoy_config_cluster_v3_Cluster_OriginalDstLbConfig__Output { /** - * When true, :ref:`x-envoy-original-dst-host - * ` can be used to override destination - * address. + * When true, a HTTP header can be used to override the original dst address. The default header is + * :ref:`x-envoy-original-dst-host `. * * .. attention:: * @@ -869,6 +968,16 @@ export interface _envoy_config_cluster_v3_Cluster_OriginalDstLbConfig__Output { * If the header appears multiple times only the first value is used. */ 'use_http_header': (boolean); + /** + * The http header to override destination address if :ref:`use_http_header `. + * is set to true. If the value is empty, :ref:`x-envoy-original-dst-host ` will be used. + */ + 'http_header_name': (string); + /** + * The port to override for the original dst address. This port + * will take precedence over filter state and header override ports + */ + 'upstream_port_override': (_google_protobuf_UInt32Value__Output | null); } export interface _envoy_config_cluster_v3_Cluster_PreconnectPolicy { @@ -900,10 +1009,10 @@ export interface _envoy_config_cluster_v3_Cluster_PreconnectPolicy { */ 'per_upstream_preconnect_ratio'?: (_google_protobuf_DoubleValue | null); /** - * Indicates how many many streams (rounded up) can be anticipated across a cluster for each + * Indicates how many streams (rounded up) can be anticipated across a cluster for each * stream, useful for low QPS services. This is currently supported for a subset of * deterministic non-hash-based load-balancing algorithms (weighted round robin, random). - * Unlike *per_upstream_preconnect_ratio* this preconnects across the upstream instances in a + * Unlike ``per_upstream_preconnect_ratio`` this preconnects across the upstream instances in a * cluster, doing best effort predictions of what upstream would be picked next and * pre-establishing a connection. * @@ -955,10 +1064,10 @@ export interface _envoy_config_cluster_v3_Cluster_PreconnectPolicy__Output { */ 'per_upstream_preconnect_ratio': (_google_protobuf_DoubleValue__Output | null); /** - * Indicates how many many streams (rounded up) can be anticipated across a cluster for each + * Indicates how many streams (rounded up) can be anticipated across a cluster for each * stream, useful for low QPS services. This is currently supported for a subset of * deterministic non-hash-based load-balancing algorithms (weighted round robin, random). - * Unlike *per_upstream_preconnect_ratio* this preconnects across the upstream instances in a + * Unlike ``per_upstream_preconnect_ratio`` this preconnects across the upstream instances in a * cluster, doing best effort predictions of what upstream would be picked next and * pre-establishing a connection. * @@ -1103,13 +1212,19 @@ export interface _envoy_config_cluster_v3_Cluster_SlowStartConfig { * By tuning the parameter, is possible to achieve polynomial or exponential shape of ramp-up curve. * * During slow start window, effective weight of an endpoint would be scaled with time factor and aggression: - * `new_weight = weight * time_factor ^ (1 / aggression)`, - * where `time_factor=(time_since_start_seconds / slow_start_time_seconds)`. + * ``new_weight = weight * max(min_weight_percent, time_factor ^ (1 / aggression))``, + * where ``time_factor=(time_since_start_seconds / slow_start_time_seconds)``. * * As time progresses, more and more traffic would be sent to endpoint, which is in slow start window. * Once host exits slow start, time_factor and aggression no longer affect its weight. */ 'aggression'?: (_envoy_config_core_v3_RuntimeDouble | null); + /** + * Configures the minimum percentage of origin weight that avoids too small new weight, + * which may cause endpoints in slow start mode receive no traffic in slow start window. + * If not specified, the default is 10%. + */ + 'min_weight_percent'?: (_envoy_type_v3_Percent | null); } /** @@ -1130,13 +1245,19 @@ export interface _envoy_config_cluster_v3_Cluster_SlowStartConfig__Output { * By tuning the parameter, is possible to achieve polynomial or exponential shape of ramp-up curve. * * During slow start window, effective weight of an endpoint would be scaled with time factor and aggression: - * `new_weight = weight * time_factor ^ (1 / aggression)`, - * where `time_factor=(time_since_start_seconds / slow_start_time_seconds)`. + * ``new_weight = weight * max(min_weight_percent, time_factor ^ (1 / aggression))``, + * where ``time_factor=(time_since_start_seconds / slow_start_time_seconds)``. * * As time progresses, more and more traffic would be sent to endpoint, which is in slow start window. * Once host exits slow start, time_factor and aggression no longer affect its weight. */ 'aggression': (_envoy_config_core_v3_RuntimeDouble__Output | null); + /** + * Configures the minimum percentage of origin weight that avoids too small new weight, + * which may cause endpoints in slow start mode receive no traffic in slow start window. + * If not specified, the default is 10%. + */ + 'min_weight_percent': (_envoy_type_v3_Percent__Output | null); } /** @@ -1152,7 +1273,7 @@ export interface _envoy_config_cluster_v3_Cluster_TransportSocketMatch { * Optional endpoint metadata match criteria. * The connection to the endpoint with metadata matching what is set in this field * will use the transport socket configuration specified here. - * The endpoint's metadata entry in *envoy.transport_socket_match* is used to match + * The endpoint's metadata entry in ``envoy.transport_socket_match`` is used to match * against the values specified in this field. */ 'match'?: (_google_protobuf_Struct | null); @@ -1176,7 +1297,7 @@ export interface _envoy_config_cluster_v3_Cluster_TransportSocketMatch__Output { * Optional endpoint metadata match criteria. * The connection to the endpoint with metadata matching what is set in this field * will use the transport socket configuration specified here. - * The endpoint's metadata entry in *envoy.transport_socket_match* is used to match + * The endpoint's metadata entry in ``envoy.transport_socket_match`` is used to match * against the values specified in this field. */ 'match': (_google_protobuf_Struct__Output | null); @@ -1319,7 +1440,7 @@ export interface Cluster { * set so that Envoy will assume that the upstream supports HTTP/2 when * making new HTTP connection pool connections. Currently, Envoy only * supports prior knowledge for upstream connections. Even if TLS is used - * with ALPN, `http2_protocol_options` must be specified. As an aside this allows HTTP/2 + * with ALPN, ``http2_protocol_options`` must be specified. As an aside this allows HTTP/2 * connections to happen over plain text. * This has been deprecated in favor of http2_protocol_options fields in the * :ref:`http_protocol_options ` @@ -1359,10 +1480,7 @@ export interface Cluster { * :ref:`STRICT_DNS` * and :ref:`LOGICAL_DNS` * this setting is ignored. - * Setting this value causes failure if the - * ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - * server startup. Apple's API only allows overriding DNS resolvers via system settings. - * This field is deprecated in favor of *dns_resolution_config* + * This field is deprecated in favor of ``dns_resolution_config`` * which aggregates all of the DNS resolver configuration in a single message. */ 'dns_resolvers'?: (_envoy_config_core_v3_Address)[]; @@ -1404,8 +1522,8 @@ export interface Cluster { 'ring_hash_lb_config'?: (_envoy_config_cluster_v3_Cluster_RingHashLbConfig | null); /** * Optional custom transport socket implementation to use for upstream connections. - * To setup TLS, set a transport socket with name `envoy.transport_sockets.tls` and - * :ref:`UpstreamTlsContexts ` in the `typed_config`. + * To setup TLS, set a transport socket with name ``envoy.transport_sockets.tls`` and + * :ref:`UpstreamTlsContexts ` in the ``typed_config``. * If no transport socket configuration is specified, new connections * will be set up with plaintext. */ @@ -1415,7 +1533,7 @@ export interface Cluster { * cluster. It can be used for stats, logging, and varying filter behavior. * Fields should use reverse DNS notation to denote which entity within Envoy * will need the information. For instance, if the metadata is intended for - * the Router filter, the filter name should be specified as *envoy.filters.http.router*. + * the Router filter, the filter name should be specified as ``envoy.filters.http.router``. */ 'metadata'?: (_envoy_config_core_v3_Metadata | null); /** @@ -1436,11 +1554,9 @@ export interface Cluster { * emitting stats for the cluster and access logging the cluster name. This will appear as * additional information in configuration dumps of a cluster's current status as * :ref:`observability_name ` - * and as an additional tag "upstream_cluster.name" while tracing. Note: access logging using - * this field is presently enabled with runtime feature - * `envoy.reloadable_features.use_observable_cluster_name`. Any ``:`` in the name will be - * converted to ``_`` when emitting statistics. This should not be confused with :ref:`Router - * Filter Header `. + * and as an additional tag "upstream_cluster.name" while tracing. Note: Any ``:`` in the name + * will be converted to ``_`` when emitting statistics. This should not be confused with + * :ref:`Router Filter Header `. */ 'alt_stat_name'?: (string); /** @@ -1487,7 +1603,7 @@ export interface Cluster { * :ref:`STATIC`, * :ref:`STRICT_DNS` * or :ref:`LOGICAL_DNS` clusters. - * This field supersedes the *hosts* field in the v2 API. + * This field supersedes the ``hosts`` field in the v2 API. * * .. attention:: * @@ -1528,9 +1644,8 @@ export interface Cluster { */ 'filters'?: (_envoy_config_cluster_v3_Filter)[]; /** - * New mechanism for LB policy configuration. Used only if the - * :ref:`lb_policy` field has the value - * :ref:`LOAD_BALANCING_POLICY_CONFIG`. + * If this field is set and is supported by the client, it will supersede the value of + * :ref:`lb_policy`. */ 'load_balancing_policy'?: (_envoy_config_cluster_v3_LoadBalancingPolicy | null); /** @@ -1552,7 +1667,7 @@ export interface Cluster { 'lrs_server'?: (_envoy_config_core_v3_ConfigSource | null); /** * Configuration to use different transport sockets for different endpoints. - * The entry of *envoy.transport_socket_match* in the + * The entry of ``envoy.transport_socket_match`` in the * :ref:`LbEndpoint.Metadata ` * is used to match against the transport sockets as they appear in the list. The first * :ref:`match ` is used. @@ -1572,16 +1687,16 @@ export interface Cluster { * transport_socket: * name: envoy.transport_sockets.raw_buffer * - * Connections to the endpoints whose metadata value under *envoy.transport_socket_match* + * Connections to the endpoints whose metadata value under ``envoy.transport_socket_match`` * having "acceptMTLS"/"true" key/value pair use the "enableMTLS" socket configuration. * * If a :ref:`socket match ` with empty match * criteria is provided, that always match any endpoint. For example, the "defaultToPlaintext" * socket match in case above. * - * If an endpoint metadata's value under *envoy.transport_socket_match* does not match any - * *TransportSocketMatch*, socket configuration fallbacks to use the *tls_context* or - * *transport_socket* specified in this cluster. + * If an endpoint metadata's value under ``envoy.transport_socket_match`` does not match any + * ``TransportSocketMatch``, socket configuration fallbacks to use the ``tls_context`` or + * ``transport_socket`` specified in this cluster. * * This field allows gradual and flexible transport socket configuration changes. * @@ -1592,8 +1707,8 @@ export interface Cluster { * * Then the xDS server can configure the CDS to a client, Envoy A, to send mutual TLS * traffic for endpoints with "acceptMTLS": "true", by adding a corresponding - * *TransportSocketMatch* in this field. Other client Envoys receive CDS without - * *transport_socket_match* set, and still send plain text traffic to the same cluster. + * ``TransportSocketMatch`` in this field. Other client Envoys receive CDS without + * ``transport_socket_match`` set, and still send plain text traffic to the same cluster. * * This field can be used to specify custom transport socket configurations for health * checks by adding matching key/value pairs in a health check's @@ -1615,10 +1730,7 @@ export interface Cluster { 'dns_failure_refresh_rate'?: (_envoy_config_cluster_v3_Cluster_RefreshRate | null); /** * Always use TCP queries instead of UDP queries for DNS lookups. - * Setting this value causes failure if the - * ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - * server startup. Apple' API only uses UDP for DNS resolution. - * This field is deprecated in favor of *dns_resolution_config* + * This field is deprecated in favor of ``dns_resolution_config`` * which aggregates all of the DNS resolver configuration in a single message. */ 'use_tcp_for_dns_lookups'?: (boolean); @@ -1644,7 +1756,7 @@ export interface Cluster { * * .. attention:: * - * This field has been deprecated in favor of `timeout_budgets`, part of + * This field has been deprecated in favor of ``timeout_budgets``, part of * :ref:`track_cluster_stats `. */ 'track_timeout_budgets'?: (boolean); @@ -1655,7 +1767,7 @@ export interface Cluster { * TCP upstreams. * * For HTTP traffic, Envoy will generally take downstream HTTP and send it upstream as upstream - * HTTP, using the http connection pool and the codec from `http2_protocol_options` + * HTTP, using the http connection pool and the codec from ``http2_protocol_options`` * * For routes where CONNECT termination is configured, Envoy will take downstream CONNECT * requests and forward the CONNECT payload upstream over raw TCP using the tcp connection pool. @@ -1678,7 +1790,7 @@ export interface Cluster { */ 'preconnect_policy'?: (_envoy_config_cluster_v3_Cluster_PreconnectPolicy | null); /** - * If `connection_pool_per_downstream_connection` is true, the cluster will use a separate + * If ``connection_pool_per_downstream_connection`` is true, the cluster will use a separate * connection pool for every downstream connection */ 'connection_pool_per_downstream_connection'?: (boolean); @@ -1688,15 +1800,15 @@ export interface Cluster { 'maglev_lb_config'?: (_envoy_config_cluster_v3_Cluster_MaglevLbConfig | null); /** * DNS resolution configuration which includes the underlying dns resolver addresses and options. - * *dns_resolution_config* will be deprecated once - * :ref:'typed_dns_resolver_config ' - * is fully supported. + * This field is deprecated in favor of + * :ref:`typed_dns_resolver_config `. */ 'dns_resolution_config'?: (_envoy_config_core_v3_DnsResolutionConfig | null); /** * Optional configuration for having cluster readiness block on warm-up. Currently, only applicable for * :ref:`STRICT_DNS`, - * or :ref:`LOGICAL_DNS`. + * or :ref:`LOGICAL_DNS`, + * or :ref:`Redis Cluster`. * If true, cluster readiness blocks on warm-up. If false, the cluster will complete * initialization whether or not warm-up has completed. Defaults to true. */ @@ -1704,16 +1816,15 @@ export interface Cluster { /** * DNS resolver type configuration extension. This extension can be used to configure c-ares, apple, * or any other DNS resolver types and the related parameters. - * For example, an object of :ref:`DnsResolutionConfig ` - * can be packed into this *typed_dns_resolver_config*. This configuration will replace the - * :ref:'dns_resolution_config ' - * configuration eventually. - * TODO(yanjunxiang): Investigate the deprecation plan for *dns_resolution_config*. - * During the transition period when both *dns_resolution_config* and *typed_dns_resolver_config* exists, - * this configuration is optional. - * When *typed_dns_resolver_config* is in place, Envoy will use it and ignore *dns_resolution_config*. - * When *typed_dns_resolver_config* is missing, the default behavior is in place. - * [#not-implemented-hide:] + * For example, an object of + * :ref:`CaresDnsResolverConfig ` + * can be packed into this ``typed_dns_resolver_config``. This configuration replaces the + * :ref:`dns_resolution_config ` + * configuration. + * During the transition period when both ``dns_resolution_config`` and ``typed_dns_resolver_config`` exists, + * when ``typed_dns_resolver_config`` is in place, Envoy will use it and ignore ``dns_resolution_config``. + * When ``typed_dns_resolver_config`` is missing, the default behavior is in place. + * [#extension-category: envoy.network.dns_resolver] */ 'typed_dns_resolver_config'?: (_envoy_config_core_v3_TypedExtensionConfig | null); /** @@ -1808,7 +1919,7 @@ export interface Cluster__Output { * set so that Envoy will assume that the upstream supports HTTP/2 when * making new HTTP connection pool connections. Currently, Envoy only * supports prior knowledge for upstream connections. Even if TLS is used - * with ALPN, `http2_protocol_options` must be specified. As an aside this allows HTTP/2 + * with ALPN, ``http2_protocol_options`` must be specified. As an aside this allows HTTP/2 * connections to happen over plain text. * This has been deprecated in favor of http2_protocol_options fields in the * :ref:`http_protocol_options ` @@ -1848,10 +1959,7 @@ export interface Cluster__Output { * :ref:`STRICT_DNS` * and :ref:`LOGICAL_DNS` * this setting is ignored. - * Setting this value causes failure if the - * ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - * server startup. Apple's API only allows overriding DNS resolvers via system settings. - * This field is deprecated in favor of *dns_resolution_config* + * This field is deprecated in favor of ``dns_resolution_config`` * which aggregates all of the DNS resolver configuration in a single message. */ 'dns_resolvers': (_envoy_config_core_v3_Address__Output)[]; @@ -1893,8 +2001,8 @@ export interface Cluster__Output { 'ring_hash_lb_config'?: (_envoy_config_cluster_v3_Cluster_RingHashLbConfig__Output | null); /** * Optional custom transport socket implementation to use for upstream connections. - * To setup TLS, set a transport socket with name `envoy.transport_sockets.tls` and - * :ref:`UpstreamTlsContexts ` in the `typed_config`. + * To setup TLS, set a transport socket with name ``envoy.transport_sockets.tls`` and + * :ref:`UpstreamTlsContexts ` in the ``typed_config``. * If no transport socket configuration is specified, new connections * will be set up with plaintext. */ @@ -1904,7 +2012,7 @@ export interface Cluster__Output { * cluster. It can be used for stats, logging, and varying filter behavior. * Fields should use reverse DNS notation to denote which entity within Envoy * will need the information. For instance, if the metadata is intended for - * the Router filter, the filter name should be specified as *envoy.filters.http.router*. + * the Router filter, the filter name should be specified as ``envoy.filters.http.router``. */ 'metadata': (_envoy_config_core_v3_Metadata__Output | null); /** @@ -1925,11 +2033,9 @@ export interface Cluster__Output { * emitting stats for the cluster and access logging the cluster name. This will appear as * additional information in configuration dumps of a cluster's current status as * :ref:`observability_name ` - * and as an additional tag "upstream_cluster.name" while tracing. Note: access logging using - * this field is presently enabled with runtime feature - * `envoy.reloadable_features.use_observable_cluster_name`. Any ``:`` in the name will be - * converted to ``_`` when emitting statistics. This should not be confused with :ref:`Router - * Filter Header `. + * and as an additional tag "upstream_cluster.name" while tracing. Note: Any ``:`` in the name + * will be converted to ``_`` when emitting statistics. This should not be confused with + * :ref:`Router Filter Header `. */ 'alt_stat_name': (string); /** @@ -1976,7 +2082,7 @@ export interface Cluster__Output { * :ref:`STATIC`, * :ref:`STRICT_DNS` * or :ref:`LOGICAL_DNS` clusters. - * This field supersedes the *hosts* field in the v2 API. + * This field supersedes the ``hosts`` field in the v2 API. * * .. attention:: * @@ -2017,9 +2123,8 @@ export interface Cluster__Output { */ 'filters': (_envoy_config_cluster_v3_Filter__Output)[]; /** - * New mechanism for LB policy configuration. Used only if the - * :ref:`lb_policy` field has the value - * :ref:`LOAD_BALANCING_POLICY_CONFIG`. + * If this field is set and is supported by the client, it will supersede the value of + * :ref:`lb_policy`. */ 'load_balancing_policy': (_envoy_config_cluster_v3_LoadBalancingPolicy__Output | null); /** @@ -2041,7 +2146,7 @@ export interface Cluster__Output { 'lrs_server': (_envoy_config_core_v3_ConfigSource__Output | null); /** * Configuration to use different transport sockets for different endpoints. - * The entry of *envoy.transport_socket_match* in the + * The entry of ``envoy.transport_socket_match`` in the * :ref:`LbEndpoint.Metadata ` * is used to match against the transport sockets as they appear in the list. The first * :ref:`match ` is used. @@ -2061,16 +2166,16 @@ export interface Cluster__Output { * transport_socket: * name: envoy.transport_sockets.raw_buffer * - * Connections to the endpoints whose metadata value under *envoy.transport_socket_match* + * Connections to the endpoints whose metadata value under ``envoy.transport_socket_match`` * having "acceptMTLS"/"true" key/value pair use the "enableMTLS" socket configuration. * * If a :ref:`socket match ` with empty match * criteria is provided, that always match any endpoint. For example, the "defaultToPlaintext" * socket match in case above. * - * If an endpoint metadata's value under *envoy.transport_socket_match* does not match any - * *TransportSocketMatch*, socket configuration fallbacks to use the *tls_context* or - * *transport_socket* specified in this cluster. + * If an endpoint metadata's value under ``envoy.transport_socket_match`` does not match any + * ``TransportSocketMatch``, socket configuration fallbacks to use the ``tls_context`` or + * ``transport_socket`` specified in this cluster. * * This field allows gradual and flexible transport socket configuration changes. * @@ -2081,8 +2186,8 @@ export interface Cluster__Output { * * Then the xDS server can configure the CDS to a client, Envoy A, to send mutual TLS * traffic for endpoints with "acceptMTLS": "true", by adding a corresponding - * *TransportSocketMatch* in this field. Other client Envoys receive CDS without - * *transport_socket_match* set, and still send plain text traffic to the same cluster. + * ``TransportSocketMatch`` in this field. Other client Envoys receive CDS without + * ``transport_socket_match`` set, and still send plain text traffic to the same cluster. * * This field can be used to specify custom transport socket configurations for health * checks by adding matching key/value pairs in a health check's @@ -2104,10 +2209,7 @@ export interface Cluster__Output { 'dns_failure_refresh_rate': (_envoy_config_cluster_v3_Cluster_RefreshRate__Output | null); /** * Always use TCP queries instead of UDP queries for DNS lookups. - * Setting this value causes failure if the - * ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - * server startup. Apple' API only uses UDP for DNS resolution. - * This field is deprecated in favor of *dns_resolution_config* + * This field is deprecated in favor of ``dns_resolution_config`` * which aggregates all of the DNS resolver configuration in a single message. */ 'use_tcp_for_dns_lookups': (boolean); @@ -2133,7 +2235,7 @@ export interface Cluster__Output { * * .. attention:: * - * This field has been deprecated in favor of `timeout_budgets`, part of + * This field has been deprecated in favor of ``timeout_budgets``, part of * :ref:`track_cluster_stats `. */ 'track_timeout_budgets': (boolean); @@ -2144,7 +2246,7 @@ export interface Cluster__Output { * TCP upstreams. * * For HTTP traffic, Envoy will generally take downstream HTTP and send it upstream as upstream - * HTTP, using the http connection pool and the codec from `http2_protocol_options` + * HTTP, using the http connection pool and the codec from ``http2_protocol_options`` * * For routes where CONNECT termination is configured, Envoy will take downstream CONNECT * requests and forward the CONNECT payload upstream over raw TCP using the tcp connection pool. @@ -2167,7 +2269,7 @@ export interface Cluster__Output { */ 'preconnect_policy': (_envoy_config_cluster_v3_Cluster_PreconnectPolicy__Output | null); /** - * If `connection_pool_per_downstream_connection` is true, the cluster will use a separate + * If ``connection_pool_per_downstream_connection`` is true, the cluster will use a separate * connection pool for every downstream connection */ 'connection_pool_per_downstream_connection': (boolean); @@ -2177,15 +2279,15 @@ export interface Cluster__Output { 'maglev_lb_config'?: (_envoy_config_cluster_v3_Cluster_MaglevLbConfig__Output | null); /** * DNS resolution configuration which includes the underlying dns resolver addresses and options. - * *dns_resolution_config* will be deprecated once - * :ref:'typed_dns_resolver_config ' - * is fully supported. + * This field is deprecated in favor of + * :ref:`typed_dns_resolver_config `. */ 'dns_resolution_config': (_envoy_config_core_v3_DnsResolutionConfig__Output | null); /** * Optional configuration for having cluster readiness block on warm-up. Currently, only applicable for * :ref:`STRICT_DNS`, - * or :ref:`LOGICAL_DNS`. + * or :ref:`LOGICAL_DNS`, + * or :ref:`Redis Cluster`. * If true, cluster readiness blocks on warm-up. If false, the cluster will complete * initialization whether or not warm-up has completed. Defaults to true. */ @@ -2193,16 +2295,15 @@ export interface Cluster__Output { /** * DNS resolver type configuration extension. This extension can be used to configure c-ares, apple, * or any other DNS resolver types and the related parameters. - * For example, an object of :ref:`DnsResolutionConfig ` - * can be packed into this *typed_dns_resolver_config*. This configuration will replace the - * :ref:'dns_resolution_config ' - * configuration eventually. - * TODO(yanjunxiang): Investigate the deprecation plan for *dns_resolution_config*. - * During the transition period when both *dns_resolution_config* and *typed_dns_resolver_config* exists, - * this configuration is optional. - * When *typed_dns_resolver_config* is in place, Envoy will use it and ignore *dns_resolution_config*. - * When *typed_dns_resolver_config* is missing, the default behavior is in place. - * [#not-implemented-hide:] + * For example, an object of + * :ref:`CaresDnsResolverConfig ` + * can be packed into this ``typed_dns_resolver_config``. This configuration replaces the + * :ref:`dns_resolution_config ` + * configuration. + * During the transition period when both ``dns_resolution_config`` and ``typed_dns_resolver_config`` exists, + * when ``typed_dns_resolver_config`` is in place, Envoy will use it and ignore ``dns_resolution_config``. + * When ``typed_dns_resolver_config`` is missing, the default behavior is in place. + * [#extension-category: envoy.network.dns_resolver] */ 'typed_dns_resolver_config': (_envoy_config_core_v3_TypedExtensionConfig__Output | null); /** diff --git a/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/ClusterCollection.ts b/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/ClusterCollection.ts index 8b1394d4b..a028c8491 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/ClusterCollection.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/ClusterCollection.ts @@ -3,7 +3,7 @@ import type { CollectionEntry as _xds_core_v3_CollectionEntry, CollectionEntry__Output as _xds_core_v3_CollectionEntry__Output } from '../../../../xds/core/v3/CollectionEntry'; /** - * Cluster list collections. Entries are *Cluster* resources or references. + * Cluster list collections. Entries are ``Cluster`` resources or references. * [#not-implemented-hide:] */ export interface ClusterCollection { @@ -11,7 +11,7 @@ export interface ClusterCollection { } /** - * Cluster list collections. Entries are *Cluster* resources or references. + * Cluster list collections. Entries are ``Cluster`` resources or references. * [#not-implemented-hide:] */ export interface ClusterCollection__Output { diff --git a/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/Filter.ts b/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/Filter.ts index 9d9031b68..cdcfeae89 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/Filter.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/Filter.ts @@ -4,28 +4,28 @@ import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__ export interface Filter { /** - * The name of the filter to instantiate. The name must match a - * supported upstream filter. Note that Envoy's :ref:`downstream network - * filters ` are not valid upstream filters. + * The name of the filter configuration. */ 'name'?: (string); /** * Filter specific configuration which depends on the filter being * instantiated. See the supported filters for further documentation. + * Note that Envoy's :ref:`downstream network + * filters ` are not valid upstream filters. */ 'typed_config'?: (_google_protobuf_Any | null); } export interface Filter__Output { /** - * The name of the filter to instantiate. The name must match a - * supported upstream filter. Note that Envoy's :ref:`downstream network - * filters ` are not valid upstream filters. + * The name of the filter configuration. */ 'name': (string); /** * Filter specific configuration which depends on the filter being * instantiated. See the supported filters for further documentation. + * Note that Envoy's :ref:`downstream network + * filters ` are not valid upstream filters. */ 'typed_config': (_google_protobuf_Any__Output | null); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/LoadBalancingPolicy.ts b/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/LoadBalancingPolicy.ts index 78d4a6bfd..4e4efbe94 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/LoadBalancingPolicy.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/LoadBalancingPolicy.ts @@ -3,10 +3,16 @@ import type { TypedExtensionConfig as _envoy_config_core_v3_TypedExtensionConfig, TypedExtensionConfig__Output as _envoy_config_core_v3_TypedExtensionConfig__Output } from '../../../../envoy/config/core/v3/TypedExtensionConfig'; export interface _envoy_config_cluster_v3_LoadBalancingPolicy_Policy { + /** + * [#extension-category: envoy.load_balancing_policies] + */ 'typed_extension_config'?: (_envoy_config_core_v3_TypedExtensionConfig | null); } export interface _envoy_config_cluster_v3_LoadBalancingPolicy_Policy__Output { + /** + * [#extension-category: envoy.load_balancing_policies] + */ 'typed_extension_config': (_envoy_config_core_v3_TypedExtensionConfig__Output | null); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/OutlierDetection.ts b/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/OutlierDetection.ts index 789004ad4..47dfc1877 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/OutlierDetection.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/OutlierDetection.ts @@ -6,13 +6,13 @@ import type { Duration as _google_protobuf_Duration, Duration__Output as _google /** * See the :ref:`architecture overview ` for * more information on outlier detection. - * [#next-free-field: 22] + * [#next-free-field: 23] */ export interface OutlierDetection { /** - * The number of consecutive 5xx responses or local origin errors that are mapped - * to 5xx error codes before a consecutive 5xx ejection - * occurs. Defaults to 5. + * The number of consecutive server-side error responses (for HTTP traffic, + * 5xx responses; for TCP traffic, connection failures; for Redis, failure to + * respond PONG; etc.) before a consecutive 5xx ejection occurs. Defaults to 5. */ 'consecutive_5xx'?: (_google_protobuf_UInt32Value | null); /** @@ -156,18 +156,25 @@ export interface OutlierDetection { * :ref:`base_ejection_time` value is applied, whatever is larger. */ 'max_ejection_time'?: (_google_protobuf_Duration | null); + /** + * The maximum amount of jitter to add to the ejection time, in order to prevent + * a 'thundering herd' effect where all proxies try to reconnect to host at the same time. + * See :ref:`max_ejection_time_jitter` + * Defaults to 0s. + */ + 'max_ejection_time_jitter'?: (_google_protobuf_Duration | null); } /** * See the :ref:`architecture overview ` for * more information on outlier detection. - * [#next-free-field: 22] + * [#next-free-field: 23] */ export interface OutlierDetection__Output { /** - * The number of consecutive 5xx responses or local origin errors that are mapped - * to 5xx error codes before a consecutive 5xx ejection - * occurs. Defaults to 5. + * The number of consecutive server-side error responses (for HTTP traffic, + * 5xx responses; for TCP traffic, connection failures; for Redis, failure to + * respond PONG; etc.) before a consecutive 5xx ejection occurs. Defaults to 5. */ 'consecutive_5xx': (_google_protobuf_UInt32Value__Output | null); /** @@ -311,4 +318,11 @@ export interface OutlierDetection__Output { * :ref:`base_ejection_time` value is applied, whatever is larger. */ 'max_ejection_time': (_google_protobuf_Duration__Output | null); + /** + * The maximum amount of jitter to add to the ejection time, in order to prevent + * a 'thundering herd' effect where all proxies try to reconnect to host at the same time. + * See :ref:`max_ejection_time_jitter` + * Defaults to 0s. + */ + 'max_ejection_time_jitter': (_google_protobuf_Duration__Output | null); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/UpstreamConnectionOptions.ts b/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/UpstreamConnectionOptions.ts index 483d1072d..cda367641 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/UpstreamConnectionOptions.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/cluster/v3/UpstreamConnectionOptions.ts @@ -7,6 +7,12 @@ export interface UpstreamConnectionOptions { * If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. */ 'tcp_keepalive'?: (_envoy_config_core_v3_TcpKeepalive | null); + /** + * If enabled, associates the interface name of the local address with the upstream connection. + * This can be used by extensions during processing of requests. The association mechanism is + * implementation specific. Defaults to false due to performance concerns. + */ + 'set_local_interface_name_on_upstream_connections'?: (boolean); } export interface UpstreamConnectionOptions__Output { @@ -14,4 +20,10 @@ export interface UpstreamConnectionOptions__Output { * If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives. */ 'tcp_keepalive': (_envoy_config_core_v3_TcpKeepalive__Output | null); + /** + * If enabled, associates the interface name of the local address with the upstream connection. + * This can be used by extensions during processing of requests. The association mechanism is + * implementation specific. Defaults to false due to performance concerns. + */ + 'set_local_interface_name_on_upstream_connections': (boolean); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Address.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Address.ts index 32c483344..5e29cdbf4 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Address.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Address.ts @@ -13,7 +13,8 @@ export interface Address { 'socket_address'?: (_envoy_config_core_v3_SocketAddress | null); 'pipe'?: (_envoy_config_core_v3_Pipe | null); /** - * [#not-implemented-hide:] + * Specifies a user-space address handled by :ref:`internal listeners + * `. */ 'envoy_internal_address'?: (_envoy_config_core_v3_EnvoyInternalAddress | null); 'address'?: "socket_address"|"pipe"|"envoy_internal_address"; @@ -28,7 +29,8 @@ export interface Address__Output { 'socket_address'?: (_envoy_config_core_v3_SocketAddress__Output | null); 'pipe'?: (_envoy_config_core_v3_Pipe__Output | null); /** - * [#not-implemented-hide:] + * Specifies a user-space address handled by :ref:`internal listeners + * `. */ 'envoy_internal_address'?: (_envoy_config_core_v3_EnvoyInternalAddress__Output | null); 'address': "socket_address"|"pipe"|"envoy_internal_address"; diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/AlternateProtocolsCacheOptions.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/AlternateProtocolsCacheOptions.ts index 6fb167174..ed3027a0c 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/AlternateProtocolsCacheOptions.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/AlternateProtocolsCacheOptions.ts @@ -3,11 +3,56 @@ import type { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; import type { TypedExtensionConfig as _envoy_config_core_v3_TypedExtensionConfig, TypedExtensionConfig__Output as _envoy_config_core_v3_TypedExtensionConfig__Output } from '../../../../envoy/config/core/v3/TypedExtensionConfig'; +/** + * Allows pre-populating the cache with HTTP/3 alternate protocols entries with a 7 day lifetime. + * This will cause Envoy to attempt HTTP/3 to those upstreams, even if the upstreams have not + * advertised HTTP/3 support. These entries will be overwritten by alt-svc + * response headers or cached values. + * As with regular cached entries, if the origin response would result in clearing an existing + * alternate protocol cache entry, pre-populated entries will also be cleared. + * Adding a cache entry with hostname=foo.com port=123 is the equivalent of getting + * response headers + * alt-svc: h3=:"123"; ma=86400" in a response to a request to foo.com:123 + */ +export interface _envoy_config_core_v3_AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry { + /** + * The host name for the alternate protocol entry. + */ + 'hostname'?: (string); + /** + * The port for the alternate protocol entry. + */ + 'port'?: (number); +} + +/** + * Allows pre-populating the cache with HTTP/3 alternate protocols entries with a 7 day lifetime. + * This will cause Envoy to attempt HTTP/3 to those upstreams, even if the upstreams have not + * advertised HTTP/3 support. These entries will be overwritten by alt-svc + * response headers or cached values. + * As with regular cached entries, if the origin response would result in clearing an existing + * alternate protocol cache entry, pre-populated entries will also be cleared. + * Adding a cache entry with hostname=foo.com port=123 is the equivalent of getting + * response headers + * alt-svc: h3=:"123"; ma=86400" in a response to a request to foo.com:123 + */ +export interface _envoy_config_core_v3_AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry__Output { + /** + * The host name for the alternate protocol entry. + */ + 'hostname': (string); + /** + * The port for the alternate protocol entry. + */ + 'port': (number); +} + /** * Configures the alternate protocols cache which tracks alternate protocols that can be used to * make an HTTP connection to an origin server. See https://tools.ietf.org/html/rfc7838 for * HTTP Alternative Services and https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-svcb-https-04 * for the "HTTPS" DNS resource record. + * [#next-free-field: 6] */ export interface AlternateProtocolsCacheOptions { /** @@ -33,8 +78,25 @@ export interface AlternateProtocolsCacheOptions { * :ref:`key value store ` to flush * alternate protocols entries to disk. * This function is currently only supported if concurrency is 1 + * Cached entries will take precedence over pre-populated entries below. */ 'key_value_store_config'?: (_envoy_config_core_v3_TypedExtensionConfig | null); + /** + * Allows pre-populating the cache with entries, as described above. + */ + 'prepopulated_entries'?: (_envoy_config_core_v3_AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry)[]; + /** + * Optional list of hostnames suffixes for which Alt-Svc entries can be shared. For example, if + * this list contained the value ``.c.example.com``, then an Alt-Svc entry for ``foo.c.example.com`` + * could be shared with ``bar.c.example.com`` but would not be shared with ``baz.example.com``. On + * the other hand, if the list contained the value ``.example.com`` then all three hosts could share + * Alt-Svc entries. Each entry must start with ``.``. If a hostname matches multiple suffixes, the + * first listed suffix will be used. + * + * Since lookup in this list is O(n), it is recommended that the number of suffixes be limited. + * [#not-implemented-hide:] + */ + 'canonical_suffixes'?: (string)[]; } /** @@ -42,6 +104,7 @@ export interface AlternateProtocolsCacheOptions { * make an HTTP connection to an origin server. See https://tools.ietf.org/html/rfc7838 for * HTTP Alternative Services and https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-svcb-https-04 * for the "HTTPS" DNS resource record. + * [#next-free-field: 6] */ export interface AlternateProtocolsCacheOptions__Output { /** @@ -67,6 +130,23 @@ export interface AlternateProtocolsCacheOptions__Output { * :ref:`key value store ` to flush * alternate protocols entries to disk. * This function is currently only supported if concurrency is 1 + * Cached entries will take precedence over pre-populated entries below. */ 'key_value_store_config': (_envoy_config_core_v3_TypedExtensionConfig__Output | null); + /** + * Allows pre-populating the cache with entries, as described above. + */ + 'prepopulated_entries': (_envoy_config_core_v3_AlternateProtocolsCacheOptions_AlternateProtocolsCacheEntry__Output)[]; + /** + * Optional list of hostnames suffixes for which Alt-Svc entries can be shared. For example, if + * this list contained the value ``.c.example.com``, then an Alt-Svc entry for ``foo.c.example.com`` + * could be shared with ``bar.c.example.com`` but would not be shared with ``baz.example.com``. On + * the other hand, if the list contained the value ``.example.com`` then all three hosts could share + * Alt-Svc entries. Each entry must start with ``.``. If a hostname matches multiple suffixes, the + * first listed suffix will be used. + * + * Since lookup in this list is O(n), it is recommended that the number of suffixes be limited. + * [#not-implemented-hide:] + */ + 'canonical_suffixes': (string)[]; } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ApiConfigSource.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ApiConfigSource.ts index b303a08d8..691ab93ba 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ApiConfigSource.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ApiConfigSource.ts @@ -4,6 +4,7 @@ import type { Duration as _google_protobuf_Duration, Duration__Output as _google import type { GrpcService as _envoy_config_core_v3_GrpcService, GrpcService__Output as _envoy_config_core_v3_GrpcService__Output } from '../../../../envoy/config/core/v3/GrpcService'; import type { RateLimitSettings as _envoy_config_core_v3_RateLimitSettings, RateLimitSettings__Output as _envoy_config_core_v3_RateLimitSettings__Output } from '../../../../envoy/config/core/v3/RateLimitSettings'; import type { ApiVersion as _envoy_config_core_v3_ApiVersion } from '../../../../envoy/config/core/v3/ApiVersion'; +import type { TypedExtensionConfig as _envoy_config_core_v3_TypedExtensionConfig, TypedExtensionConfig__Output as _envoy_config_core_v3_TypedExtensionConfig__Output } from '../../../../envoy/config/core/v3/TypedExtensionConfig'; // Original file: deps/envoy-api/envoy/config/core/v3/config_source.proto @@ -49,7 +50,7 @@ export enum _envoy_config_core_v3_ApiConfigSource_ApiType { /** * API configuration source. This identifies the API type and cluster that Envoy * will use to fetch an xDS API. - * [#next-free-field: 9] + * [#next-free-field: 10] */ export interface ApiConfigSource { /** @@ -94,12 +95,23 @@ export interface ApiConfigSource { * endpoint and version of [Delta]DiscoveryRequest/Response used on the wire. */ 'transport_api_version'?: (_envoy_config_core_v3_ApiVersion | keyof typeof _envoy_config_core_v3_ApiVersion); + /** + * A list of config validators that will be executed when a new update is + * received from the ApiConfigSource. Note that each validator handles a + * specific xDS service type, and only the validators corresponding to the + * type url (in ``:ref: DiscoveryResponse`` or ``:ref: DeltaDiscoveryResponse``) + * will be invoked. + * If the validator returns false or throws an exception, the config will be rejected by + * the client, and a NACK will be sent. + * [#extension-category: envoy.config.validators] + */ + 'config_validators'?: (_envoy_config_core_v3_TypedExtensionConfig)[]; } /** * API configuration source. This identifies the API type and cluster that Envoy * will use to fetch an xDS API. - * [#next-free-field: 9] + * [#next-free-field: 10] */ export interface ApiConfigSource__Output { /** @@ -144,4 +156,15 @@ export interface ApiConfigSource__Output { * endpoint and version of [Delta]DiscoveryRequest/Response used on the wire. */ 'transport_api_version': (keyof typeof _envoy_config_core_v3_ApiVersion); + /** + * A list of config validators that will be executed when a new update is + * received from the ApiConfigSource. Note that each validator handles a + * specific xDS service type, and only the validators corresponding to the + * type url (in ``:ref: DiscoveryResponse`` or ``:ref: DeltaDiscoveryResponse``) + * will be invoked. + * If the validator returns false or throws an exception, the config will be rejected by + * the client, and a NACK will be sent. + * [#extension-category: envoy.config.validators] + */ + 'config_validators': (_envoy_config_core_v3_TypedExtensionConfig__Output)[]; } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/BindConfig.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/BindConfig.ts index d3b2cc584..733c609b1 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/BindConfig.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/BindConfig.ts @@ -3,18 +3,22 @@ import type { SocketAddress as _envoy_config_core_v3_SocketAddress, SocketAddress__Output as _envoy_config_core_v3_SocketAddress__Output } from '../../../../envoy/config/core/v3/SocketAddress'; import type { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../../google/protobuf/BoolValue'; import type { SocketOption as _envoy_config_core_v3_SocketOption, SocketOption__Output as _envoy_config_core_v3_SocketOption__Output } from '../../../../envoy/config/core/v3/SocketOption'; +import type { ExtraSourceAddress as _envoy_config_core_v3_ExtraSourceAddress, ExtraSourceAddress__Output as _envoy_config_core_v3_ExtraSourceAddress__Output } from '../../../../envoy/config/core/v3/ExtraSourceAddress'; +/** + * [#next-free-field: 6] + */ export interface BindConfig { /** * The address to bind to when creating a socket. */ 'source_address'?: (_envoy_config_core_v3_SocketAddress | null); /** - * Whether to set the *IP_FREEBIND* option when creating the socket. When this + * Whether to set the ``IP_FREEBIND`` option when creating the socket. When this * flag is set to true, allows the :ref:`source_address - * ` to be an IP address + * ` to be an IP address * that is not configured on the system running Envoy. When this flag is set - * to false, the option *IP_FREEBIND* is disabled on the socket. When this + * to false, the option ``IP_FREEBIND`` is disabled on the socket. When this * flag is not set (default), the socket is not modified, i.e. the option is * neither enabled nor disabled. */ @@ -24,19 +28,38 @@ export interface BindConfig { * precompiled binaries. */ 'socket_options'?: (_envoy_config_core_v3_SocketOption)[]; + /** + * Deprecated by + * :ref:`extra_source_addresses ` + */ + 'additional_source_addresses'?: (_envoy_config_core_v3_SocketAddress)[]; + /** + * Extra source addresses appended to the address specified in the `source_address` + * field. This enables to specify multiple source addresses. Currently, only one extra + * address can be supported, and the extra address should have a different IP version + * with the address in the `source_address` field. The address which has the same IP + * version with the target host's address IP version will be used as bind address. If more + * than one extra address specified, only the first address matched IP version will be + * returned. If there is no same IP version address found, the address in the `source_address` + * will be returned. + */ + 'extra_source_addresses'?: (_envoy_config_core_v3_ExtraSourceAddress)[]; } +/** + * [#next-free-field: 6] + */ export interface BindConfig__Output { /** * The address to bind to when creating a socket. */ 'source_address': (_envoy_config_core_v3_SocketAddress__Output | null); /** - * Whether to set the *IP_FREEBIND* option when creating the socket. When this + * Whether to set the ``IP_FREEBIND`` option when creating the socket. When this * flag is set to true, allows the :ref:`source_address - * ` to be an IP address + * ` to be an IP address * that is not configured on the system running Envoy. When this flag is set - * to false, the option *IP_FREEBIND* is disabled on the socket. When this + * to false, the option ``IP_FREEBIND`` is disabled on the socket. When this * flag is not set (default), the socket is not modified, i.e. the option is * neither enabled nor disabled. */ @@ -46,4 +69,20 @@ export interface BindConfig__Output { * precompiled binaries. */ 'socket_options': (_envoy_config_core_v3_SocketOption__Output)[]; + /** + * Deprecated by + * :ref:`extra_source_addresses ` + */ + 'additional_source_addresses': (_envoy_config_core_v3_SocketAddress__Output)[]; + /** + * Extra source addresses appended to the address specified in the `source_address` + * field. This enables to specify multiple source addresses. Currently, only one extra + * address can be supported, and the extra address should have a different IP version + * with the address in the `source_address` field. The address which has the same IP + * version with the target host's address IP version will be used as bind address. If more + * than one extra address specified, only the first address matched IP version will be + * returned. If there is no same IP version address found, the address in the `source_address` + * will be returned. + */ + 'extra_source_addresses': (_envoy_config_core_v3_ExtraSourceAddress__Output)[]; } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ConfigSource.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ConfigSource.ts index a39c0f077..5438b6e7d 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ConfigSource.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ConfigSource.ts @@ -6,6 +6,7 @@ import type { Duration as _google_protobuf_Duration, Duration__Output as _google import type { SelfConfigSource as _envoy_config_core_v3_SelfConfigSource, SelfConfigSource__Output as _envoy_config_core_v3_SelfConfigSource__Output } from '../../../../envoy/config/core/v3/SelfConfigSource'; import type { ApiVersion as _envoy_config_core_v3_ApiVersion } from '../../../../envoy/config/core/v3/ApiVersion'; import type { Authority as _xds_core_v3_Authority, Authority__Output as _xds_core_v3_Authority__Output } from '../../../../xds/core/v3/Authority'; +import type { PathConfigSource as _envoy_config_core_v3_PathConfigSource, PathConfigSource__Output as _envoy_config_core_v3_PathConfigSource__Output } from '../../../../envoy/config/core/v3/PathConfigSource'; /** * Configuration for :ref:`listeners `, :ref:`clusters @@ -14,23 +15,11 @@ import type { Authority as _xds_core_v3_Authority, Authority__Output as _xds_cor * ` etc. may either be sourced from the * filesystem or from an xDS API source. Filesystem configs are watched with * inotify for updates. - * [#next-free-field: 8] + * [#next-free-field: 9] */ export interface ConfigSource { /** - * Path on the filesystem to source and watch for configuration updates. - * When sourcing configuration for :ref:`secret `, - * the certificate and key files are also watched for updates. - * - * .. note:: - * - * The path to the source must exist at config load time. - * - * .. note:: - * - * Envoy will only watch the file path for *moves.* This is because in general only moves - * are atomic. The same method of swapping files as is demonstrated in the - * :ref:`runtime documentation ` can be used here also. + * Deprecated in favor of ``path_config_source``. Use that field instead. */ 'path'?: (string); /** @@ -74,12 +63,16 @@ export interface ConfigSource { 'resource_api_version'?: (_envoy_config_core_v3_ApiVersion | keyof typeof _envoy_config_core_v3_ApiVersion); /** * Authorities that this config source may be used for. An authority specified in a xdstp:// URL - * is resolved to a *ConfigSource* prior to configuration fetch. This field provides the + * is resolved to a ``ConfigSource`` prior to configuration fetch. This field provides the * association between authority name and configuration source. * [#not-implemented-hide:] */ 'authorities'?: (_xds_core_v3_Authority)[]; - 'config_source_specifier'?: "path"|"api_config_source"|"ads"|"self"; + /** + * Local filesystem path configuration source. + */ + 'path_config_source'?: (_envoy_config_core_v3_PathConfigSource | null); + 'config_source_specifier'?: "path"|"path_config_source"|"api_config_source"|"ads"|"self"; } /** @@ -89,23 +82,11 @@ export interface ConfigSource { * ` etc. may either be sourced from the * filesystem or from an xDS API source. Filesystem configs are watched with * inotify for updates. - * [#next-free-field: 8] + * [#next-free-field: 9] */ export interface ConfigSource__Output { /** - * Path on the filesystem to source and watch for configuration updates. - * When sourcing configuration for :ref:`secret `, - * the certificate and key files are also watched for updates. - * - * .. note:: - * - * The path to the source must exist at config load time. - * - * .. note:: - * - * Envoy will only watch the file path for *moves.* This is because in general only moves - * are atomic. The same method of swapping files as is demonstrated in the - * :ref:`runtime documentation ` can be used here also. + * Deprecated in favor of ``path_config_source``. Use that field instead. */ 'path'?: (string); /** @@ -149,10 +130,14 @@ export interface ConfigSource__Output { 'resource_api_version': (keyof typeof _envoy_config_core_v3_ApiVersion); /** * Authorities that this config source may be used for. An authority specified in a xdstp:// URL - * is resolved to a *ConfigSource* prior to configuration fetch. This field provides the + * is resolved to a ``ConfigSource`` prior to configuration fetch. This field provides the * association between authority name and configuration source. * [#not-implemented-hide:] */ 'authorities': (_xds_core_v3_Authority__Output)[]; - 'config_source_specifier': "path"|"api_config_source"|"ads"|"self"; + /** + * Local filesystem path configuration source. + */ + 'path_config_source'?: (_envoy_config_core_v3_PathConfigSource__Output | null); + 'config_source_specifier': "path"|"path_config_source"|"api_config_source"|"ads"|"self"; } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/DataSource.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/DataSource.ts index cc29e084f..0774fb844 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/DataSource.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/DataSource.ts @@ -2,7 +2,7 @@ /** - * Data source consisting of either a file or an inline value. + * Data source consisting of a file, an inline value, or an environment variable. */ export interface DataSource { /** @@ -17,11 +17,15 @@ export interface DataSource { * String inlined in the configuration. */ 'inline_string'?: (string); - 'specifier'?: "filename"|"inline_bytes"|"inline_string"; + /** + * Environment variable data source. + */ + 'environment_variable'?: (string); + 'specifier'?: "filename"|"inline_bytes"|"inline_string"|"environment_variable"; } /** - * Data source consisting of either a file or an inline value. + * Data source consisting of a file, an inline value, or an environment variable. */ export interface DataSource__Output { /** @@ -36,5 +40,9 @@ export interface DataSource__Output { * String inlined in the configuration. */ 'inline_string'?: (string); - 'specifier': "filename"|"inline_bytes"|"inline_string"; + /** + * Environment variable data source. + */ + 'environment_variable'?: (string); + 'specifier': "filename"|"inline_bytes"|"inline_string"|"environment_variable"; } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/DnsResolutionConfig.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/DnsResolutionConfig.ts index c87be12e2..cf9f7a455 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/DnsResolutionConfig.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/DnsResolutionConfig.ts @@ -11,9 +11,6 @@ export interface DnsResolutionConfig { * A list of dns resolver addresses. If specified, the DNS client library will perform resolution * via the underlying DNS resolvers. Otherwise, the default system resolvers * (e.g., /etc/resolv.conf) will be used. - * Setting this value causes failure if the - * ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - * server startup. Apple's API only allows overriding DNS resolvers via system settings. */ 'resolvers'?: (_envoy_config_core_v3_Address)[]; /** @@ -30,9 +27,6 @@ export interface DnsResolutionConfig__Output { * A list of dns resolver addresses. If specified, the DNS client library will perform resolution * via the underlying DNS resolvers. Otherwise, the default system resolvers * (e.g., /etc/resolv.conf) will be used. - * Setting this value causes failure if the - * ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - * server startup. Apple's API only allows overriding DNS resolvers via system settings. */ 'resolvers': (_envoy_config_core_v3_Address__Output)[]; /** diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/DnsResolverOptions.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/DnsResolverOptions.ts index 11b68b150..e3f83b72c 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/DnsResolverOptions.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/DnsResolverOptions.ts @@ -7,9 +7,6 @@ export interface DnsResolverOptions { /** * Use TCP for all DNS queries instead of the default protocol UDP. - * Setting this value causes failure if the - * ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - * server startup. Apple's API only uses UDP for DNS resolution. */ 'use_tcp_for_dns_lookups'?: (boolean); /** @@ -24,9 +21,6 @@ export interface DnsResolverOptions { export interface DnsResolverOptions__Output { /** * Use TCP for all DNS queries instead of the default protocol UDP. - * Setting this value causes failure if the - * ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during - * server startup. Apple's API only uses UDP for DNS resolution. */ 'use_tcp_for_dns_lookups': (boolean); /** diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/EnvoyInternalAddress.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/EnvoyInternalAddress.ts index 936e433db..264e65a0a 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/EnvoyInternalAddress.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/EnvoyInternalAddress.ts @@ -2,27 +2,39 @@ /** - * [#not-implemented-hide:] The address represents an envoy internal listener. - * TODO(lambdai): Make this address available for listener and endpoint. - * TODO(asraa): When address available, remove workaround from test/server/server_fuzz_test.cc:30. + * The address represents an envoy internal listener. + * [#comment: TODO(asraa): When address available, remove workaround from test/server/server_fuzz_test.cc:30.] */ export interface EnvoyInternalAddress { /** - * [#not-implemented-hide:] The :ref:`listener name ` of the destination internal listener. + * Specifies the :ref:`name ` of the + * internal listener. */ 'server_listener_name'?: (string); + /** + * Specifies an endpoint identifier to distinguish between multiple endpoints for the same internal listener in a + * single upstream pool. Only used in the upstream addresses for tracking changes to individual endpoints. This, for + * example, may be set to the final destination IP for the target internal listener. + */ + 'endpoint_id'?: (string); 'address_name_specifier'?: "server_listener_name"; } /** - * [#not-implemented-hide:] The address represents an envoy internal listener. - * TODO(lambdai): Make this address available for listener and endpoint. - * TODO(asraa): When address available, remove workaround from test/server/server_fuzz_test.cc:30. + * The address represents an envoy internal listener. + * [#comment: TODO(asraa): When address available, remove workaround from test/server/server_fuzz_test.cc:30.] */ export interface EnvoyInternalAddress__Output { /** - * [#not-implemented-hide:] The :ref:`listener name ` of the destination internal listener. + * Specifies the :ref:`name ` of the + * internal listener. */ 'server_listener_name'?: (string); + /** + * Specifies an endpoint identifier to distinguish between multiple endpoints for the same internal listener in a + * single upstream pool. Only used in the upstream addresses for tracking changes to individual endpoints. This, for + * example, may be set to the final destination IP for the target internal listener. + */ + 'endpoint_id': (string); 'address_name_specifier': "server_listener_name"; } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Extension.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Extension.ts index 5f730bd22..b25c15cce 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Extension.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Extension.ts @@ -4,7 +4,7 @@ import type { BuildVersion as _envoy_config_core_v3_BuildVersion, BuildVersion__ /** * Version and identification for an Envoy extension. - * [#next-free-field: 6] + * [#next-free-field: 7] */ export interface Extension { /** @@ -36,11 +36,15 @@ export interface Extension { * Indicates that the extension is present but was disabled via dynamic configuration. */ 'disabled'?: (boolean); + /** + * Type URLs of extension configuration protos. + */ + 'type_urls'?: (string)[]; } /** * Version and identification for an Envoy extension. - * [#next-free-field: 6] + * [#next-free-field: 7] */ export interface Extension__Output { /** @@ -72,4 +76,8 @@ export interface Extension__Output { * Indicates that the extension is present but was disabled via dynamic configuration. */ 'disabled': (boolean); + /** + * Type URLs of extension configuration protos. + */ + 'type_urls': (string)[]; } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ExtensionConfigSource.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ExtensionConfigSource.ts index 805762ef5..6342f50fc 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ExtensionConfigSource.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ExtensionConfigSource.ts @@ -1,4 +1,4 @@ -// Original file: deps/envoy-api/envoy/config/core/v3/extension.proto +// Original file: deps/envoy-api/envoy/config/core/v3/config_source.proto import type { ConfigSource as _envoy_config_core_v3_ConfigSource, ConfigSource__Output as _envoy_config_core_v3_ConfigSource__Output } from '../../../../envoy/config/core/v3/ConfigSource'; import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; @@ -21,7 +21,7 @@ export interface ExtensionConfigSource { /** * Optional default configuration to use as the initial configuration if * there is a failure to receive the initial extension configuration or if - * `apply_default_config_without_warming` flag is set. + * ``apply_default_config_without_warming`` flag is set. */ 'default_config'?: (_google_protobuf_Any | null); /** @@ -55,7 +55,7 @@ export interface ExtensionConfigSource__Output { /** * Optional default configuration to use as the initial configuration if * there is a failure to receive the initial extension configuration or if - * `apply_default_config_without_warming` flag is set. + * ``apply_default_config_without_warming`` flag is set. */ 'default_config': (_google_protobuf_Any__Output | null); /** diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ExtraSourceAddress.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ExtraSourceAddress.ts new file mode 100644 index 000000000..78051fafb --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ExtraSourceAddress.ts @@ -0,0 +1,38 @@ +// Original file: deps/envoy-api/envoy/config/core/v3/address.proto + +import type { SocketAddress as _envoy_config_core_v3_SocketAddress, SocketAddress__Output as _envoy_config_core_v3_SocketAddress__Output } from '../../../../envoy/config/core/v3/SocketAddress'; +import type { SocketOptionsOverride as _envoy_config_core_v3_SocketOptionsOverride, SocketOptionsOverride__Output as _envoy_config_core_v3_SocketOptionsOverride__Output } from '../../../../envoy/config/core/v3/SocketOptionsOverride'; + +export interface ExtraSourceAddress { + /** + * The additional address to bind. + */ + 'address'?: (_envoy_config_core_v3_SocketAddress | null); + /** + * Additional socket options that may not be present in Envoy source code or + * precompiled binaries. If specified, this will override the + * :ref:`socket_options ` + * in the BindConfig. If specified with no + * :ref:`socket_options ` + * or an empty list of :ref:`socket_options `, + * it means no socket option will apply. + */ + 'socket_options'?: (_envoy_config_core_v3_SocketOptionsOverride | null); +} + +export interface ExtraSourceAddress__Output { + /** + * The additional address to bind. + */ + 'address': (_envoy_config_core_v3_SocketAddress__Output | null); + /** + * Additional socket options that may not be present in Envoy source code or + * precompiled binaries. If specified, this will override the + * :ref:`socket_options ` + * in the BindConfig. If specified with no + * :ref:`socket_options ` + * or an empty list of :ref:`socket_options `, + * it means no socket option will apply. + */ + 'socket_options': (_envoy_config_core_v3_SocketOptionsOverride__Output | null); +} diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/GrpcService.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/GrpcService.ts index 0d81f7340..eaeeff52c 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/GrpcService.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/GrpcService.ts @@ -2,6 +2,7 @@ import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../../google/protobuf/Duration'; import type { HeaderValue as _envoy_config_core_v3_HeaderValue, HeaderValue__Output as _envoy_config_core_v3_HeaderValue__Output } from '../../../../envoy/config/core/v3/HeaderValue'; +import type { RetryPolicy as _envoy_config_core_v3_RetryPolicy, RetryPolicy__Output as _envoy_config_core_v3_RetryPolicy__Output } from '../../../../envoy/config/core/v3/RetryPolicy'; import type { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../google/protobuf/Struct'; import type { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; import type { DataSource as _envoy_config_core_v3_DataSource, DataSource__Output as _envoy_config_core_v3_DataSource__Output } from '../../../../envoy/config/core/v3/DataSource'; @@ -153,10 +154,17 @@ export interface _envoy_config_core_v3_GrpcService_EnvoyGrpc { */ 'cluster_name'?: (string); /** - * The `:authority` header in the grpc request. If this field is not set, the authority header value will be `cluster_name`. + * The ``:authority`` header in the grpc request. If this field is not set, the authority header value will be ``cluster_name``. * Note that this authority does not override the SNI. The SNI is provided by the transport socket of the cluster. */ 'authority'?: (string); + /** + * Indicates the retry policy for re-establishing the gRPC stream + * This field is optional. If max interval is not provided, it will be set to ten times the provided base interval. + * Currently only supported for xDS gRPC streams. + * If not set, xDS gRPC streams default base interval:500ms, maximum interval:30s will be applied. + */ + 'retry_policy'?: (_envoy_config_core_v3_RetryPolicy | null); } export interface _envoy_config_core_v3_GrpcService_EnvoyGrpc__Output { @@ -167,10 +175,17 @@ export interface _envoy_config_core_v3_GrpcService_EnvoyGrpc__Output { */ 'cluster_name': (string); /** - * The `:authority` header in the grpc request. If this field is not set, the authority header value will be `cluster_name`. + * The ``:authority`` header in the grpc request. If this field is not set, the authority header value will be ``cluster_name``. * Note that this authority does not override the SNI. The SNI is provided by the transport socket of the cluster. */ 'authority': (string); + /** + * Indicates the retry policy for re-establishing the gRPC stream + * This field is optional. If max interval is not provided, it will be set to ten times the provided base interval. + * Currently only supported for xDS gRPC streams. + * If not set, xDS gRPC streams default base interval:500ms, maximum interval:30s will be applied. + */ + 'retry_policy': (_envoy_config_core_v3_RetryPolicy__Output | null); } /** @@ -372,7 +387,7 @@ export interface _envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_St /** * URI of the token exchange service that handles token exchange requests. * [#comment:TODO(asraa): Add URI validation when implemented. Tracked by - * https://github.com/envoyproxy/protoc-gen-validate/issues/303] + * https://github.com/bufbuild/protoc-gen-validate/issues/303] */ 'token_exchange_service_uri'?: (string); /** @@ -426,7 +441,7 @@ export interface _envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_St /** * URI of the token exchange service that handles token exchange requests. * [#comment:TODO(asraa): Add URI validation when implemented. Tracked by - * https://github.com/envoyproxy/protoc-gen-validate/issues/303] + * https://github.com/bufbuild/protoc-gen-validate/issues/303] */ 'token_exchange_service_uri': (string); /** diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HeaderValue.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HeaderValue.ts index a9fb6c07a..1cac90213 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HeaderValue.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HeaderValue.ts @@ -14,7 +14,7 @@ export interface HeaderValue { * * The same :ref:`format specifier ` as used for * :ref:`HTTP access logging ` applies here, however - * unknown header values are replaced with the empty string instead of `-`. + * unknown header values are replaced with the empty string instead of ``-``. */ 'value'?: (string); } @@ -32,7 +32,7 @@ export interface HeaderValue__Output { * * The same :ref:`format specifier ` as used for * :ref:`HTTP access logging ` applies here, however - * unknown header values are replaced with the empty string instead of `-`. + * unknown header values are replaced with the empty string instead of ``-``. */ 'value': (string); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HeaderValueOption.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HeaderValueOption.ts index 7ba7e9d8d..efb656303 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HeaderValueOption.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HeaderValueOption.ts @@ -39,13 +39,27 @@ export interface HeaderValueOption { /** * Should the value be appended? If true (default), the value is appended to * existing values. Otherwise it replaces any existing values. + * This field is deprecated and please use + * :ref:`append_action ` as replacement. + * + * .. note:: + * The :ref:`external authorization service ` and + * :ref:`external processor service ` have + * default value (``false``) for this field. */ 'append'?: (_google_protobuf_BoolValue | null); /** - * [#not-implemented-hide:] Describes the action taken to append/overwrite the given value for an existing header - * or to only add this header if it's absent. Value defaults to :ref:`APPEND_IF_EXISTS_OR_ADD`. + * Describes the action taken to append/overwrite the given value for an existing header + * or to only add this header if it's absent. + * Value defaults to :ref:`APPEND_IF_EXISTS_OR_ADD + * `. */ 'append_action'?: (_envoy_config_core_v3_HeaderValueOption_HeaderAppendAction | keyof typeof _envoy_config_core_v3_HeaderValueOption_HeaderAppendAction); + /** + * Is the header value allowed to be empty? If false (default), custom headers with empty values are dropped, + * otherwise they are added. + */ + 'keep_empty_value'?: (boolean); } /** @@ -59,11 +73,25 @@ export interface HeaderValueOption__Output { /** * Should the value be appended? If true (default), the value is appended to * existing values. Otherwise it replaces any existing values. + * This field is deprecated and please use + * :ref:`append_action ` as replacement. + * + * .. note:: + * The :ref:`external authorization service ` and + * :ref:`external processor service ` have + * default value (``false``) for this field. */ 'append': (_google_protobuf_BoolValue__Output | null); /** - * [#not-implemented-hide:] Describes the action taken to append/overwrite the given value for an existing header - * or to only add this header if it's absent. Value defaults to :ref:`APPEND_IF_EXISTS_OR_ADD`. + * Describes the action taken to append/overwrite the given value for an existing header + * or to only add this header if it's absent. + * Value defaults to :ref:`APPEND_IF_EXISTS_OR_ADD + * `. */ 'append_action': (keyof typeof _envoy_config_core_v3_HeaderValueOption_HeaderAppendAction); + /** + * Is the header value allowed to be empty? If false (default), custom headers with empty values are dropped, + * otherwise they are added. + */ + 'keep_empty_value': (boolean); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HealthCheck.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HealthCheck.ts index 8882de614..e0638df7d 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HealthCheck.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HealthCheck.ts @@ -5,10 +5,13 @@ import type { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output a import type { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../../google/protobuf/BoolValue'; import type { EventServiceConfig as _envoy_config_core_v3_EventServiceConfig, EventServiceConfig__Output as _envoy_config_core_v3_EventServiceConfig__Output } from '../../../../envoy/config/core/v3/EventServiceConfig'; import type { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../google/protobuf/Struct'; +import type { TypedExtensionConfig as _envoy_config_core_v3_TypedExtensionConfig, TypedExtensionConfig__Output as _envoy_config_core_v3_TypedExtensionConfig__Output } from '../../../../envoy/config/core/v3/TypedExtensionConfig'; +import type { UInt64Value as _google_protobuf_UInt64Value, UInt64Value__Output as _google_protobuf_UInt64Value__Output } from '../../../../google/protobuf/UInt64Value'; import type { HeaderValueOption as _envoy_config_core_v3_HeaderValueOption, HeaderValueOption__Output as _envoy_config_core_v3_HeaderValueOption__Output } from '../../../../envoy/config/core/v3/HeaderValueOption'; import type { Int64Range as _envoy_type_v3_Int64Range, Int64Range__Output as _envoy_type_v3_Int64Range__Output } from '../../../../envoy/type/v3/Int64Range'; import type { CodecClientType as _envoy_type_v3_CodecClientType } from '../../../../envoy/type/v3/CodecClientType'; import type { StringMatcher as _envoy_type_matcher_v3_StringMatcher, StringMatcher__Output as _envoy_type_matcher_v3_StringMatcher__Output } from '../../../../envoy/type/matcher/v3/StringMatcher'; +import type { RequestMethod as _envoy_config_core_v3_RequestMethod } from '../../../../envoy/config/core/v3/RequestMethod'; import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; import type { Long } from '@grpc/proto-loader'; @@ -68,6 +71,13 @@ export interface _envoy_config_core_v3_HealthCheck_GrpcHealthCheck { * the :ref:`hostname ` field. */ 'authority'?: (string); + /** + * Specifies a list of key-value pairs that should be added to the metadata of each GRPC call + * that is sent to the health checked cluster. For more information, including details on header value syntax, + * see the documentation on :ref:`custom request headers + * `. + */ + 'initial_metadata'?: (_envoy_config_core_v3_HeaderValueOption)[]; } /** @@ -92,10 +102,17 @@ export interface _envoy_config_core_v3_HealthCheck_GrpcHealthCheck__Output { * the :ref:`hostname ` field. */ 'authority': (string); + /** + * Specifies a list of key-value pairs that should be added to the metadata of each GRPC call + * that is sent to the health checked cluster. For more information, including details on header value syntax, + * see the documentation on :ref:`custom request headers + * `. + */ + 'initial_metadata': (_envoy_config_core_v3_HeaderValueOption__Output)[]; } /** - * [#next-free-field: 13] + * [#next-free-field: 15] */ export interface _envoy_config_core_v3_HealthCheck_HttpHealthCheck { /** @@ -107,7 +124,7 @@ export interface _envoy_config_core_v3_HealthCheck_HttpHealthCheck { 'host'?: (string); /** * Specifies the HTTP path that will be requested during health checking. For example - * * /healthcheck*. + * ``/healthcheck``. */ 'path'?: (string); /** @@ -115,9 +132,22 @@ export interface _envoy_config_core_v3_HealthCheck_HttpHealthCheck { */ 'send'?: (_envoy_config_core_v3_HealthCheck_Payload | null); /** - * [#not-implemented-hide:] HTTP specific response. + * Specifies a list of HTTP expected responses to match in the first ``response_buffer_size`` bytes of the response body. + * If it is set, both the expected response check and status code determine the health check. + * When checking the response, “fuzzy” matching is performed such that each payload block must be found, + * and in the order specified, but not necessarily contiguous. + * + * .. note:: + * + * It is recommended to set ``response_buffer_size`` based on the total Payload size for efficiency. + * The default buffer size is 1024 bytes when it is not set. + */ + 'receive'?: (_envoy_config_core_v3_HealthCheck_Payload)[]; + /** + * Specifies the size of response buffer in bytes that is used to Payload match. + * The default value is 1024. Setting to 0 implies that the Payload will be matched against the entire response. */ - 'receive'?: (_envoy_config_core_v3_HealthCheck_Payload | null); + 'response_buffer_size'?: (_google_protobuf_UInt64Value | null); /** * Specifies a list of HTTP headers that should be added to each request that is sent to the * health checked cluster. For more information, including details on header value syntax, see @@ -161,10 +191,17 @@ export interface _envoy_config_core_v3_HealthCheck_HttpHealthCheck { * ` for more information. */ 'service_name_matcher'?: (_envoy_type_matcher_v3_StringMatcher | null); + /** + * HTTP Method that will be used for health checking, default is "GET". + * GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE, PATCH methods are supported, but making request body is not supported. + * CONNECT method is disallowed because it is not appropriate for health check request. + * If a non-200 response is expected by the method, it needs to be set in :ref:`expected_statuses `. + */ + 'method'?: (_envoy_config_core_v3_RequestMethod | keyof typeof _envoy_config_core_v3_RequestMethod); } /** - * [#next-free-field: 13] + * [#next-free-field: 15] */ export interface _envoy_config_core_v3_HealthCheck_HttpHealthCheck__Output { /** @@ -176,7 +213,7 @@ export interface _envoy_config_core_v3_HealthCheck_HttpHealthCheck__Output { 'host': (string); /** * Specifies the HTTP path that will be requested during health checking. For example - * * /healthcheck*. + * ``/healthcheck``. */ 'path': (string); /** @@ -184,9 +221,22 @@ export interface _envoy_config_core_v3_HealthCheck_HttpHealthCheck__Output { */ 'send': (_envoy_config_core_v3_HealthCheck_Payload__Output | null); /** - * [#not-implemented-hide:] HTTP specific response. + * Specifies a list of HTTP expected responses to match in the first ``response_buffer_size`` bytes of the response body. + * If it is set, both the expected response check and status code determine the health check. + * When checking the response, “fuzzy” matching is performed such that each payload block must be found, + * and in the order specified, but not necessarily contiguous. + * + * .. note:: + * + * It is recommended to set ``response_buffer_size`` based on the total Payload size for efficiency. + * The default buffer size is 1024 bytes when it is not set. */ - 'receive': (_envoy_config_core_v3_HealthCheck_Payload__Output | null); + 'receive': (_envoy_config_core_v3_HealthCheck_Payload__Output)[]; + /** + * Specifies the size of response buffer in bytes that is used to Payload match. + * The default value is 1024. Setting to 0 implies that the Payload will be matched against the entire response. + */ + 'response_buffer_size': (_google_protobuf_UInt64Value__Output | null); /** * Specifies a list of HTTP headers that should be added to each request that is sent to the * health checked cluster. For more information, including details on header value syntax, see @@ -230,6 +280,13 @@ export interface _envoy_config_core_v3_HealthCheck_HttpHealthCheck__Output { * ` for more information. */ 'service_name_matcher': (_envoy_type_matcher_v3_StringMatcher__Output | null); + /** + * HTTP Method that will be used for health checking, default is "GET". + * GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE, PATCH methods are supported, but making request body is not supported. + * CONNECT method is disallowed because it is not appropriate for health check request. + * If a non-200 response is expected by the method, it needs to be set in :ref:`expected_statuses `. + */ + 'method': (keyof typeof _envoy_config_core_v3_RequestMethod); } /** @@ -241,7 +298,7 @@ export interface _envoy_config_core_v3_HealthCheck_Payload { */ 'text'?: (string); /** - * [#not-implemented-hide:] Binary payload. + * Binary payload. */ 'binary'?: (Buffer | Uint8Array | string); 'payload'?: "text"|"binary"; @@ -256,7 +313,7 @@ export interface _envoy_config_core_v3_HealthCheck_Payload__Output { */ 'text'?: (string); /** - * [#not-implemented-hide:] Binary payload. + * Binary payload. */ 'binary'?: (Buffer); 'payload': "text"|"binary"; @@ -289,7 +346,7 @@ export interface _envoy_config_core_v3_HealthCheck_TcpHealthCheck { 'send'?: (_envoy_config_core_v3_HealthCheck_Payload | null); /** * When checking the response, “fuzzy” matching is performed such that each - * binary block must be found, and in the order specified, but not + * payload block must be found, and in the order specified, but not * necessarily contiguous. */ 'receive'?: (_envoy_config_core_v3_HealthCheck_Payload)[]; @@ -302,7 +359,7 @@ export interface _envoy_config_core_v3_HealthCheck_TcpHealthCheck__Output { 'send': (_envoy_config_core_v3_HealthCheck_Payload__Output | null); /** * When checking the response, “fuzzy” matching is performed such that each - * binary block must be found, and in the order specified, but not + * payload block must be found, and in the order specified, but not * necessarily contiguous. */ 'receive': (_envoy_config_core_v3_HealthCheck_Payload__Output)[]; @@ -341,7 +398,7 @@ export interface _envoy_config_core_v3_HealthCheck_TlsOptions__Output { } /** - * [#next-free-field: 25] + * [#next-free-field: 26] */ export interface HealthCheck { /** @@ -360,7 +417,7 @@ export interface HealthCheck { 'interval_jitter'?: (_google_protobuf_Duration | null); /** * The number of unhealthy health checks required before a host is marked - * unhealthy. Note that for *http* health checking if a host responds with a code not in + * unhealthy. Note that for ``http`` health checking if a host responds with a code not in * :ref:`expected_statuses ` * or :ref:`retriable_statuses `, * this threshold is ignored and the host is considered immediately unhealthy. @@ -433,14 +490,19 @@ export interface HealthCheck { */ 'healthy_edge_interval'?: (_google_protobuf_Duration | null); /** + * .. attention:: + * This field is deprecated in favor of the extension + * :ref:`event_logger ` and + * :ref:`event_log_path ` + * in the file sink extension. + * * Specifies the path to the :ref:`health check event log `. - * If empty, no event log will be written. */ 'event_log_path'?: (string); /** * An optional jitter amount as a percentage of interval_ms. If specified, - * during every interval Envoy will add interval_ms * - * interval_jitter_percent / 100 to the wait time. + * during every interval Envoy will add ``interval_ms`` * + * ``interval_jitter_percent`` / 100 to the wait time. * * If interval_jitter_ms and interval_jitter_percent are both set, both of * them will be used to increase the wait time. @@ -490,7 +552,7 @@ export interface HealthCheck { * name: envoy.transport_sockets.tls * config: { ... } # tls socket configuration * - * If this field is set, then for health checks it will supersede an entry of *envoy.transport_socket* in the + * If this field is set, then for health checks it will supersede an entry of ``envoy.transport_socket`` in the * :ref:`LbEndpoint.Metadata `. * This allows using different transport socket capabilities for health checking versus proxying to the * endpoint. @@ -507,7 +569,7 @@ export interface HealthCheck { * (including new hosts) when the cluster has received no traffic. * * This is useful for when we want to send frequent health checks with - * `no_traffic_interval` but then revert to lower frequency `no_traffic_healthy_interval` once + * ``no_traffic_interval`` but then revert to lower frequency ``no_traffic_healthy_interval`` once * a host in the cluster is marked as healthy. * * Once a cluster has been used for traffic routing, Envoy will shift back to using the @@ -517,11 +579,16 @@ export interface HealthCheck { * no traffic interval and send that interval regardless of health state. */ 'no_traffic_healthy_interval'?: (_google_protobuf_Duration | null); + /** + * A list of event log sinks to process the health check event. + * [#extension-category: envoy.health_check.event_sinks] + */ + 'event_logger'?: (_envoy_config_core_v3_TypedExtensionConfig)[]; 'health_checker'?: "http_health_check"|"tcp_health_check"|"grpc_health_check"|"custom_health_check"; } /** - * [#next-free-field: 25] + * [#next-free-field: 26] */ export interface HealthCheck__Output { /** @@ -540,7 +607,7 @@ export interface HealthCheck__Output { 'interval_jitter': (_google_protobuf_Duration__Output | null); /** * The number of unhealthy health checks required before a host is marked - * unhealthy. Note that for *http* health checking if a host responds with a code not in + * unhealthy. Note that for ``http`` health checking if a host responds with a code not in * :ref:`expected_statuses ` * or :ref:`retriable_statuses `, * this threshold is ignored and the host is considered immediately unhealthy. @@ -613,14 +680,19 @@ export interface HealthCheck__Output { */ 'healthy_edge_interval': (_google_protobuf_Duration__Output | null); /** + * .. attention:: + * This field is deprecated in favor of the extension + * :ref:`event_logger ` and + * :ref:`event_log_path ` + * in the file sink extension. + * * Specifies the path to the :ref:`health check event log `. - * If empty, no event log will be written. */ 'event_log_path': (string); /** * An optional jitter amount as a percentage of interval_ms. If specified, - * during every interval Envoy will add interval_ms * - * interval_jitter_percent / 100 to the wait time. + * during every interval Envoy will add ``interval_ms`` * + * ``interval_jitter_percent`` / 100 to the wait time. * * If interval_jitter_ms and interval_jitter_percent are both set, both of * them will be used to increase the wait time. @@ -670,7 +742,7 @@ export interface HealthCheck__Output { * name: envoy.transport_sockets.tls * config: { ... } # tls socket configuration * - * If this field is set, then for health checks it will supersede an entry of *envoy.transport_socket* in the + * If this field is set, then for health checks it will supersede an entry of ``envoy.transport_socket`` in the * :ref:`LbEndpoint.Metadata `. * This allows using different transport socket capabilities for health checking versus proxying to the * endpoint. @@ -687,7 +759,7 @@ export interface HealthCheck__Output { * (including new hosts) when the cluster has received no traffic. * * This is useful for when we want to send frequent health checks with - * `no_traffic_interval` but then revert to lower frequency `no_traffic_healthy_interval` once + * ``no_traffic_interval`` but then revert to lower frequency ``no_traffic_healthy_interval`` once * a host in the cluster is marked as healthy. * * Once a cluster has been used for traffic routing, Envoy will shift back to using the @@ -697,5 +769,10 @@ export interface HealthCheck__Output { * no traffic interval and send that interval regardless of health state. */ 'no_traffic_healthy_interval': (_google_protobuf_Duration__Output | null); + /** + * A list of event log sinks to process the health check event. + * [#extension-category: envoy.health_check.event_sinks] + */ + 'event_logger': (_envoy_config_core_v3_TypedExtensionConfig__Output)[]; 'health_checker': "http_health_check"|"tcp_health_check"|"grpc_health_check"|"custom_health_check"; } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HealthStatus.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HealthStatus.ts index 6ecbca272..7d3d76569 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HealthStatus.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HealthStatus.ts @@ -5,7 +5,7 @@ */ export enum HealthStatus { /** - * The health status is not known. This is interpreted by Envoy as *HEALTHY*. + * The health status is not known. This is interpreted by Envoy as ``HEALTHY``. */ UNKNOWN = 0, /** @@ -21,12 +21,12 @@ export enum HealthStatus { * ``_ * or * ``_. - * This is interpreted by Envoy as *UNHEALTHY*. + * This is interpreted by Envoy as ``UNHEALTHY``. */ DRAINING = 3, /** * Health check timed out. This is part of HDS and is interpreted by Envoy as - * *UNHEALTHY*. + * ``UNHEALTHY``. */ TIMEOUT = 4, /** diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HealthStatusSet.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HealthStatusSet.ts new file mode 100644 index 000000000..c518192d7 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HealthStatusSet.ts @@ -0,0 +1,17 @@ +// Original file: deps/envoy-api/envoy/config/core/v3/health_check.proto + +import type { HealthStatus as _envoy_config_core_v3_HealthStatus } from '../../../../envoy/config/core/v3/HealthStatus'; + +export interface HealthStatusSet { + /** + * An order-independent set of health status. + */ + 'statuses'?: (_envoy_config_core_v3_HealthStatus | keyof typeof _envoy_config_core_v3_HealthStatus)[]; +} + +export interface HealthStatusSet__Output { + /** + * An order-independent set of health status. + */ + 'statuses': (keyof typeof _envoy_config_core_v3_HealthStatus)[]; +} diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Http1ProtocolOptions.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Http1ProtocolOptions.ts index 40b7408f6..d141a946c 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Http1ProtocolOptions.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Http1ProtocolOptions.ts @@ -52,27 +52,27 @@ export interface _envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_Prop } /** - * [#next-free-field: 8] + * [#next-free-field: 11] */ export interface Http1ProtocolOptions { /** * Handle HTTP requests with absolute URLs in the requests. These requests * are generally sent by clients to forward/explicit proxies. This allows clients to configure * envoy as their HTTP proxy. In Unix, for example, this is typically done by setting the - * *http_proxy* environment variable. + * ``http_proxy`` environment variable. */ 'allow_absolute_url'?: (_google_protobuf_BoolValue | null); /** * Handle incoming HTTP/1.0 and HTTP 0.9 requests. * This is off by default, and not fully standards compliant. There is support for pre-HTTP/1.1 * style connect logic, dechunking, and handling lack of client host iff - * *default_host_for_http_10* is configured. + * ``default_host_for_http_10`` is configured. */ 'accept_http_10'?: (boolean); /** - * A default host for HTTP/1.0 requests. This is highly suggested if *accept_http_10* is true as + * A default host for HTTP/1.0 requests. This is highly suggested if ``accept_http_10`` is true as * Envoy does not otherwise support HTTP/1.0 without a Host header. - * This is a no-op if *accept_http_10* is not true. + * This is a no-op if ``accept_http_10`` is not true. */ 'default_host_for_http_10'?: (string); /** @@ -93,14 +93,17 @@ export interface Http1ProtocolOptions { */ 'enable_trailers'?: (boolean); /** - * Allows Envoy to process requests/responses with both `Content-Length` and `Transfer-Encoding` + * Allows Envoy to process requests/responses with both ``Content-Length`` and ``Transfer-Encoding`` * headers set. By default such messages are rejected, but if option is enabled - Envoy will * remove Content-Length header and process message. - * See `RFC7230, sec. 3.3.3 ` for details. + * See `RFC7230, sec. 3.3.3 `_ for details. * * .. attention:: * Enabling this option might lead to request smuggling vulnerability, especially if traffic * is proxied via multiple layers of proxies. + * [#comment:TODO: This field is ignored when the + * :ref:`header validation configuration ` + * is present.] */ 'allow_chunked_length'?: (boolean); /** @@ -112,30 +115,60 @@ export interface Http1ProtocolOptions { * `. */ 'override_stream_error_on_invalid_http_message'?: (_google_protobuf_BoolValue | null); + /** + * Allows sending fully qualified URLs when proxying the first line of the + * response. By default, Envoy will only send the path components in the first line. + * If this is true, Envoy will create a fully qualified URI composing scheme + * (inferred if not present), host (from the host/:authority header) and path + * (from first line or :path header). + */ + 'send_fully_qualified_url'?: (boolean); + /** + * [#not-implemented-hide:] Hiding so that field can be removed after BalsaParser is rolled out. + * If set, force HTTP/1 parser: BalsaParser if true, http-parser if false. + * If unset, HTTP/1 parser is selected based on + * envoy.reloadable_features.http1_use_balsa_parser. + * See issue #21245. + */ + 'use_balsa_parser'?: (_google_protobuf_BoolValue | null); + /** + * [#not-implemented-hide:] Hiding so that field can be removed. + * If true, and BalsaParser is used (either `use_balsa_parser` above is true, + * or `envoy.reloadable_features.http1_use_balsa_parser` is true and + * `use_balsa_parser` is unset), then every non-empty method with only valid + * characters is accepted. Otherwise, methods not on the hard-coded list are + * rejected. + * Once UHV is enabled, this field should be removed, and BalsaParser should + * allow any method. UHV validates the method, rejecting empty string or + * invalid characters, and provides :ref:`restrict_http_methods + * ` + * to reject custom methods. + */ + 'allow_custom_methods'?: (boolean); } /** - * [#next-free-field: 8] + * [#next-free-field: 11] */ export interface Http1ProtocolOptions__Output { /** * Handle HTTP requests with absolute URLs in the requests. These requests * are generally sent by clients to forward/explicit proxies. This allows clients to configure * envoy as their HTTP proxy. In Unix, for example, this is typically done by setting the - * *http_proxy* environment variable. + * ``http_proxy`` environment variable. */ 'allow_absolute_url': (_google_protobuf_BoolValue__Output | null); /** * Handle incoming HTTP/1.0 and HTTP 0.9 requests. * This is off by default, and not fully standards compliant. There is support for pre-HTTP/1.1 * style connect logic, dechunking, and handling lack of client host iff - * *default_host_for_http_10* is configured. + * ``default_host_for_http_10`` is configured. */ 'accept_http_10': (boolean); /** - * A default host for HTTP/1.0 requests. This is highly suggested if *accept_http_10* is true as + * A default host for HTTP/1.0 requests. This is highly suggested if ``accept_http_10`` is true as * Envoy does not otherwise support HTTP/1.0 without a Host header. - * This is a no-op if *accept_http_10* is not true. + * This is a no-op if ``accept_http_10`` is not true. */ 'default_host_for_http_10': (string); /** @@ -156,14 +189,17 @@ export interface Http1ProtocolOptions__Output { */ 'enable_trailers': (boolean); /** - * Allows Envoy to process requests/responses with both `Content-Length` and `Transfer-Encoding` + * Allows Envoy to process requests/responses with both ``Content-Length`` and ``Transfer-Encoding`` * headers set. By default such messages are rejected, but if option is enabled - Envoy will * remove Content-Length header and process message. - * See `RFC7230, sec. 3.3.3 ` for details. + * See `RFC7230, sec. 3.3.3 `_ for details. * * .. attention:: * Enabling this option might lead to request smuggling vulnerability, especially if traffic * is proxied via multiple layers of proxies. + * [#comment:TODO: This field is ignored when the + * :ref:`header validation configuration ` + * is present.] */ 'allow_chunked_length': (boolean); /** @@ -175,4 +211,34 @@ export interface Http1ProtocolOptions__Output { * `. */ 'override_stream_error_on_invalid_http_message': (_google_protobuf_BoolValue__Output | null); + /** + * Allows sending fully qualified URLs when proxying the first line of the + * response. By default, Envoy will only send the path components in the first line. + * If this is true, Envoy will create a fully qualified URI composing scheme + * (inferred if not present), host (from the host/:authority header) and path + * (from first line or :path header). + */ + 'send_fully_qualified_url': (boolean); + /** + * [#not-implemented-hide:] Hiding so that field can be removed after BalsaParser is rolled out. + * If set, force HTTP/1 parser: BalsaParser if true, http-parser if false. + * If unset, HTTP/1 parser is selected based on + * envoy.reloadable_features.http1_use_balsa_parser. + * See issue #21245. + */ + 'use_balsa_parser': (_google_protobuf_BoolValue__Output | null); + /** + * [#not-implemented-hide:] Hiding so that field can be removed. + * If true, and BalsaParser is used (either `use_balsa_parser` above is true, + * or `envoy.reloadable_features.http1_use_balsa_parser` is true and + * `use_balsa_parser` is unset), then every non-empty method with only valid + * characters is accepted. Otherwise, methods not on the hard-coded list are + * rejected. + * Once UHV is enabled, this field should be removed, and BalsaParser should + * allow any method. UHV validates the method, rejecting empty string or + * invalid characters, and provides :ref:`restrict_http_methods + * ` + * to reject custom methods. + */ + 'allow_custom_methods': (boolean); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Http2ProtocolOptions.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Http2ProtocolOptions.ts index 786e2a00d..cc22ce44c 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Http2ProtocolOptions.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Http2ProtocolOptions.ts @@ -35,7 +35,7 @@ export interface _envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter__O } /** - * [#next-free-field: 16] + * [#next-free-field: 17] */ export interface Http2ProtocolOptions { /** @@ -74,8 +74,8 @@ export interface Http2ProtocolOptions { */ 'initial_stream_window_size'?: (_google_protobuf_UInt32Value | null); /** - * Similar to *initial_stream_window_size*, but for connection-level flow-control - * window. Currently, this has the same minimum/maximum/default as *initial_stream_window_size*. + * Similar to ``initial_stream_window_size``, but for connection-level flow-control + * window. Currently, this has the same minimum/maximum/default as ``initial_stream_window_size``. */ 'initial_connection_window_size'?: (_google_protobuf_UInt32Value | null); /** @@ -96,8 +96,6 @@ export interface Http2ProtocolOptions { * be written into the socket). Exceeding this limit triggers flood mitigation and connection is * terminated. The ``http2.outbound_flood`` stat tracks the number of terminated connections due * to flood mitigation. The default limit is 10000. - * NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - * `envoy.reloadable_features.upstream_http2_flood_checks` flag. */ 'max_outbound_frames'?: (_google_protobuf_UInt32Value | null); /** @@ -106,8 +104,6 @@ export interface Http2ProtocolOptions { * this limit triggers flood mitigation and connection is terminated. The * ``http2.outbound_control_flood`` stat tracks the number of terminated connections due to flood * mitigation. The default limit is 1000. - * NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - * `envoy.reloadable_features.upstream_http2_flood_checks` flag. */ 'max_outbound_control_frames'?: (_google_protobuf_UInt32Value | null); /** @@ -117,8 +113,6 @@ export interface Http2ProtocolOptions { * stat tracks the number of connections terminated due to flood mitigation. * Setting this to 0 will terminate connection upon receiving first frame with an empty payload * and no end stream flag. The default limit is 1. - * NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - * `envoy.reloadable_features.upstream_http2_flood_checks` flag. */ 'max_consecutive_inbound_frames_with_empty_payload'?: (_google_protobuf_UInt32Value | null); /** @@ -126,15 +120,13 @@ export interface Http2ProtocolOptions { * of PRIORITY frames received over the lifetime of connection exceeds the value calculated * using this formula:: * - * max_inbound_priority_frames_per_stream * (1 + opened_streams) + * ``max_inbound_priority_frames_per_stream`` * (1 + ``opened_streams``) * - * the connection is terminated. For downstream connections the `opened_streams` is incremented when + * the connection is terminated. For downstream connections the ``opened_streams`` is incremented when * Envoy receives complete response headers from the upstream server. For upstream connection the - * `opened_streams` is incremented when Envoy send the HEADERS frame for a new stream. The + * ``opened_streams`` is incremented when Envoy send the HEADERS frame for a new stream. The * ``http2.inbound_priority_frames_flood`` stat tracks * the number of connections terminated due to flood mitigation. The default limit is 100. - * NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - * `envoy.reloadable_features.upstream_http2_flood_checks` flag. */ 'max_inbound_priority_frames_per_stream'?: (_google_protobuf_UInt32Value | null); /** @@ -142,18 +134,16 @@ export interface Http2ProtocolOptions { * of WINDOW_UPDATE frames received over the lifetime of connection exceeds the value calculated * using this formula:: * - * 5 + 2 * (opened_streams + - * max_inbound_window_update_frames_per_data_frame_sent * outbound_data_frames) + * 5 + 2 * (``opened_streams`` + + * ``max_inbound_window_update_frames_per_data_frame_sent`` * ``outbound_data_frames``) * - * the connection is terminated. For downstream connections the `opened_streams` is incremented when + * the connection is terminated. For downstream connections the ``opened_streams`` is incremented when * Envoy receives complete response headers from the upstream server. For upstream connections the - * `opened_streams` is incremented when Envoy sends the HEADERS frame for a new stream. The + * ``opened_streams`` is incremented when Envoy sends the HEADERS frame for a new stream. The * ``http2.inbound_priority_frames_flood`` stat tracks the number of connections terminated due to * flood mitigation. The default max_inbound_window_update_frames_per_data_frame_sent value is 10. * Setting this to 1 should be enough to support HTTP/2 implementations with basic flow control, * but more complex implementations that try to estimate available bandwidth require at least 2. - * NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - * `envoy.reloadable_features.upstream_http2_flood_checks` flag. */ 'max_inbound_window_update_frames_per_data_frame_sent'?: (_google_protobuf_UInt32Value | null); /** @@ -216,10 +206,16 @@ export interface Http2ProtocolOptions { * does not respond within the configured timeout, the connection will be aborted. */ 'connection_keepalive'?: (_envoy_config_core_v3_KeepaliveSettings | null); + /** + * [#not-implemented-hide:] Hiding so that the field can be removed after oghttp2 is rolled out. + * If set, force use of a particular HTTP/2 codec: oghttp2 if true, nghttp2 if false. + * If unset, HTTP/2 codec is selected based on envoy.reloadable_features.http2_use_oghttp2. + */ + 'use_oghttp2_codec'?: (_google_protobuf_BoolValue | null); } /** - * [#next-free-field: 16] + * [#next-free-field: 17] */ export interface Http2ProtocolOptions__Output { /** @@ -258,8 +254,8 @@ export interface Http2ProtocolOptions__Output { */ 'initial_stream_window_size': (_google_protobuf_UInt32Value__Output | null); /** - * Similar to *initial_stream_window_size*, but for connection-level flow-control - * window. Currently, this has the same minimum/maximum/default as *initial_stream_window_size*. + * Similar to ``initial_stream_window_size``, but for connection-level flow-control + * window. Currently, this has the same minimum/maximum/default as ``initial_stream_window_size``. */ 'initial_connection_window_size': (_google_protobuf_UInt32Value__Output | null); /** @@ -280,8 +276,6 @@ export interface Http2ProtocolOptions__Output { * be written into the socket). Exceeding this limit triggers flood mitigation and connection is * terminated. The ``http2.outbound_flood`` stat tracks the number of terminated connections due * to flood mitigation. The default limit is 10000. - * NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - * `envoy.reloadable_features.upstream_http2_flood_checks` flag. */ 'max_outbound_frames': (_google_protobuf_UInt32Value__Output | null); /** @@ -290,8 +284,6 @@ export interface Http2ProtocolOptions__Output { * this limit triggers flood mitigation and connection is terminated. The * ``http2.outbound_control_flood`` stat tracks the number of terminated connections due to flood * mitigation. The default limit is 1000. - * NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - * `envoy.reloadable_features.upstream_http2_flood_checks` flag. */ 'max_outbound_control_frames': (_google_protobuf_UInt32Value__Output | null); /** @@ -301,8 +293,6 @@ export interface Http2ProtocolOptions__Output { * stat tracks the number of connections terminated due to flood mitigation. * Setting this to 0 will terminate connection upon receiving first frame with an empty payload * and no end stream flag. The default limit is 1. - * NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - * `envoy.reloadable_features.upstream_http2_flood_checks` flag. */ 'max_consecutive_inbound_frames_with_empty_payload': (_google_protobuf_UInt32Value__Output | null); /** @@ -310,15 +300,13 @@ export interface Http2ProtocolOptions__Output { * of PRIORITY frames received over the lifetime of connection exceeds the value calculated * using this formula:: * - * max_inbound_priority_frames_per_stream * (1 + opened_streams) + * ``max_inbound_priority_frames_per_stream`` * (1 + ``opened_streams``) * - * the connection is terminated. For downstream connections the `opened_streams` is incremented when + * the connection is terminated. For downstream connections the ``opened_streams`` is incremented when * Envoy receives complete response headers from the upstream server. For upstream connection the - * `opened_streams` is incremented when Envoy send the HEADERS frame for a new stream. The + * ``opened_streams`` is incremented when Envoy send the HEADERS frame for a new stream. The * ``http2.inbound_priority_frames_flood`` stat tracks * the number of connections terminated due to flood mitigation. The default limit is 100. - * NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - * `envoy.reloadable_features.upstream_http2_flood_checks` flag. */ 'max_inbound_priority_frames_per_stream': (_google_protobuf_UInt32Value__Output | null); /** @@ -326,18 +314,16 @@ export interface Http2ProtocolOptions__Output { * of WINDOW_UPDATE frames received over the lifetime of connection exceeds the value calculated * using this formula:: * - * 5 + 2 * (opened_streams + - * max_inbound_window_update_frames_per_data_frame_sent * outbound_data_frames) + * 5 + 2 * (``opened_streams`` + + * ``max_inbound_window_update_frames_per_data_frame_sent`` * ``outbound_data_frames``) * - * the connection is terminated. For downstream connections the `opened_streams` is incremented when + * the connection is terminated. For downstream connections the ``opened_streams`` is incremented when * Envoy receives complete response headers from the upstream server. For upstream connections the - * `opened_streams` is incremented when Envoy sends the HEADERS frame for a new stream. The + * ``opened_streams`` is incremented when Envoy sends the HEADERS frame for a new stream. The * ``http2.inbound_priority_frames_flood`` stat tracks the number of connections terminated due to * flood mitigation. The default max_inbound_window_update_frames_per_data_frame_sent value is 10. * Setting this to 1 should be enough to support HTTP/2 implementations with basic flow control, * but more complex implementations that try to estimate available bandwidth require at least 2. - * NOTE: flood and abuse mitigation for upstream connections is presently enabled by the - * `envoy.reloadable_features.upstream_http2_flood_checks` flag. */ 'max_inbound_window_update_frames_per_data_frame_sent': (_google_protobuf_UInt32Value__Output | null); /** @@ -400,4 +386,10 @@ export interface Http2ProtocolOptions__Output { * does not respond within the configured timeout, the connection will be aborted. */ 'connection_keepalive': (_envoy_config_core_v3_KeepaliveSettings__Output | null); + /** + * [#not-implemented-hide:] Hiding so that the field can be removed after oghttp2 is rolled out. + * If set, force use of a particular HTTP/2 codec: oghttp2 if true, nghttp2 if false. + * If unset, HTTP/2 codec is selected based on envoy.reloadable_features.http2_use_oghttp2. + */ + 'use_oghttp2_codec': (_google_protobuf_BoolValue__Output | null); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HttpProtocolOptions.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HttpProtocolOptions.ts index 34a4053dd..a3064110f 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HttpProtocolOptions.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HttpProtocolOptions.ts @@ -24,7 +24,7 @@ export enum _envoy_config_core_v3_HttpProtocolOptions_HeadersWithUnderscoresActi */ REJECT_REQUEST = 1, /** - * Drop the header with name containing underscores. The header is dropped before the filter chain is + * Drop the client header with name containing underscores. The header is dropped before the filter chain is * invoked and as such filters will not see dropped headers. The * "httpN.dropped_headers_with_underscores" is incremented for each dropped header. */ @@ -63,11 +63,10 @@ export interface HttpProtocolOptions { /** * The maximum duration of a connection. The duration is defined as a period since a connection * was established. If not set, there is no max duration. When max_connection_duration is reached - * and if there are no active streams, the connection will be closed. If there are any active streams, - * the drain sequence will kick-in, and the connection will be force-closed after the drain period. - * See :ref:`drain_timeout + * and if there are no active streams, the connection will be closed. If the connection is a + * downstream connection and there are any active streams, the drain sequence will kick-in, + * and the connection will be force-closed after the drain period. See :ref:`drain_timeout * `. - * Note: This feature is not yet implemented for the upstream connections. */ 'max_connection_duration'?: (_google_protobuf_Duration | null); /** @@ -79,6 +78,8 @@ export interface HttpProtocolOptions { * Action to take when a client request with a header name containing underscore characters is received. * If this setting is not specified, the value defaults to ALLOW. * Note: upstream responses are not affected by this setting. + * Note: this only affects client headers. It does not affect headers added + * by Envoy filters and does not have any impact if added to cluster config. */ 'headers_with_underscores_action'?: (_envoy_config_core_v3_HttpProtocolOptions_HeadersWithUnderscoresAction | keyof typeof _envoy_config_core_v3_HttpProtocolOptions_HeadersWithUnderscoresAction); /** @@ -122,11 +123,10 @@ export interface HttpProtocolOptions__Output { /** * The maximum duration of a connection. The duration is defined as a period since a connection * was established. If not set, there is no max duration. When max_connection_duration is reached - * and if there are no active streams, the connection will be closed. If there are any active streams, - * the drain sequence will kick-in, and the connection will be force-closed after the drain period. - * See :ref:`drain_timeout + * and if there are no active streams, the connection will be closed. If the connection is a + * downstream connection and there are any active streams, the drain sequence will kick-in, + * and the connection will be force-closed after the drain period. See :ref:`drain_timeout * `. - * Note: This feature is not yet implemented for the upstream connections. */ 'max_connection_duration': (_google_protobuf_Duration__Output | null); /** @@ -138,6 +138,8 @@ export interface HttpProtocolOptions__Output { * Action to take when a client request with a header name containing underscore characters is received. * If this setting is not specified, the value defaults to ALLOW. * Note: upstream responses are not affected by this setting. + * Note: this only affects client headers. It does not affect headers added + * by Envoy filters and does not have any impact if added to cluster config. */ 'headers_with_underscores_action': (keyof typeof _envoy_config_core_v3_HttpProtocolOptions_HeadersWithUnderscoresAction); /** diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HttpUri.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HttpUri.ts index 0bac9ac51..9a06ba477 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HttpUri.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/HttpUri.ts @@ -32,7 +32,7 @@ export interface HttpUri { */ 'timeout'?: (_google_protobuf_Duration | null); /** - * Specify how `uri` is to be fetched. Today, this requires an explicit + * Specify how ``uri`` is to be fetched. Today, this requires an explicit * cluster, but in the future we may support dynamic cluster creation or * inline DNS resolution. See `issue * `_. @@ -70,7 +70,7 @@ export interface HttpUri__Output { */ 'timeout': (_google_protobuf_Duration__Output | null); /** - * Specify how `uri` is to be fetched. Today, this requires an explicit + * Specify how ``uri`` is to be fetched. Today, this requires an explicit * cluster, but in the future we may support dynamic cluster creation or * inline DNS resolution. See `issue * `_. diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/KeepaliveSettings.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/KeepaliveSettings.ts index 2c274c6e1..2d2ef0787 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/KeepaliveSettings.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/KeepaliveSettings.ts @@ -11,7 +11,9 @@ export interface KeepaliveSettings { 'interval'?: (_google_protobuf_Duration | null); /** * How long to wait for a response to a keepalive PING. If a response is not received within this - * time period, the connection will be aborted. + * time period, the connection will be aborted. Note that in order to prevent the influence of + * Head-of-line (HOL) blocking the timeout period is extended when *any* frame is received on + * the connection, under the assumption that if a frame is received the connection is healthy. */ 'timeout'?: (_google_protobuf_Duration | null); /** @@ -26,6 +28,8 @@ export interface KeepaliveSettings { * If this is zero, this type of PING will not be sent. * If an interval ping is outstanding, a second ping will not be sent as the * interval ping will determine if the connection is dead. + * + * The same feature for HTTP/3 is given by inheritance from QUICHE which uses :ref:`connection idle_timeout ` and the current PTO of the connection to decide whether to probe before sending a new request. */ 'connection_idle_interval'?: (_google_protobuf_Duration | null); } @@ -38,7 +42,9 @@ export interface KeepaliveSettings__Output { 'interval': (_google_protobuf_Duration__Output | null); /** * How long to wait for a response to a keepalive PING. If a response is not received within this - * time period, the connection will be aborted. + * time period, the connection will be aborted. Note that in order to prevent the influence of + * Head-of-line (HOL) blocking the timeout period is extended when *any* frame is received on + * the connection, under the assumption that if a frame is received the connection is healthy. */ 'timeout': (_google_protobuf_Duration__Output | null); /** @@ -53,6 +59,8 @@ export interface KeepaliveSettings__Output { * If this is zero, this type of PING will not be sent. * If an interval ping is outstanding, a second ping will not be sent as the * interval ping will determine if the connection is dead. + * + * The same feature for HTTP/3 is given by inheritance from QUICHE which uses :ref:`connection idle_timeout ` and the current PTO of the connection to decide whether to probe before sending a new request. */ 'connection_idle_interval': (_google_protobuf_Duration__Output | null); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Metadata.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Metadata.ts index fb603c2ba..2bcd3ce36 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Metadata.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Metadata.ts @@ -29,21 +29,21 @@ import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__ */ export interface Metadata { /** - * Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* + * Key is the reverse DNS filter name, e.g. com.acme.widget. The ``envoy.*`` * namespace is reserved for Envoy's built-in filters. - * If both *filter_metadata* and + * If both ``filter_metadata`` and * :ref:`typed_filter_metadata ` * fields are present in the metadata with same keys, - * only *typed_filter_metadata* field will be parsed. + * only ``typed_filter_metadata`` field will be parsed. */ 'filter_metadata'?: ({[key: string]: _google_protobuf_Struct}); /** - * Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* + * Key is the reverse DNS filter name, e.g. com.acme.widget. The ``envoy.*`` * namespace is reserved for Envoy's built-in filters. * The value is encoded as google.protobuf.Any. * If both :ref:`filter_metadata ` - * and *typed_filter_metadata* fields are present in the metadata with same keys, - * only *typed_filter_metadata* field will be parsed. + * and ``typed_filter_metadata`` fields are present in the metadata with same keys, + * only ``typed_filter_metadata`` field will be parsed. */ 'typed_filter_metadata'?: ({[key: string]: _google_protobuf_Any}); } @@ -74,21 +74,21 @@ export interface Metadata { */ export interface Metadata__Output { /** - * Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* + * Key is the reverse DNS filter name, e.g. com.acme.widget. The ``envoy.*`` * namespace is reserved for Envoy's built-in filters. - * If both *filter_metadata* and + * If both ``filter_metadata`` and * :ref:`typed_filter_metadata ` * fields are present in the metadata with same keys, - * only *typed_filter_metadata* field will be parsed. + * only ``typed_filter_metadata`` field will be parsed. */ 'filter_metadata': ({[key: string]: _google_protobuf_Struct__Output}); /** - * Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* + * Key is the reverse DNS filter name, e.g. com.acme.widget. The ``envoy.*`` * namespace is reserved for Envoy's built-in filters. * The value is encoded as google.protobuf.Any. * If both :ref:`filter_metadata ` - * and *typed_filter_metadata* fields are present in the metadata with same keys, - * only *typed_filter_metadata* field will be parsed. + * and ``typed_filter_metadata`` fields are present in the metadata with same keys, + * only ``typed_filter_metadata`` field will be parsed. */ 'typed_filter_metadata': ({[key: string]: _google_protobuf_Any__Output}); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Node.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Node.ts index addd47a68..6aef94d8e 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Node.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/Node.ts @@ -68,7 +68,7 @@ export interface Node { /** * Client feature support list. These are well known features described * in the Envoy API repository for a given major version of an API. Client features - * use reverse DNS naming scheme, for example `com.acme.feature`. + * use reverse DNS naming scheme, for example ``com.acme.feature``. * See :ref:`the list of features ` that xDS client may * support. */ @@ -77,7 +77,7 @@ export interface Node { * Known listening ports on the node as a generic hint to the management server * for filtering :ref:`listeners ` to be returned. For example, * if there is a listener bound to port 80, the list can optionally contain the - * SocketAddress `(0.0.0.0,80)`. The field is optional and just a hint. + * SocketAddress ``(0.0.0.0,80)``. The field is optional and just a hint. */ 'listening_addresses'?: (_envoy_config_core_v3_Address)[]; /** @@ -152,7 +152,7 @@ export interface Node__Output { /** * Client feature support list. These are well known features described * in the Envoy API repository for a given major version of an API. Client features - * use reverse DNS naming scheme, for example `com.acme.feature`. + * use reverse DNS naming scheme, for example ``com.acme.feature``. * See :ref:`the list of features ` that xDS client may * support. */ @@ -161,7 +161,7 @@ export interface Node__Output { * Known listening ports on the node as a generic hint to the management server * for filtering :ref:`listeners ` to be returned. For example, * if there is a listener bound to port 80, the list can optionally contain the - * SocketAddress `(0.0.0.0,80)`. The field is optional and just a hint. + * SocketAddress ``(0.0.0.0,80)``. The field is optional and just a hint. */ 'listening_addresses': (_envoy_config_core_v3_Address__Output)[]; /** diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/PathConfigSource.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/PathConfigSource.ts new file mode 100644 index 000000000..e620f8c52 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/PathConfigSource.ts @@ -0,0 +1,85 @@ +// Original file: deps/envoy-api/envoy/config/core/v3/config_source.proto + +import type { WatchedDirectory as _envoy_config_core_v3_WatchedDirectory, WatchedDirectory__Output as _envoy_config_core_v3_WatchedDirectory__Output } from '../../../../envoy/config/core/v3/WatchedDirectory'; + +/** + * Local filesystem path configuration source. + */ +export interface PathConfigSource { + /** + * Path on the filesystem to source and watch for configuration updates. + * When sourcing configuration for a :ref:`secret `, + * the certificate and key files are also watched for updates. + * + * .. note:: + * + * The path to the source must exist at config load time. + * + * .. note:: + * + * If ``watched_directory`` is *not* configured, Envoy will watch the file path for *moves*. + * This is because in general only moves are atomic. The same method of swapping files as is + * demonstrated in the :ref:`runtime documentation ` can be + * used here also. If ``watched_directory`` is configured, no watch will be placed directly on + * this path. Instead, the configured ``watched_directory`` will be used to trigger reloads of + * this path. This is required in certain deployment scenarios. See below for more information. + */ + 'path'?: (string); + /** + * If configured, this directory will be watched for *moves*. When an entry in this directory is + * moved to, the ``path`` will be reloaded. This is required in certain deployment scenarios. + * + * Specifically, if trying to load an xDS resource using a + * `Kubernetes ConfigMap `_, the + * following configuration might be used: + * 1. Store xds.yaml inside a ConfigMap. + * 2. Mount the ConfigMap to ``/config_map/xds`` + * 3. Configure path ``/config_map/xds/xds.yaml`` + * 4. Configure watched directory ``/config_map/xds`` + * + * The above configuration will ensure that Envoy watches the owning directory for moves which is + * required due to how Kubernetes manages ConfigMap symbolic links during atomic updates. + */ + 'watched_directory'?: (_envoy_config_core_v3_WatchedDirectory | null); +} + +/** + * Local filesystem path configuration source. + */ +export interface PathConfigSource__Output { + /** + * Path on the filesystem to source and watch for configuration updates. + * When sourcing configuration for a :ref:`secret `, + * the certificate and key files are also watched for updates. + * + * .. note:: + * + * The path to the source must exist at config load time. + * + * .. note:: + * + * If ``watched_directory`` is *not* configured, Envoy will watch the file path for *moves*. + * This is because in general only moves are atomic. The same method of swapping files as is + * demonstrated in the :ref:`runtime documentation ` can be + * used here also. If ``watched_directory`` is configured, no watch will be placed directly on + * this path. Instead, the configured ``watched_directory`` will be used to trigger reloads of + * this path. This is required in certain deployment scenarios. See below for more information. + */ + 'path': (string); + /** + * If configured, this directory will be watched for *moves*. When an entry in this directory is + * moved to, the ``path`` will be reloaded. This is required in certain deployment scenarios. + * + * Specifically, if trying to load an xDS resource using a + * `Kubernetes ConfigMap `_, the + * following configuration might be used: + * 1. Store xds.yaml inside a ConfigMap. + * 2. Mount the ConfigMap to ``/config_map/xds`` + * 3. Configure path ``/config_map/xds/xds.yaml`` + * 4. Configure watched directory ``/config_map/xds`` + * + * The above configuration will ensure that Envoy watches the owning directory for moves which is + * required due to how Kubernetes manages ConfigMap symbolic links during atomic updates. + */ + 'watched_directory': (_envoy_config_core_v3_WatchedDirectory__Output | null); +} diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ProxyProtocolConfig.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ProxyProtocolConfig.ts index a28de2dbe..7da9d569e 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ProxyProtocolConfig.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ProxyProtocolConfig.ts @@ -1,5 +1,6 @@ // Original file: deps/envoy-api/envoy/config/core/v3/proxy_protocol.proto +import type { ProxyProtocolPassThroughTLVs as _envoy_config_core_v3_ProxyProtocolPassThroughTLVs, ProxyProtocolPassThroughTLVs__Output as _envoy_config_core_v3_ProxyProtocolPassThroughTLVs__Output } from '../../../../envoy/config/core/v3/ProxyProtocolPassThroughTLVs'; // Original file: deps/envoy-api/envoy/config/core/v3/proxy_protocol.proto @@ -19,6 +20,11 @@ export interface ProxyProtocolConfig { * The PROXY protocol version to use. See https://www.haproxy.org/download/2.1/doc/proxy-protocol.txt for details */ 'version'?: (_envoy_config_core_v3_ProxyProtocolConfig_Version | keyof typeof _envoy_config_core_v3_ProxyProtocolConfig_Version); + /** + * This config controls which TLVs can be passed to upstream if it is Proxy Protocol + * V2 header. If there is no setting for this field, no TLVs will be passed through. + */ + 'pass_through_tlvs'?: (_envoy_config_core_v3_ProxyProtocolPassThroughTLVs | null); } export interface ProxyProtocolConfig__Output { @@ -26,4 +32,9 @@ export interface ProxyProtocolConfig__Output { * The PROXY protocol version to use. See https://www.haproxy.org/download/2.1/doc/proxy-protocol.txt for details */ 'version': (keyof typeof _envoy_config_core_v3_ProxyProtocolConfig_Version); + /** + * This config controls which TLVs can be passed to upstream if it is Proxy Protocol + * V2 header. If there is no setting for this field, no TLVs will be passed through. + */ + 'pass_through_tlvs': (_envoy_config_core_v3_ProxyProtocolPassThroughTLVs__Output | null); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ProxyProtocolPassThroughTLVs.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ProxyProtocolPassThroughTLVs.ts new file mode 100644 index 000000000..0dddbf79f --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/ProxyProtocolPassThroughTLVs.ts @@ -0,0 +1,43 @@ +// Original file: deps/envoy-api/envoy/config/core/v3/proxy_protocol.proto + + +// Original file: deps/envoy-api/envoy/config/core/v3/proxy_protocol.proto + +export enum _envoy_config_core_v3_ProxyProtocolPassThroughTLVs_PassTLVsMatchType { + /** + * Pass all TLVs. + */ + INCLUDE_ALL = 0, + /** + * Pass specific TLVs defined in tlv_type. + */ + INCLUDE = 1, +} + +export interface ProxyProtocolPassThroughTLVs { + /** + * The strategy to pass through TLVs. Default is INCLUDE_ALL. + * If INCLUDE_ALL is set, all TLVs will be passed through no matter the tlv_type field. + */ + 'match_type'?: (_envoy_config_core_v3_ProxyProtocolPassThroughTLVs_PassTLVsMatchType | keyof typeof _envoy_config_core_v3_ProxyProtocolPassThroughTLVs_PassTLVsMatchType); + /** + * The TLV types that are applied based on match_type. + * TLV type is defined as uint8_t in proxy protocol. See `the spec + * `_ for details. + */ + 'tlv_type'?: (number)[]; +} + +export interface ProxyProtocolPassThroughTLVs__Output { + /** + * The strategy to pass through TLVs. Default is INCLUDE_ALL. + * If INCLUDE_ALL is set, all TLVs will be passed through no matter the tlv_type field. + */ + 'match_type': (keyof typeof _envoy_config_core_v3_ProxyProtocolPassThroughTLVs_PassTLVsMatchType); + /** + * The TLV types that are applied based on match_type. + * TLV type is defined as uint8_t in proxy protocol. See `the spec + * `_ for details. + */ + 'tlv_type': (number)[]; +} diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/QuicKeepAliveSettings.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/QuicKeepAliveSettings.ts new file mode 100644 index 000000000..2bb2aa872 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/QuicKeepAliveSettings.ts @@ -0,0 +1,53 @@ +// Original file: deps/envoy-api/envoy/config/core/v3/protocol.proto + +import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../../google/protobuf/Duration'; + +/** + * Config for keepalive probes in a QUIC connection. + * Note that QUIC keep-alive probing packets work differently from HTTP/2 keep-alive PINGs in a sense that the probing packet + * itself doesn't timeout waiting for a probing response. Quic has a shorter idle timeout than TCP, so it doesn't rely on such probing to discover dead connections. If the peer fails to respond, the connection will idle timeout eventually. Thus, they are configured differently from :ref:`connection_keepalive `. + */ +export interface QuicKeepAliveSettings { + /** + * The max interval for a connection to send keep-alive probing packets (with PING or PATH_RESPONSE). The value should be smaller than :ref:`connection idle_timeout ` to prevent idle timeout while not less than 1s to avoid throttling the connection or flooding the peer with probes. + * + * If :ref:`initial_interval ` is absent or zero, a client connection will use this value to start probing. + * + * If zero, disable keepalive probing. + * If absent, use the QUICHE default interval to probe. + */ + 'max_interval'?: (_google_protobuf_Duration | null); + /** + * The interval to send the first few keep-alive probing packets to prevent connection from hitting the idle timeout. Subsequent probes will be sent, each one with an interval exponentially longer than previous one, till it reaches :ref:`max_interval `. And the probes afterwards will always use :ref:`max_interval `. + * + * The value should be smaller than :ref:`connection idle_timeout ` to prevent idle timeout and smaller than max_interval to take effect. + * + * If absent or zero, disable keepalive probing for a server connection. For a client connection, if :ref:`max_interval ` is also zero, do not keepalive, otherwise use max_interval or QUICHE default to probe all the time. + */ + 'initial_interval'?: (_google_protobuf_Duration | null); +} + +/** + * Config for keepalive probes in a QUIC connection. + * Note that QUIC keep-alive probing packets work differently from HTTP/2 keep-alive PINGs in a sense that the probing packet + * itself doesn't timeout waiting for a probing response. Quic has a shorter idle timeout than TCP, so it doesn't rely on such probing to discover dead connections. If the peer fails to respond, the connection will idle timeout eventually. Thus, they are configured differently from :ref:`connection_keepalive `. + */ +export interface QuicKeepAliveSettings__Output { + /** + * The max interval for a connection to send keep-alive probing packets (with PING or PATH_RESPONSE). The value should be smaller than :ref:`connection idle_timeout ` to prevent idle timeout while not less than 1s to avoid throttling the connection or flooding the peer with probes. + * + * If :ref:`initial_interval ` is absent or zero, a client connection will use this value to start probing. + * + * If zero, disable keepalive probing. + * If absent, use the QUICHE default interval to probe. + */ + 'max_interval': (_google_protobuf_Duration__Output | null); + /** + * The interval to send the first few keep-alive probing packets to prevent connection from hitting the idle timeout. Subsequent probes will be sent, each one with an interval exponentially longer than previous one, till it reaches :ref:`max_interval `. And the probes afterwards will always use :ref:`max_interval `. + * + * The value should be smaller than :ref:`connection idle_timeout ` to prevent idle timeout and smaller than max_interval to take effect. + * + * If absent or zero, disable keepalive probing for a server connection. For a client connection, if :ref:`max_interval ` is also zero, do not keepalive, otherwise use max_interval or QUICHE default to probe all the time. + */ + 'initial_interval': (_google_protobuf_Duration__Output | null); +} diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/QuicProtocolOptions.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/QuicProtocolOptions.ts index 6a653b54d..b33feab51 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/QuicProtocolOptions.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/QuicProtocolOptions.ts @@ -1,9 +1,11 @@ // Original file: deps/envoy-api/envoy/config/core/v3/protocol.proto import type { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; +import type { QuicKeepAliveSettings as _envoy_config_core_v3_QuicKeepAliveSettings, QuicKeepAliveSettings__Output as _envoy_config_core_v3_QuicKeepAliveSettings__Output } from '../../../../envoy/config/core/v3/QuicKeepAliveSettings'; /** * QUIC protocol options which apply to both downstream and upstream connections. + * [#next-free-field: 6] */ export interface QuicProtocolOptions { /** @@ -25,18 +27,31 @@ export interface QuicProtocolOptions { */ 'initial_stream_window_size'?: (_google_protobuf_UInt32Value | null); /** - * Similar to *initial_stream_window_size*, but for connection-level + * Similar to ``initial_stream_window_size``, but for connection-level * flow-control. Valid values rage from 1 to 25165824 (24MB, maximum supported by QUICHE) and defaults to 65536 (2^16). - * window. Currently, this has the same minimum/default as *initial_stream_window_size*. + * window. Currently, this has the same minimum/default as ``initial_stream_window_size``. * * NOTE: 16384 (2^14) is the minimum window size supported in Google QUIC. We only support increasing the default * window size now, so it's also the minimum. */ 'initial_connection_window_size'?: (_google_protobuf_UInt32Value | null); + /** + * The number of timeouts that can occur before port migration is triggered for QUIC clients. + * This defaults to 1. If set to 0, port migration will not occur on path degrading. + * Timeout here refers to QUIC internal path degrading timeout mechanism, such as PTO. + * This has no effect on server sessions. + */ + 'num_timeouts_to_trigger_port_migration'?: (_google_protobuf_UInt32Value | null); + /** + * Probes the peer at the configured interval to solicit traffic, i.e. ACK or PATH_RESPONSE, from the peer to push back connection idle timeout. + * If absent, use the default keepalive behavior of which a client connection sends PINGs every 15s, and a server connection doesn't do anything. + */ + 'connection_keepalive'?: (_envoy_config_core_v3_QuicKeepAliveSettings | null); } /** * QUIC protocol options which apply to both downstream and upstream connections. + * [#next-free-field: 6] */ export interface QuicProtocolOptions__Output { /** @@ -58,12 +73,24 @@ export interface QuicProtocolOptions__Output { */ 'initial_stream_window_size': (_google_protobuf_UInt32Value__Output | null); /** - * Similar to *initial_stream_window_size*, but for connection-level + * Similar to ``initial_stream_window_size``, but for connection-level * flow-control. Valid values rage from 1 to 25165824 (24MB, maximum supported by QUICHE) and defaults to 65536 (2^16). - * window. Currently, this has the same minimum/default as *initial_stream_window_size*. + * window. Currently, this has the same minimum/default as ``initial_stream_window_size``. * * NOTE: 16384 (2^14) is the minimum window size supported in Google QUIC. We only support increasing the default * window size now, so it's also the minimum. */ 'initial_connection_window_size': (_google_protobuf_UInt32Value__Output | null); + /** + * The number of timeouts that can occur before port migration is triggered for QUIC clients. + * This defaults to 1. If set to 0, port migration will not occur on path degrading. + * Timeout here refers to QUIC internal path degrading timeout mechanism, such as PTO. + * This has no effect on server sessions. + */ + 'num_timeouts_to_trigger_port_migration': (_google_protobuf_UInt32Value__Output | null); + /** + * Probes the peer at the configured interval to solicit traffic, i.e. ACK or PATH_RESPONSE, from the peer to push back connection idle timeout. + * If absent, use the default keepalive behavior of which a client connection sends PINGs every 15s, and a server connection doesn't do anything. + */ + 'connection_keepalive': (_envoy_config_core_v3_QuicKeepAliveSettings__Output | null); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/RuntimeFractionalPercent.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/RuntimeFractionalPercent.ts index 3a2073294..d976b4375 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/RuntimeFractionalPercent.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/RuntimeFractionalPercent.ts @@ -12,7 +12,7 @@ import type { FractionalPercent as _envoy_type_v3_FractionalPercent, FractionalP * :ref:`FractionalPercent ` proto represented as JSON/YAML * and may also be represented as an integer with the assumption that the value is an integral * percentage out of 100. For instance, a runtime key lookup returning the value "42" would parse - * as a `FractionalPercent` whose numerator is 42 and denominator is HUNDRED. + * as a ``FractionalPercent`` whose numerator is 42 and denominator is HUNDRED. */ export interface RuntimeFractionalPercent { /** @@ -35,7 +35,7 @@ export interface RuntimeFractionalPercent { * :ref:`FractionalPercent ` proto represented as JSON/YAML * and may also be represented as an integer with the assumption that the value is an integral * percentage out of 100. For instance, a runtime key lookup returning the value "42" would parse - * as a `FractionalPercent` whose numerator is 42 and denominator is HUNDRED. + * as a ``FractionalPercent`` whose numerator is 42 and denominator is HUNDRED. */ export interface RuntimeFractionalPercent__Output { /** diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/SocketAddress.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/SocketAddress.ts index 3966dc04c..ae87b9edd 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/SocketAddress.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/SocketAddress.ts @@ -22,8 +22,8 @@ export interface SocketAddress { * within an upstream :ref:`BindConfig `, the address * controls the source address of outbound connections. For :ref:`clusters * `, the cluster type determines whether the - * address must be an IP (*STATIC* or *EDS* clusters) or a hostname resolved by DNS - * (*STRICT_DNS* or *LOGICAL_DNS* clusters). Address resolution can be customized + * address must be an IP (``STATIC`` or ``EDS`` clusters) or a hostname resolved by DNS + * (``STRICT_DNS`` or ``LOGICAL_DNS`` clusters). Address resolution can be customized * via :ref:`resolver_name `. */ 'address'?: (string); @@ -39,7 +39,7 @@ export interface SocketAddress { * this is empty, a context dependent default applies. If the address is a concrete * IP address, no resolution will occur. If address is a hostname this * should be set for resolution other than DNS. Specifying a custom resolver with - * *STRICT_DNS* or *LOGICAL_DNS* will generate an error at runtime. + * ``STRICT_DNS`` or ``LOGICAL_DNS`` will generate an error at runtime. */ 'resolver_name'?: (string); /** @@ -66,8 +66,8 @@ export interface SocketAddress__Output { * within an upstream :ref:`BindConfig `, the address * controls the source address of outbound connections. For :ref:`clusters * `, the cluster type determines whether the - * address must be an IP (*STATIC* or *EDS* clusters) or a hostname resolved by DNS - * (*STRICT_DNS* or *LOGICAL_DNS* clusters). Address resolution can be customized + * address must be an IP (``STATIC`` or ``EDS`` clusters) or a hostname resolved by DNS + * (``STRICT_DNS`` or ``LOGICAL_DNS`` clusters). Address resolution can be customized * via :ref:`resolver_name `. */ 'address': (string); @@ -83,7 +83,7 @@ export interface SocketAddress__Output { * this is empty, a context dependent default applies. If the address is a concrete * IP address, no resolution will occur. If address is a hostname this * should be set for resolution other than DNS. Specifying a custom resolver with - * *STRICT_DNS* or *LOGICAL_DNS* will generate an error at runtime. + * ``STRICT_DNS`` or ``LOGICAL_DNS`` will generate an error at runtime. */ 'resolver_name': (string); /** diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/SocketOption.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/SocketOption.ts index 56f13c339..edff50a63 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/SocketOption.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/SocketOption.ts @@ -22,6 +22,26 @@ export enum _envoy_config_core_v3_SocketOption_SocketState { /** * Generic socket option message. This would be used to set socket options that * might not exist in upstream kernels or precompiled Envoy binaries. + * + * For example: + * + * .. code-block:: json + * + * { + * "description": "support tcp keep alive", + * "state": 0, + * "level": 1, + * "name": 9, + * "int_value": 1, + * } + * + * 1 means SOL_SOCKET and 9 means SO_KEEPALIVE on Linux. + * With the above configuration, `TCP Keep-Alives `_ + * can be enabled in socket with Linux, which can be used in + * :ref:`listener's` or + * :ref:`admin's ` socket_options etc. + * + * It should be noted that the name or level may have different values on different platforms. * [#next-free-field: 7] */ export interface SocketOption { @@ -57,6 +77,26 @@ export interface SocketOption { /** * Generic socket option message. This would be used to set socket options that * might not exist in upstream kernels or precompiled Envoy binaries. + * + * For example: + * + * .. code-block:: json + * + * { + * "description": "support tcp keep alive", + * "state": 0, + * "level": 1, + * "name": 9, + * "int_value": 1, + * } + * + * 1 means SOL_SOCKET and 9 means SO_KEEPALIVE on Linux. + * With the above configuration, `TCP Keep-Alives `_ + * can be enabled in socket with Linux, which can be used in + * :ref:`listener's` or + * :ref:`admin's ` socket_options etc. + * + * It should be noted that the name or level may have different values on different platforms. * [#next-free-field: 7] */ export interface SocketOption__Output { diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/SocketOptionsOverride.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/SocketOptionsOverride.ts new file mode 100644 index 000000000..5df984579 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/SocketOptionsOverride.ts @@ -0,0 +1,11 @@ +// Original file: deps/envoy-api/envoy/config/core/v3/socket_option.proto + +import type { SocketOption as _envoy_config_core_v3_SocketOption, SocketOption__Output as _envoy_config_core_v3_SocketOption__Output } from '../../../../envoy/config/core/v3/SocketOption'; + +export interface SocketOptionsOverride { + 'socket_options'?: (_envoy_config_core_v3_SocketOption)[]; +} + +export interface SocketOptionsOverride__Output { + 'socket_options': (_envoy_config_core_v3_SocketOption__Output)[]; +} diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/SubstitutionFormatString.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/SubstitutionFormatString.ts index a935fc1ec..be0237e38 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/SubstitutionFormatString.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/SubstitutionFormatString.ts @@ -63,9 +63,9 @@ export interface SubstitutionFormatString { */ 'omit_empty_values'?: (boolean); /** - * Specify a *content_type* field. - * If this field is not set then ``text/plain`` is used for *text_format* and - * ``application/json`` is used for *json_format*. + * Specify a ``content_type`` field. + * If this field is not set then ``text/plain`` is used for ``text_format`` and + * ``application/json`` is used for ``json_format``. * * .. validated-code-block:: yaml * :type-name: envoy.config.core.v3.SubstitutionFormatString @@ -160,9 +160,9 @@ export interface SubstitutionFormatString__Output { */ 'omit_empty_values': (boolean); /** - * Specify a *content_type* field. - * If this field is not set then ``text/plain`` is used for *text_format* and - * ``application/json`` is used for *json_format*. + * Specify a ``content_type`` field. + * If this field is not set then ``text/plain`` is used for ``text_format`` and + * ``application/json`` is used for ``json_format``. * * .. validated-code-block:: yaml * :type-name: envoy.config.core.v3.SubstitutionFormatString diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/TypedExtensionConfig.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/TypedExtensionConfig.ts index d653f9373..d46751d4f 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/TypedExtensionConfig.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/TypedExtensionConfig.ts @@ -14,8 +14,9 @@ export interface TypedExtensionConfig { 'name'?: (string); /** * The typed config for the extension. The type URL will be used to identify - * the extension. In the case that the type URL is *udpa.type.v1.TypedStruct*, - * the inner type URL of *TypedStruct* will be utilized. See the + * the extension. In the case that the type URL is ``xds.type.v3.TypedStruct`` + * (or, for historical reasons, ``udpa.type.v1.TypedStruct``), the inner type + * URL of ``TypedStruct`` will be utilized. See the * :ref:`extension configuration overview * ` for further details. */ @@ -34,8 +35,9 @@ export interface TypedExtensionConfig__Output { 'name': (string); /** * The typed config for the extension. The type URL will be used to identify - * the extension. In the case that the type URL is *udpa.type.v1.TypedStruct*, - * the inner type URL of *TypedStruct* will be utilized. See the + * the extension. In the case that the type URL is ``xds.type.v3.TypedStruct`` + * (or, for historical reasons, ``udpa.type.v1.TypedStruct``), the inner type + * URL of ``TypedStruct`` will be utilized. See the * :ref:`extension configuration overview * ` for further details. */ diff --git a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/UpstreamHttpProtocolOptions.ts b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/UpstreamHttpProtocolOptions.ts index c0da4159f..91e9f0b53 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/core/v3/UpstreamHttpProtocolOptions.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/core/v3/UpstreamHttpProtocolOptions.ts @@ -7,13 +7,15 @@ export interface UpstreamHttpProtocolOptions { * upstream connections based on the downstream HTTP host/authority header or any other arbitrary * header when :ref:`override_auto_sni_header ` * is set, as seen by the :ref:`router filter `. + * Does nothing if a filter before the http router filter sets the corresponding metadata. */ 'auto_sni'?: (boolean); /** * Automatic validate upstream presented certificate for new upstream connections based on the * downstream HTTP host/authority header or any other arbitrary header when :ref:`override_auto_sni_header ` * is set, as seen by the :ref:`router filter `. - * This field is intended to be set with `auto_sni` field. + * This field is intended to be set with ``auto_sni`` field. + * Does nothing if a filter before the http router filter sets the corresponding metadata. */ 'auto_san_validation'?: (boolean); /** @@ -22,8 +24,9 @@ export interface UpstreamHttpProtocolOptions { * :ref:`router filter `. * If unset, host/authority header will be used for populating the SNI. If the specified header * is not found or the value is empty, host/authority header will be used instead. - * This field is intended to be set with `auto_sni` and/or `auto_san_validation` fields. + * This field is intended to be set with ``auto_sni`` and/or ``auto_san_validation`` fields. * If none of these fields are set then setting this would be a no-op. + * Does nothing if a filter before the http router filter sets the corresponding metadata. */ 'override_auto_sni_header'?: (string); } @@ -34,13 +37,15 @@ export interface UpstreamHttpProtocolOptions__Output { * upstream connections based on the downstream HTTP host/authority header or any other arbitrary * header when :ref:`override_auto_sni_header ` * is set, as seen by the :ref:`router filter `. + * Does nothing if a filter before the http router filter sets the corresponding metadata. */ 'auto_sni': (boolean); /** * Automatic validate upstream presented certificate for new upstream connections based on the * downstream HTTP host/authority header or any other arbitrary header when :ref:`override_auto_sni_header ` * is set, as seen by the :ref:`router filter `. - * This field is intended to be set with `auto_sni` field. + * This field is intended to be set with ``auto_sni`` field. + * Does nothing if a filter before the http router filter sets the corresponding metadata. */ 'auto_san_validation': (boolean); /** @@ -49,8 +54,9 @@ export interface UpstreamHttpProtocolOptions__Output { * :ref:`router filter `. * If unset, host/authority header will be used for populating the SNI. If the specified header * is not found or the value is empty, host/authority header will be used instead. - * This field is intended to be set with `auto_sni` and/or `auto_san_validation` fields. + * This field is intended to be set with ``auto_sni`` and/or ``auto_san_validation`` fields. * If none of these fields are set then setting this would be a no-op. + * Does nothing if a filter before the http router filter sets the corresponding metadata. */ 'override_auto_sni_header': (string); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/endpoint/v3/ClusterStats.ts b/packages/grpc-js-xds/src/generated/envoy/config/endpoint/v3/ClusterStats.ts index c160333b2..d65383885 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/endpoint/v3/ClusterStats.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/endpoint/v3/ClusterStats.ts @@ -52,9 +52,9 @@ export interface ClusterStats { 'total_dropped_requests'?: (number | string | Long); /** * Period over which the actual load report occurred. This will be guaranteed to include every - * request reported. Due to system load and delays between the *LoadStatsRequest* sent from Envoy - * and the *LoadStatsResponse* message sent from the management server, this may be longer than - * the requested load reporting interval in the *LoadStatsResponse*. + * request reported. Due to system load and delays between the ``LoadStatsRequest`` sent from Envoy + * and the ``LoadStatsResponse`` message sent from the management server, this may be longer than + * the requested load reporting interval in the ``LoadStatsResponse``. */ 'load_report_interval'?: (_google_protobuf_Duration | null); /** @@ -96,9 +96,9 @@ export interface ClusterStats__Output { 'total_dropped_requests': (string); /** * Period over which the actual load report occurred. This will be guaranteed to include every - * request reported. Due to system load and delays between the *LoadStatsRequest* sent from Envoy - * and the *LoadStatsResponse* message sent from the management server, this may be longer than - * the requested load reporting interval in the *LoadStatsResponse*. + * request reported. Due to system load and delays between the ``LoadStatsRequest`` sent from Envoy + * and the ``LoadStatsResponse`` message sent from the management server, this may be longer than + * the requested load reporting interval in the ``LoadStatsResponse``. */ 'load_report_interval': (_google_protobuf_Duration__Output | null); /** diff --git a/packages/grpc-js-xds/src/generated/envoy/config/endpoint/v3/Endpoint.ts b/packages/grpc-js-xds/src/generated/envoy/config/endpoint/v3/Endpoint.ts index 31eb09055..ef56d7068 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/endpoint/v3/Endpoint.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/endpoint/v3/Endpoint.ts @@ -23,6 +23,19 @@ export interface _envoy_config_endpoint_v3_Endpoint_HealthCheckConfig { * endpoint. */ 'hostname'?: (string); + /** + * Optional alternative health check host address. + * + * .. attention:: + * + * The form of the health check host address is expected to be a direct IP address. + */ + 'address'?: (_envoy_config_core_v3_Address | null); + /** + * Optional flag to control if perform active health check for this endpoint. + * Active health check is enabled by default if there is a health checker. + */ + 'disable_active_health_check'?: (boolean); } /** @@ -46,6 +59,19 @@ export interface _envoy_config_endpoint_v3_Endpoint_HealthCheckConfig__Output { * endpoint. */ 'hostname': (string); + /** + * Optional alternative health check host address. + * + * .. attention:: + * + * The form of the health check host address is expected to be a direct IP address. + */ + 'address': (_envoy_config_core_v3_Address__Output | null); + /** + * Optional flag to control if perform active health check for this endpoint. + * Active health check is enabled by default if there is a health checker. + */ + 'disable_active_health_check': (boolean); } /** diff --git a/packages/grpc-js-xds/src/generated/envoy/config/endpoint/v3/LbEndpoint.ts b/packages/grpc-js-xds/src/generated/envoy/config/endpoint/v3/LbEndpoint.ts index 6025ae3a7..8d184b8a0 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/endpoint/v3/LbEndpoint.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/endpoint/v3/LbEndpoint.ts @@ -18,8 +18,8 @@ export interface LbEndpoint { /** * The endpoint metadata specifies values that may be used by the load * balancer to select endpoints in a cluster for a given request. The filter - * name should be specified as *envoy.lb*. An example boolean key-value pair - * is *canary*, providing the optional canary status of the upstream host. + * name should be specified as ``envoy.lb``. An example boolean key-value pair + * is ``canary``, providing the optional canary status of the upstream host. * This may be matched against in a route's * :ref:`RouteAction ` metadata_match field * to subset the endpoints considered in cluster load balancing. @@ -32,9 +32,9 @@ export interface LbEndpoint { * of the weights of all endpoints in the endpoint's locality to produce a * percentage of traffic for the endpoint. This percentage is then further * weighted by the endpoint's locality's load balancing weight from - * LocalityLbEndpoints. If unspecified, each host is presumed to have equal - * weight in a locality. The sum of the weights of all endpoints in the - * endpoint's locality must not exceed uint32_t maximal value (4294967295). + * LocalityLbEndpoints. If unspecified, will be treated as 1. The sum + * of the weights of all endpoints in the endpoint's locality must not + * exceed uint32_t maximal value (4294967295). */ 'load_balancing_weight'?: (_google_protobuf_UInt32Value | null); /** @@ -60,8 +60,8 @@ export interface LbEndpoint__Output { /** * The endpoint metadata specifies values that may be used by the load * balancer to select endpoints in a cluster for a given request. The filter - * name should be specified as *envoy.lb*. An example boolean key-value pair - * is *canary*, providing the optional canary status of the upstream host. + * name should be specified as ``envoy.lb``. An example boolean key-value pair + * is ``canary``, providing the optional canary status of the upstream host. * This may be matched against in a route's * :ref:`RouteAction ` metadata_match field * to subset the endpoints considered in cluster load balancing. @@ -74,9 +74,9 @@ export interface LbEndpoint__Output { * of the weights of all endpoints in the endpoint's locality to produce a * percentage of traffic for the endpoint. This percentage is then further * weighted by the endpoint's locality's load balancing weight from - * LocalityLbEndpoints. If unspecified, each host is presumed to have equal - * weight in a locality. The sum of the weights of all endpoints in the - * endpoint's locality must not exceed uint32_t maximal value (4294967295). + * LocalityLbEndpoints. If unspecified, will be treated as 1. The sum + * of the weights of all endpoints in the endpoint's locality must not + * exceed uint32_t maximal value (4294967295). */ 'load_balancing_weight': (_google_protobuf_UInt32Value__Output | null); /** diff --git a/packages/grpc-js-xds/src/generated/envoy/config/endpoint/v3/LocalityLbEndpoints.ts b/packages/grpc-js-xds/src/generated/envoy/config/endpoint/v3/LocalityLbEndpoints.ts index 182e27c9c..4540792d6 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/endpoint/v3/LocalityLbEndpoints.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/endpoint/v3/LocalityLbEndpoints.ts @@ -23,9 +23,8 @@ export interface _envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList__O /** * A group of endpoints belonging to a Locality. - * One can have multiple LocalityLbEndpoints for a locality, but this is - * generally only done if the different groups need to have different load - * balancing weights or different priorities. + * One can have multiple LocalityLbEndpoints for a locality, but only if + * they have different priorities. * [#next-free-field: 9] */ export interface LocalityLbEndpoints { @@ -36,7 +35,7 @@ export interface LocalityLbEndpoints { /** * The group of endpoints belonging to the locality specified. * [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be - * deprecated and replaced by *load_balancer_endpoints*.] + * deprecated and replaced by ``load_balancer_endpoints``.] */ 'lb_endpoints'?: (_envoy_config_endpoint_v3_LbEndpoint)[]; /** @@ -76,7 +75,7 @@ export interface LocalityLbEndpoints { 'proximity'?: (_google_protobuf_UInt32Value | null); /** * The group of endpoints belonging to the locality. - * [#comment:TODO(adisuissa): Once LEDS is implemented the *lb_endpoints* field + * [#comment:TODO(adisuissa): Once LEDS is implemented the ``lb_endpoints`` field * needs to be deprecated.] */ 'load_balancer_endpoints'?: (_envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList | null); @@ -92,9 +91,8 @@ export interface LocalityLbEndpoints { /** * A group of endpoints belonging to a Locality. - * One can have multiple LocalityLbEndpoints for a locality, but this is - * generally only done if the different groups need to have different load - * balancing weights or different priorities. + * One can have multiple LocalityLbEndpoints for a locality, but only if + * they have different priorities. * [#next-free-field: 9] */ export interface LocalityLbEndpoints__Output { @@ -105,7 +103,7 @@ export interface LocalityLbEndpoints__Output { /** * The group of endpoints belonging to the locality specified. * [#comment:TODO(adisuissa): Once LEDS is implemented this field needs to be - * deprecated and replaced by *load_balancer_endpoints*.] + * deprecated and replaced by ``load_balancer_endpoints``.] */ 'lb_endpoints': (_envoy_config_endpoint_v3_LbEndpoint__Output)[]; /** @@ -145,7 +143,7 @@ export interface LocalityLbEndpoints__Output { 'proximity': (_google_protobuf_UInt32Value__Output | null); /** * The group of endpoints belonging to the locality. - * [#comment:TODO(adisuissa): Once LEDS is implemented the *lb_endpoints* field + * [#comment:TODO(adisuissa): Once LEDS is implemented the ``lb_endpoints`` field * needs to be deprecated.] */ 'load_balancer_endpoints'?: (_envoy_config_endpoint_v3_LocalityLbEndpoints_LbEndpointList__Output | null); diff --git a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/AdditionalAddress.ts b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/AdditionalAddress.ts new file mode 100644 index 000000000..cc1f5e42f --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/AdditionalAddress.ts @@ -0,0 +1,38 @@ +// Original file: deps/envoy-api/envoy/config/listener/v3/listener.proto + +import type { Address as _envoy_config_core_v3_Address, Address__Output as _envoy_config_core_v3_Address__Output } from '../../../../envoy/config/core/v3/Address'; +import type { SocketOptionsOverride as _envoy_config_core_v3_SocketOptionsOverride, SocketOptionsOverride__Output as _envoy_config_core_v3_SocketOptionsOverride__Output } from '../../../../envoy/config/core/v3/SocketOptionsOverride'; + +/** + * The additional address the listener is listening on. + */ +export interface AdditionalAddress { + 'address'?: (_envoy_config_core_v3_Address | null); + /** + * Additional socket options that may not be present in Envoy source code or + * precompiled binaries. If specified, this will override the + * :ref:`socket_options ` + * in the listener. If specified with no + * :ref:`socket_options ` + * or an empty list of :ref:`socket_options `, + * it means no socket option will apply. + */ + 'socket_options'?: (_envoy_config_core_v3_SocketOptionsOverride | null); +} + +/** + * The additional address the listener is listening on. + */ +export interface AdditionalAddress__Output { + 'address': (_envoy_config_core_v3_Address__Output | null); + /** + * Additional socket options that may not be present in Envoy source code or + * precompiled binaries. If specified, this will override the + * :ref:`socket_options ` + * in the listener. If specified with no + * :ref:`socket_options ` + * or an empty list of :ref:`socket_options `, + * it means no socket option will apply. + */ + 'socket_options': (_envoy_config_core_v3_SocketOptionsOverride__Output | null); +} diff --git a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ApiListenerManager.ts b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ApiListenerManager.ts new file mode 100644 index 000000000..125875161 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ApiListenerManager.ts @@ -0,0 +1,18 @@ +// Original file: deps/envoy-api/envoy/config/listener/v3/listener.proto + + +/** + * A placeholder proto so that users can explicitly configure the API + * Listener Manager via the bootstrap's :ref:`listener_manager `. + * [#not-implemented-hide:] + */ +export interface ApiListenerManager { +} + +/** + * A placeholder proto so that users can explicitly configure the API + * Listener Manager via the bootstrap's :ref:`listener_manager `. + * [#not-implemented-hide:] + */ +export interface ApiListenerManager__Output { +} diff --git a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/Filter.ts b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/Filter.ts index 66e903b28..b95b36418 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/Filter.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/Filter.ts @@ -8,8 +8,7 @@ import type { ExtensionConfigSource as _envoy_config_core_v3_ExtensionConfigSour */ export interface Filter { /** - * The name of the filter to instantiate. The name must match a - * :ref:`supported filter `. + * The name of the filter configuration. */ 'name'?: (string); /** @@ -33,8 +32,7 @@ export interface Filter { */ export interface Filter__Output { /** - * The name of the filter to instantiate. The name must match a - * :ref:`supported filter `. + * The name of the filter configuration. */ 'name': (string); /** diff --git a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/FilterChain.ts b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/FilterChain.ts index e65f433c4..f27000d71 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/FilterChain.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/FilterChain.ts @@ -60,6 +60,12 @@ export interface FilterChain { * connections established with the listener. Order matters as the filters are * processed sequentially as connection events happen. Note: If the filter * list is empty, the connection will close by default. + * + * For QUIC listeners, network filters other than HTTP Connection Manager (HCM) + * can be created, but due to differences in the connection implementation compared + * to TCP, the onData() method will never be called. Therefore, network filters + * for QUIC listeners should only expect to do work at the start of a new connection + * (i.e. in onNewConnection()). HCM must be the last (or only) filter in the chain. */ 'filters'?: (_envoy_config_listener_v3_Filter)[]; /** @@ -81,17 +87,18 @@ export interface FilterChain { 'metadata'?: (_envoy_config_core_v3_Metadata | null); /** * Optional custom transport socket implementation to use for downstream connections. - * To setup TLS, set a transport socket with name `envoy.transport_sockets.tls` and - * :ref:`DownstreamTlsContext ` in the `typed_config`. + * To setup TLS, set a transport socket with name ``envoy.transport_sockets.tls`` and + * :ref:`DownstreamTlsContext ` in the ``typed_config``. * If no transport socket configuration is specified, new connections * will be set up with plaintext. * [#extension-category: envoy.transport_sockets.downstream] */ 'transport_socket'?: (_envoy_config_core_v3_TransportSocket | null); /** - * [#not-implemented-hide:] The unique name (or empty) by which this filter chain is known. If no - * name is provided, Envoy will allocate an internal UUID for the filter chain. If the filter - * chain is to be dynamically updated or removed via FCDS a unique name must be provided. + * The unique name (or empty) by which this filter chain is known. + * Note: :ref:`filter_chain_matcher + * ` + * requires that filter chains are uniquely named within a listener. */ 'name'?: (string); /** @@ -123,6 +130,12 @@ export interface FilterChain__Output { * connections established with the listener. Order matters as the filters are * processed sequentially as connection events happen. Note: If the filter * list is empty, the connection will close by default. + * + * For QUIC listeners, network filters other than HTTP Connection Manager (HCM) + * can be created, but due to differences in the connection implementation compared + * to TCP, the onData() method will never be called. Therefore, network filters + * for QUIC listeners should only expect to do work at the start of a new connection + * (i.e. in onNewConnection()). HCM must be the last (or only) filter in the chain. */ 'filters': (_envoy_config_listener_v3_Filter__Output)[]; /** @@ -144,17 +157,18 @@ export interface FilterChain__Output { 'metadata': (_envoy_config_core_v3_Metadata__Output | null); /** * Optional custom transport socket implementation to use for downstream connections. - * To setup TLS, set a transport socket with name `envoy.transport_sockets.tls` and - * :ref:`DownstreamTlsContext ` in the `typed_config`. + * To setup TLS, set a transport socket with name ``envoy.transport_sockets.tls`` and + * :ref:`DownstreamTlsContext ` in the ``typed_config``. * If no transport socket configuration is specified, new connections * will be set up with plaintext. * [#extension-category: envoy.transport_sockets.downstream] */ 'transport_socket': (_envoy_config_core_v3_TransportSocket__Output | null); /** - * [#not-implemented-hide:] The unique name (or empty) by which this filter chain is known. If no - * name is provided, Envoy will allocate an internal UUID for the filter chain. If the filter - * chain is to be dynamically updated or removed via FCDS a unique name must be provided. + * The unique name (or empty) by which this filter chain is known. + * Note: :ref:`filter_chain_matcher + * ` + * requires that filter chains are uniquely named within a listener. */ 'name': (string); /** diff --git a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/FilterChainMatch.ts b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/FilterChainMatch.ts index 259888217..87b1503cb 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/FilterChainMatch.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/FilterChainMatch.ts @@ -143,6 +143,7 @@ export interface FilterChainMatch { * will be first matched against ``www.example.com``, then ``*.example.com``, then ``*.com``. * * Note that partial wildcards are not supported, and values like ``*w.example.com`` are invalid. + * The value ``*`` is also not supported, and ``server_names`` should be omitted instead. * * .. attention:: * @@ -285,6 +286,7 @@ export interface FilterChainMatch__Output { * will be first matched against ``www.example.com``, then ``*.example.com``, then ``*.com``. * * Note that partial wildcards are not supported, and values like ``*w.example.com`` are invalid. + * The value ``*`` is also not supported, and ``server_names`` should be omitted instead. * * .. attention:: * diff --git a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/Listener.ts b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/Listener.ts index 3df1006b7..ca12fc6de 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/Listener.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/Listener.ts @@ -12,6 +12,9 @@ import type { TrafficDirection as _envoy_config_core_v3_TrafficDirection } from import type { UdpListenerConfig as _envoy_config_listener_v3_UdpListenerConfig, UdpListenerConfig__Output as _envoy_config_listener_v3_UdpListenerConfig__Output } from '../../../../envoy/config/listener/v3/UdpListenerConfig'; import type { ApiListener as _envoy_config_listener_v3_ApiListener, ApiListener__Output as _envoy_config_listener_v3_ApiListener__Output } from '../../../../envoy/config/listener/v3/ApiListener'; import type { AccessLog as _envoy_config_accesslog_v3_AccessLog, AccessLog__Output as _envoy_config_accesslog_v3_AccessLog__Output } from '../../../../envoy/config/accesslog/v3/AccessLog'; +import type { Matcher as _xds_type_matcher_v3_Matcher, Matcher__Output as _xds_type_matcher_v3_Matcher__Output } from '../../../../xds/type/matcher/v3/Matcher'; +import type { AdditionalAddress as _envoy_config_listener_v3_AdditionalAddress, AdditionalAddress__Output as _envoy_config_listener_v3_AdditionalAddress__Output } from '../../../../envoy/config/listener/v3/AdditionalAddress'; +import type { TypedExtensionConfig as _envoy_config_core_v3_TypedExtensionConfig, TypedExtensionConfig__Output as _envoy_config_core_v3_TypedExtensionConfig__Output } from '../../../../envoy/config/core/v3/TypedExtensionConfig'; /** * Configuration for listener connection balancing. @@ -21,7 +24,13 @@ export interface _envoy_config_listener_v3_Listener_ConnectionBalanceConfig { * If specified, the listener will use the exact connection balancer. */ 'exact_balance'?: (_envoy_config_listener_v3_Listener_ConnectionBalanceConfig_ExactBalance | null); - 'balance_type'?: "exact_balance"; + /** + * The listener will use the connection balancer according to ``type_url``. If ``type_url`` is invalid, + * Envoy will not attempt to balance active connections between worker threads. + * [#extension-category: envoy.network.connection_balance] + */ + 'extend_balance'?: (_envoy_config_core_v3_TypedExtensionConfig | null); + 'balance_type'?: "exact_balance"|"extend_balance"; } /** @@ -32,7 +41,13 @@ export interface _envoy_config_listener_v3_Listener_ConnectionBalanceConfig__Out * If specified, the listener will use the exact connection balancer. */ 'exact_balance'?: (_envoy_config_listener_v3_Listener_ConnectionBalanceConfig_ExactBalance__Output | null); - 'balance_type': "exact_balance"; + /** + * The listener will use the connection balancer according to ``type_url``. If ``type_url`` is invalid, + * Envoy will not attempt to balance active connections between worker threads. + * [#extension-category: envoy.network.connection_balance] + */ + 'extend_balance'?: (_envoy_config_core_v3_TypedExtensionConfig__Output | null); + 'balance_type': "exact_balance"|"extend_balance"; } /** @@ -105,20 +120,18 @@ export interface _envoy_config_listener_v3_Listener_ConnectionBalanceConfig_Exac /** * Configuration for envoy internal listener. All the future internal listener features should be added here. - * [#not-implemented-hide:] */ export interface _envoy_config_listener_v3_Listener_InternalListenerConfig { } /** * Configuration for envoy internal listener. All the future internal listener features should be added here. - * [#not-implemented-hide:] */ export interface _envoy_config_listener_v3_Listener_InternalListenerConfig__Output { } /** - * [#next-free-field: 30] + * [#next-free-field: 34] */ export interface Listener { /** @@ -131,6 +144,7 @@ export interface Listener { * The address that the listener should listen on. In general, the address must be unique, though * that is governed by the bind rules of the OS. E.g., multiple listeners can listen on port 0 on * Linux as the actual port will be allocated by the OS. + * Required unless ``api_listener`` or ``listener_specifier`` is populated. */ 'address'?: (_envoy_config_core_v3_Address | null); /** @@ -144,7 +158,7 @@ export interface Listener { */ 'filter_chains'?: (_envoy_config_listener_v3_FilterChain)[]; /** - * If a connection is redirected using *iptables*, the port on which the proxy + * If a connection is redirected using ``iptables``, the port on which the proxy * receives it might be different from the original destination address. When this flag is set to * true, the listener hands off redirected connections to the listener associated with the * original destination address. If there is no listener associated with the original destination @@ -177,31 +191,30 @@ export interface Listener { * UDP Listener filters can be specified when the protocol in the listener socket address in * :ref:`protocol ` is :ref:`UDP * `. - * UDP listeners currently support a single filter. */ 'listener_filters'?: (_envoy_config_listener_v3_ListenerFilter)[]; /** * Whether the listener should be set as a transparent socket. * When this flag is set to true, connections can be redirected to the listener using an - * *iptables* *TPROXY* target, in which case the original source and destination addresses and + * ``iptables`` ``TPROXY`` target, in which case the original source and destination addresses and * ports are preserved on accepted connections. This flag should be used in combination with * :ref:`an original_dst ` :ref:`listener filter * ` to mark the connections' local addresses as * "restored." This can be used to hand off each redirected connection to another listener * associated with the connection's destination address. Direct connections to the socket without - * using *TPROXY* cannot be distinguished from connections redirected using *TPROXY* and are + * using ``TPROXY`` cannot be distinguished from connections redirected using ``TPROXY`` and are * therefore treated as if they were redirected. * When this flag is set to false, the listener's socket is explicitly reset as non-transparent. - * Setting this flag requires Envoy to run with the *CAP_NET_ADMIN* capability. + * Setting this flag requires Envoy to run with the ``CAP_NET_ADMIN`` capability. * When this flag is not set (default), the socket is not modified, i.e. the transparent option * is neither set nor reset. */ 'transparent'?: (_google_protobuf_BoolValue | null); /** - * Whether the listener should set the *IP_FREEBIND* socket option. When this + * Whether the listener should set the ``IP_FREEBIND`` socket option. When this * flag is set to true, listeners can be bound to an IP address that is not * configured on the system running Envoy. When this flag is set to false, the - * option *IP_FREEBIND* is disabled on the socket. When this flag is not set + * option ``IP_FREEBIND`` is disabled on the socket. When this flag is not set * (default), the socket is not modified, i.e. the option is neither enabled * nor disabled. */ @@ -225,13 +238,16 @@ export interface Listener { 'tcp_fast_open_queue_length'?: (_google_protobuf_UInt32Value | null); /** * Additional socket options that may not be present in Envoy source code or - * precompiled binaries. + * precompiled binaries. The socket options can be updated for a listener when + * :ref:`enable_reuse_port ` + * is `true`. Otherwise, if socket options change during a listener update the update will be rejected + * to make it clear that the options were not updated. */ 'socket_options'?: (_envoy_config_core_v3_SocketOption)[]; /** * The timeout to wait for all listener filters to complete operation. If the timeout is reached, * the accepted socket is closed without a connection being created unless - * `continue_on_listener_filters_timeout` is set to true. Specify 0 to disable the + * ``continue_on_listener_filters_timeout`` is set to true. Specify 0 to disable the * timeout. If not specified, a default timeout of 15s is used. */ 'listener_filters_timeout'?: (_google_protobuf_Duration | null); @@ -290,7 +306,7 @@ export interface Listener { */ 'connection_balance_config'?: (_envoy_config_listener_v3_Listener_ConnectionBalanceConfig | null); /** - * Deprecated. Use `enable_reuse_port` instead. + * Deprecated. Use ``enable_reuse_port`` instead. */ 'reuse_port'?: (boolean); /** @@ -318,32 +334,34 @@ export interface Listener { /** * Used to represent an internal listener which does not listen on OSI L4 address but can be used by the * :ref:`envoy cluster ` to create a user space connection to. - * The internal listener acts as a tcp listener. It supports listener filters and network filter chains. - * The internal listener require :ref:`address ` has - * field `envoy_internal_address`. + * The internal listener acts as a TCP listener. It supports listener filters and network filter chains. + * Upstream clusters refer to the internal listeners by their :ref:`name + * `. :ref:`Address + * ` must not be set on the internal listeners. * - * There are some limitations are derived from the implementation. The known limitations include + * There are some limitations that are derived from the implementation. The known limitations include: * * * :ref:`ConnectionBalanceConfig ` is not - * allowed because both cluster connection and listener connection must be owned by the same dispatcher. + * allowed because both the cluster connection and the listener connection must be owned by the same dispatcher. * * :ref:`tcp_backlog_size ` * * :ref:`freebind ` * * :ref:`transparent ` - * [#not-implemented-hide:] */ 'internal_listener'?: (_envoy_config_listener_v3_Listener_InternalListenerConfig | null); /** * Optional prefix to use on listener stats. If empty, the stats will be rooted at - * `listener.
.`. If non-empty, stats will be rooted at - * `listener..`. + * ``listener.
.``. If non-empty, stats will be rooted at + * ``listener..``. */ 'stat_prefix'?: (string); /** - * When this flag is set to true, listeners set the *SO_REUSEPORT* socket option and + * When this flag is set to true, listeners set the ``SO_REUSEPORT`` socket option and * create one socket for each worker thread. This makes inbound connections * distribute among worker threads roughly evenly in cases where there are a high number * of connections. When this flag is set to false, all worker threads share one socket. This field - * defaults to true. + * defaults to true. The change of field will be rejected during an listener update when the + * runtime flag ``envoy.reloadable_features.enable_update_listener_socket_options`` is enabled. + * Otherwise, the update of this field will be ignored quietly. * * .. attention:: * @@ -361,17 +379,49 @@ export interface Listener { * is warned similar to macOS. It is left enabled for UDP with undefined behavior currently. */ 'enable_reuse_port'?: (_google_protobuf_BoolValue | null); + /** + * Enable MPTCP (multi-path TCP) on this listener. Clients will be allowed to establish + * MPTCP connections. Non-MPTCP clients will fall back to regular TCP. + */ + 'enable_mptcp'?: (boolean); + /** + * Whether the listener should limit connections based upon the value of + * :ref:`global_downstream_max_connections `. + */ + 'ignore_global_conn_limit'?: (boolean); + /** + * :ref:`Matcher API ` resolving the filter chain name from the + * network properties. This matcher is used as a replacement for the filter chain match condition + * :ref:`filter_chain_match + * `. If specified, all + * :ref:`filter_chains ` must have a + * non-empty and unique :ref:`name ` field + * and not specify :ref:`filter_chain_match + * ` field. + * + * .. note:: + * + * Once matched, each connection is permanently bound to its filter chain. + * If the matcher changes but the filter chain remains the same, the + * connections bound to the filter chain are not drained. If, however, the + * filter chain is removed or structurally modified, then the drain for its + * connections is initiated. + */ + 'filter_chain_matcher'?: (_xds_type_matcher_v3_Matcher | null); + /** + * The additional addresses the listener should listen on. The addresses must be unique across all + * listeners. Multiple addresses with port 0 can be supplied. When using multiple addresses in a single listener, + * all addresses use the same protocol, and multiple internal addresses are not supported. + */ + 'additional_addresses'?: (_envoy_config_listener_v3_AdditionalAddress)[]; /** * The exclusive listener type and the corresponding config. - * TODO(lambdai): https://github.com/envoyproxy/envoy/issues/15372 - * Will create and add TcpListenerConfig. Will add UdpListenerConfig and ApiListener. - * [#not-implemented-hide:] */ 'listener_specifier'?: "internal_listener"; } /** - * [#next-free-field: 30] + * [#next-free-field: 34] */ export interface Listener__Output { /** @@ -384,6 +434,7 @@ export interface Listener__Output { * The address that the listener should listen on. In general, the address must be unique, though * that is governed by the bind rules of the OS. E.g., multiple listeners can listen on port 0 on * Linux as the actual port will be allocated by the OS. + * Required unless ``api_listener`` or ``listener_specifier`` is populated. */ 'address': (_envoy_config_core_v3_Address__Output | null); /** @@ -397,7 +448,7 @@ export interface Listener__Output { */ 'filter_chains': (_envoy_config_listener_v3_FilterChain__Output)[]; /** - * If a connection is redirected using *iptables*, the port on which the proxy + * If a connection is redirected using ``iptables``, the port on which the proxy * receives it might be different from the original destination address. When this flag is set to * true, the listener hands off redirected connections to the listener associated with the * original destination address. If there is no listener associated with the original destination @@ -430,31 +481,30 @@ export interface Listener__Output { * UDP Listener filters can be specified when the protocol in the listener socket address in * :ref:`protocol ` is :ref:`UDP * `. - * UDP listeners currently support a single filter. */ 'listener_filters': (_envoy_config_listener_v3_ListenerFilter__Output)[]; /** * Whether the listener should be set as a transparent socket. * When this flag is set to true, connections can be redirected to the listener using an - * *iptables* *TPROXY* target, in which case the original source and destination addresses and + * ``iptables`` ``TPROXY`` target, in which case the original source and destination addresses and * ports are preserved on accepted connections. This flag should be used in combination with * :ref:`an original_dst ` :ref:`listener filter * ` to mark the connections' local addresses as * "restored." This can be used to hand off each redirected connection to another listener * associated with the connection's destination address. Direct connections to the socket without - * using *TPROXY* cannot be distinguished from connections redirected using *TPROXY* and are + * using ``TPROXY`` cannot be distinguished from connections redirected using ``TPROXY`` and are * therefore treated as if they were redirected. * When this flag is set to false, the listener's socket is explicitly reset as non-transparent. - * Setting this flag requires Envoy to run with the *CAP_NET_ADMIN* capability. + * Setting this flag requires Envoy to run with the ``CAP_NET_ADMIN`` capability. * When this flag is not set (default), the socket is not modified, i.e. the transparent option * is neither set nor reset. */ 'transparent': (_google_protobuf_BoolValue__Output | null); /** - * Whether the listener should set the *IP_FREEBIND* socket option. When this + * Whether the listener should set the ``IP_FREEBIND`` socket option. When this * flag is set to true, listeners can be bound to an IP address that is not * configured on the system running Envoy. When this flag is set to false, the - * option *IP_FREEBIND* is disabled on the socket. When this flag is not set + * option ``IP_FREEBIND`` is disabled on the socket. When this flag is not set * (default), the socket is not modified, i.e. the option is neither enabled * nor disabled. */ @@ -478,13 +528,16 @@ export interface Listener__Output { 'tcp_fast_open_queue_length': (_google_protobuf_UInt32Value__Output | null); /** * Additional socket options that may not be present in Envoy source code or - * precompiled binaries. + * precompiled binaries. The socket options can be updated for a listener when + * :ref:`enable_reuse_port ` + * is `true`. Otherwise, if socket options change during a listener update the update will be rejected + * to make it clear that the options were not updated. */ 'socket_options': (_envoy_config_core_v3_SocketOption__Output)[]; /** * The timeout to wait for all listener filters to complete operation. If the timeout is reached, * the accepted socket is closed without a connection being created unless - * `continue_on_listener_filters_timeout` is set to true. Specify 0 to disable the + * ``continue_on_listener_filters_timeout`` is set to true. Specify 0 to disable the * timeout. If not specified, a default timeout of 15s is used. */ 'listener_filters_timeout': (_google_protobuf_Duration__Output | null); @@ -543,7 +596,7 @@ export interface Listener__Output { */ 'connection_balance_config': (_envoy_config_listener_v3_Listener_ConnectionBalanceConfig__Output | null); /** - * Deprecated. Use `enable_reuse_port` instead. + * Deprecated. Use ``enable_reuse_port`` instead. */ 'reuse_port': (boolean); /** @@ -571,32 +624,34 @@ export interface Listener__Output { /** * Used to represent an internal listener which does not listen on OSI L4 address but can be used by the * :ref:`envoy cluster ` to create a user space connection to. - * The internal listener acts as a tcp listener. It supports listener filters and network filter chains. - * The internal listener require :ref:`address ` has - * field `envoy_internal_address`. + * The internal listener acts as a TCP listener. It supports listener filters and network filter chains. + * Upstream clusters refer to the internal listeners by their :ref:`name + * `. :ref:`Address + * ` must not be set on the internal listeners. * - * There are some limitations are derived from the implementation. The known limitations include + * There are some limitations that are derived from the implementation. The known limitations include: * * * :ref:`ConnectionBalanceConfig ` is not - * allowed because both cluster connection and listener connection must be owned by the same dispatcher. + * allowed because both the cluster connection and the listener connection must be owned by the same dispatcher. * * :ref:`tcp_backlog_size ` * * :ref:`freebind ` * * :ref:`transparent ` - * [#not-implemented-hide:] */ 'internal_listener'?: (_envoy_config_listener_v3_Listener_InternalListenerConfig__Output | null); /** * Optional prefix to use on listener stats. If empty, the stats will be rooted at - * `listener.
.`. If non-empty, stats will be rooted at - * `listener..`. + * ``listener.
.``. If non-empty, stats will be rooted at + * ``listener..``. */ 'stat_prefix': (string); /** - * When this flag is set to true, listeners set the *SO_REUSEPORT* socket option and + * When this flag is set to true, listeners set the ``SO_REUSEPORT`` socket option and * create one socket for each worker thread. This makes inbound connections * distribute among worker threads roughly evenly in cases where there are a high number * of connections. When this flag is set to false, all worker threads share one socket. This field - * defaults to true. + * defaults to true. The change of field will be rejected during an listener update when the + * runtime flag ``envoy.reloadable_features.enable_update_listener_socket_options`` is enabled. + * Otherwise, the update of this field will be ignored quietly. * * .. attention:: * @@ -614,11 +669,43 @@ export interface Listener__Output { * is warned similar to macOS. It is left enabled for UDP with undefined behavior currently. */ 'enable_reuse_port': (_google_protobuf_BoolValue__Output | null); + /** + * Enable MPTCP (multi-path TCP) on this listener. Clients will be allowed to establish + * MPTCP connections. Non-MPTCP clients will fall back to regular TCP. + */ + 'enable_mptcp': (boolean); + /** + * Whether the listener should limit connections based upon the value of + * :ref:`global_downstream_max_connections `. + */ + 'ignore_global_conn_limit': (boolean); + /** + * :ref:`Matcher API ` resolving the filter chain name from the + * network properties. This matcher is used as a replacement for the filter chain match condition + * :ref:`filter_chain_match + * `. If specified, all + * :ref:`filter_chains ` must have a + * non-empty and unique :ref:`name ` field + * and not specify :ref:`filter_chain_match + * ` field. + * + * .. note:: + * + * Once matched, each connection is permanently bound to its filter chain. + * If the matcher changes but the filter chain remains the same, the + * connections bound to the filter chain are not drained. If, however, the + * filter chain is removed or structurally modified, then the drain for its + * connections is initiated. + */ + 'filter_chain_matcher': (_xds_type_matcher_v3_Matcher__Output | null); + /** + * The additional addresses the listener should listen on. The addresses must be unique across all + * listeners. Multiple addresses with port 0 can be supplied. When using multiple addresses in a single listener, + * all addresses use the same protocol, and multiple internal addresses are not supported. + */ + 'additional_addresses': (_envoy_config_listener_v3_AdditionalAddress__Output)[]; /** * The exclusive listener type and the corresponding config. - * TODO(lambdai): https://github.com/envoyproxy/envoy/issues/15372 - * Will create and add TcpListenerConfig. Will add UdpListenerConfig and ApiListener. - * [#not-implemented-hide:] */ 'listener_specifier': "internal_listener"; } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ListenerCollection.ts b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ListenerCollection.ts index 590ca8ed3..a1e7a10ca 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ListenerCollection.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ListenerCollection.ts @@ -3,7 +3,7 @@ import type { CollectionEntry as _xds_core_v3_CollectionEntry, CollectionEntry__Output as _xds_core_v3_CollectionEntry__Output } from '../../../../xds/core/v3/CollectionEntry'; /** - * Listener list collections. Entries are *Listener* resources or references. + * Listener list collections. Entries are ``Listener`` resources or references. * [#not-implemented-hide:] */ export interface ListenerCollection { @@ -11,7 +11,7 @@ export interface ListenerCollection { } /** - * Listener list collections. Entries are *Listener* resources or references. + * Listener list collections. Entries are ``Listener`` resources or references. * [#not-implemented-hide:] */ export interface ListenerCollection__Output { diff --git a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ListenerFilter.ts b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ListenerFilter.ts index be7242849..5844c4bbe 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ListenerFilter.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ListenerFilter.ts @@ -2,11 +2,14 @@ import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; import type { ListenerFilterChainMatchPredicate as _envoy_config_listener_v3_ListenerFilterChainMatchPredicate, ListenerFilterChainMatchPredicate__Output as _envoy_config_listener_v3_ListenerFilterChainMatchPredicate__Output } from '../../../../envoy/config/listener/v3/ListenerFilterChainMatchPredicate'; +import type { ExtensionConfigSource as _envoy_config_core_v3_ExtensionConfigSource, ExtensionConfigSource__Output as _envoy_config_core_v3_ExtensionConfigSource__Output } from '../../../../envoy/config/core/v3/ExtensionConfigSource'; +/** + * [#next-free-field: 6] + */ export interface ListenerFilter { /** - * The name of the filter to instantiate. The name must match a - * :ref:`supported filter `. + * The name of the filter configuration. */ 'name'?: (string); /** @@ -21,13 +24,21 @@ export interface ListenerFilter { * for further examples. */ 'filter_disabled'?: (_envoy_config_listener_v3_ListenerFilterChainMatchPredicate | null); - 'config_type'?: "typed_config"; + /** + * Configuration source specifier for an extension configuration discovery + * service. In case of a failure and without the default configuration, the + * listener closes the connections. + */ + 'config_discovery'?: (_envoy_config_core_v3_ExtensionConfigSource | null); + 'config_type'?: "typed_config"|"config_discovery"; } +/** + * [#next-free-field: 6] + */ export interface ListenerFilter__Output { /** - * The name of the filter to instantiate. The name must match a - * :ref:`supported filter `. + * The name of the filter configuration. */ 'name': (string); /** @@ -42,5 +53,11 @@ export interface ListenerFilter__Output { * for further examples. */ 'filter_disabled': (_envoy_config_listener_v3_ListenerFilterChainMatchPredicate__Output | null); - 'config_type': "typed_config"; + /** + * Configuration source specifier for an extension configuration discovery + * service. In case of a failure and without the default configuration, the + * listener closes the connections. + */ + 'config_discovery'?: (_envoy_config_core_v3_ExtensionConfigSource__Output | null); + 'config_type': "typed_config"|"config_discovery"; } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ListenerManager.ts b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ListenerManager.ts new file mode 100644 index 000000000..d27a10c68 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ListenerManager.ts @@ -0,0 +1,18 @@ +// Original file: deps/envoy-api/envoy/config/listener/v3/listener.proto + + +/** + * A placeholder proto so that users can explicitly configure the standard + * Listener Manager via the bootstrap's :ref:`listener_manager `. + * [#not-implemented-hide:] + */ +export interface ListenerManager { +} + +/** + * A placeholder proto so that users can explicitly configure the standard + * Listener Manager via the bootstrap's :ref:`listener_manager `. + * [#not-implemented-hide:] + */ +export interface ListenerManager__Output { +} diff --git a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/QuicProtocolOptions.ts b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/QuicProtocolOptions.ts index 5e01a772f..e88ab26a9 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/QuicProtocolOptions.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/QuicProtocolOptions.ts @@ -8,18 +8,21 @@ import type { TypedExtensionConfig as _envoy_config_core_v3_TypedExtensionConfig /** * Configuration specific to the UDP QUIC listener. - * [#next-free-field: 8] + * [#next-free-field: 10] */ export interface QuicProtocolOptions { 'quic_protocol_options'?: (_envoy_config_core_v3_QuicProtocolOptions | null); /** * Maximum number of milliseconds that connection will be alive when there is - * no network activity. 300000ms if not specified. + * no network activity. + * + * If it is less than 1ms, Envoy will use 1ms. 300000ms if not specified. */ 'idle_timeout'?: (_google_protobuf_Duration | null); /** * Connection timeout in milliseconds before the crypto handshake is finished. - * 20000ms if not specified. + * + * If it is less than 5000ms, Envoy will use 5000ms. 20000ms if not specified. */ 'crypto_handshake_timeout'?: (_google_protobuf_Duration | null); /** @@ -38,33 +41,49 @@ export interface QuicProtocolOptions { */ 'packets_to_read_to_connection_count_ratio'?: (_google_protobuf_UInt32Value | null); /** - * Configure which implementation of `quic::QuicCryptoClientStreamBase` to be used for this listener. + * Configure which implementation of ``quic::QuicCryptoClientStreamBase`` to be used for this listener. * If not specified the :ref:`QUICHE default one configured by ` will be used. * [#extension-category: envoy.quic.server.crypto_stream] */ 'crypto_stream_config'?: (_envoy_config_core_v3_TypedExtensionConfig | null); /** - * Configure which implementation of `quic::ProofSource` to be used for this listener. + * Configure which implementation of ``quic::ProofSource`` to be used for this listener. * If not specified the :ref:`default one configured by ` will be used. * [#extension-category: envoy.quic.proof_source] */ 'proof_source_config'?: (_envoy_config_core_v3_TypedExtensionConfig | null); + /** + * Config which implementation of ``quic::ConnectionIdGeneratorInterface`` to be used for this listener. + * If not specified the :ref:`default one configured by ` will be used. + * [#extension-category: envoy.quic.connection_id_generator] + */ + 'connection_id_generator_config'?: (_envoy_config_core_v3_TypedExtensionConfig | null); + /** + * Configure the server's preferred address to advertise so that client can migrate to it. See :ref:`example ` which configures a pair of v4 and v6 preferred addresses. + * The current QUICHE implementation will advertise only one of the preferred IPv4 and IPv6 addresses based on the address family the client initially connects with, and only if the client is also QUICHE-based. + * If not specified, Envoy will not advertise any server's preferred address. + * [#extension-category: envoy.quic.server_preferred_address] + */ + 'server_preferred_address_config'?: (_envoy_config_core_v3_TypedExtensionConfig | null); } /** * Configuration specific to the UDP QUIC listener. - * [#next-free-field: 8] + * [#next-free-field: 10] */ export interface QuicProtocolOptions__Output { 'quic_protocol_options': (_envoy_config_core_v3_QuicProtocolOptions__Output | null); /** * Maximum number of milliseconds that connection will be alive when there is - * no network activity. 300000ms if not specified. + * no network activity. + * + * If it is less than 1ms, Envoy will use 1ms. 300000ms if not specified. */ 'idle_timeout': (_google_protobuf_Duration__Output | null); /** * Connection timeout in milliseconds before the crypto handshake is finished. - * 20000ms if not specified. + * + * If it is less than 5000ms, Envoy will use 5000ms. 20000ms if not specified. */ 'crypto_handshake_timeout': (_google_protobuf_Duration__Output | null); /** @@ -83,15 +102,28 @@ export interface QuicProtocolOptions__Output { */ 'packets_to_read_to_connection_count_ratio': (_google_protobuf_UInt32Value__Output | null); /** - * Configure which implementation of `quic::QuicCryptoClientStreamBase` to be used for this listener. + * Configure which implementation of ``quic::QuicCryptoClientStreamBase`` to be used for this listener. * If not specified the :ref:`QUICHE default one configured by ` will be used. * [#extension-category: envoy.quic.server.crypto_stream] */ 'crypto_stream_config': (_envoy_config_core_v3_TypedExtensionConfig__Output | null); /** - * Configure which implementation of `quic::ProofSource` to be used for this listener. + * Configure which implementation of ``quic::ProofSource`` to be used for this listener. * If not specified the :ref:`default one configured by ` will be used. * [#extension-category: envoy.quic.proof_source] */ 'proof_source_config': (_envoy_config_core_v3_TypedExtensionConfig__Output | null); + /** + * Config which implementation of ``quic::ConnectionIdGeneratorInterface`` to be used for this listener. + * If not specified the :ref:`default one configured by ` will be used. + * [#extension-category: envoy.quic.connection_id_generator] + */ + 'connection_id_generator_config': (_envoy_config_core_v3_TypedExtensionConfig__Output | null); + /** + * Configure the server's preferred address to advertise so that client can migrate to it. See :ref:`example ` which configures a pair of v4 and v6 preferred addresses. + * The current QUICHE implementation will advertise only one of the preferred IPv4 and IPv6 addresses based on the address family the client initially connects with, and only if the client is also QUICHE-based. + * If not specified, Envoy will not advertise any server's preferred address. + * [#extension-category: envoy.quic.server_preferred_address] + */ + 'server_preferred_address_config': (_envoy_config_core_v3_TypedExtensionConfig__Output | null); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/UdpListenerConfig.ts b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/UdpListenerConfig.ts index f4c220e20..63f9666e0 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/UdpListenerConfig.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/UdpListenerConfig.ts @@ -2,9 +2,10 @@ import type { UdpSocketConfig as _envoy_config_core_v3_UdpSocketConfig, UdpSocketConfig__Output as _envoy_config_core_v3_UdpSocketConfig__Output } from '../../../../envoy/config/core/v3/UdpSocketConfig'; import type { QuicProtocolOptions as _envoy_config_listener_v3_QuicProtocolOptions, QuicProtocolOptions__Output as _envoy_config_listener_v3_QuicProtocolOptions__Output } from '../../../../envoy/config/listener/v3/QuicProtocolOptions'; +import type { TypedExtensionConfig as _envoy_config_core_v3_TypedExtensionConfig, TypedExtensionConfig__Output as _envoy_config_core_v3_TypedExtensionConfig__Output } from '../../../../envoy/config/core/v3/TypedExtensionConfig'; /** - * [#next-free-field: 8] + * [#next-free-field: 9] */ export interface UdpListenerConfig { /** @@ -17,16 +18,21 @@ export interface UdpListenerConfig { /** * Configuration for QUIC protocol. If empty, QUIC will not be enabled on this listener. Set * to the default object to enable QUIC without modifying any additional options. - * - * .. warning:: - * QUIC support is currently alpha and should be used with caution. Please - * see :ref:`here ` for details. */ 'quic_options'?: (_envoy_config_listener_v3_QuicProtocolOptions | null); + /** + * Configuration for the UDP packet writer. If empty, HTTP/3 will use GSO if available + * (:ref:`UdpDefaultWriterFactory `) + * or the default kernel sendmsg if not, + * (:ref:`UdpDefaultWriterFactory `) + * and raw UDP will use kernel sendmsg. + * [#extension-category: envoy.udp_packet_writer] + */ + 'udp_packet_packet_writer_config'?: (_envoy_config_core_v3_TypedExtensionConfig | null); } /** - * [#next-free-field: 8] + * [#next-free-field: 9] */ export interface UdpListenerConfig__Output { /** @@ -39,10 +45,15 @@ export interface UdpListenerConfig__Output { /** * Configuration for QUIC protocol. If empty, QUIC will not be enabled on this listener. Set * to the default object to enable QUIC without modifying any additional options. - * - * .. warning:: - * QUIC support is currently alpha and should be used with caution. Please - * see :ref:`here ` for details. */ 'quic_options': (_envoy_config_listener_v3_QuicProtocolOptions__Output | null); + /** + * Configuration for the UDP packet writer. If empty, HTTP/3 will use GSO if available + * (:ref:`UdpDefaultWriterFactory `) + * or the default kernel sendmsg if not, + * (:ref:`UdpDefaultWriterFactory `) + * and raw UDP will use kernel sendmsg. + * [#extension-category: envoy.udp_packet_writer] + */ + 'udp_packet_packet_writer_config': (_envoy_config_core_v3_TypedExtensionConfig__Output | null); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ValidationListenerManager.ts b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ValidationListenerManager.ts new file mode 100644 index 000000000..3b6ccc3a6 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/config/listener/v3/ValidationListenerManager.ts @@ -0,0 +1,18 @@ +// Original file: deps/envoy-api/envoy/config/listener/v3/listener.proto + + +/** + * A placeholder proto so that users can explicitly configure the standard + * Validation Listener Manager via the bootstrap's :ref:`listener_manager `. + * [#not-implemented-hide:] + */ +export interface ValidationListenerManager { +} + +/** + * A placeholder proto so that users can explicitly configure the standard + * Validation Listener Manager via the bootstrap's :ref:`listener_manager `. + * [#not-implemented-hide:] + */ +export interface ValidationListenerManager__Output { +} diff --git a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/ClusterSpecifierPlugin.ts b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/ClusterSpecifierPlugin.ts index 14724412a..3742eeb6b 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/ClusterSpecifierPlugin.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/ClusterSpecifierPlugin.ts @@ -1,4 +1,4 @@ -// Original file: deps/envoy-api/envoy/config/route/v3/route.proto +// Original file: deps/envoy-api/envoy/config/route/v3/route_components.proto import type { TypedExtensionConfig as _envoy_config_core_v3_TypedExtensionConfig, TypedExtensionConfig__Output as _envoy_config_core_v3_TypedExtensionConfig__Output } from '../../../../envoy/config/core/v3/TypedExtensionConfig'; @@ -10,6 +10,14 @@ export interface ClusterSpecifierPlugin { * The name of the plugin and its opaque configuration. */ 'extension'?: (_envoy_config_core_v3_TypedExtensionConfig | null); + /** + * If is_optional is not set or is set to false and the plugin defined by this message is not a + * supported type, the containing resource is NACKed. If is_optional is set to true, the resource + * would not be NACKed for this reason. In this case, routes referencing this plugin's name would + * not be treated as an illegal configuration, but would result in a failure if the route is + * selected. + */ + 'is_optional'?: (boolean); } /** @@ -20,4 +28,12 @@ export interface ClusterSpecifierPlugin__Output { * The name of the plugin and its opaque configuration. */ 'extension': (_envoy_config_core_v3_TypedExtensionConfig__Output | null); + /** + * If is_optional is not set or is set to false and the plugin defined by this message is not a + * supported type, the containing resource is NACKed. If is_optional is set to true, the resource + * would not be NACKed for this reason. In this case, routes referencing this plugin's name would + * not be treated as an illegal configuration, but would result in a failure if the route is + * selected. + */ + 'is_optional': (boolean); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/CorsPolicy.ts b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/CorsPolicy.ts index 40634448a..8a74b0658 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/CorsPolicy.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/CorsPolicy.ts @@ -5,23 +5,31 @@ import type { RuntimeFractionalPercent as _envoy_config_core_v3_RuntimeFractiona import type { StringMatcher as _envoy_type_matcher_v3_StringMatcher, StringMatcher__Output as _envoy_type_matcher_v3_StringMatcher__Output } from '../../../../envoy/type/matcher/v3/StringMatcher'; /** - * [#next-free-field: 12] + * Cors policy configuration. + * + * .. attention:: + * + * This message has been deprecated. Please use + * :ref:`CorsPolicy in filter extension ` + * as as alternative. + * + * [#next-free-field: 13] */ export interface CorsPolicy { /** - * Specifies the content for the *access-control-allow-methods* header. + * Specifies the content for the ``access-control-allow-methods`` header. */ 'allow_methods'?: (string); /** - * Specifies the content for the *access-control-allow-headers* header. + * Specifies the content for the ``access-control-allow-headers`` header. */ 'allow_headers'?: (string); /** - * Specifies the content for the *access-control-expose-headers* header. + * Specifies the content for the ``access-control-expose-headers`` header. */ 'expose_headers'?: (string); /** - * Specifies the content for the *access-control-max-age* header. + * Specifies the content for the ``access-control-max-age`` header. */ 'max_age'?: (string); /** @@ -47,7 +55,7 @@ export interface CorsPolicy { * * If :ref:`runtime_key ` is specified, * Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate - * and track the request's *Origin* to determine if it's valid but will not enforce any policies. + * and track the request's ``Origin`` to determine if it's valid but will not enforce any policies. */ 'shadow_enabled'?: (_envoy_config_core_v3_RuntimeFractionalPercent | null); /** @@ -55,27 +63,42 @@ export interface CorsPolicy { * string matchers match. */ 'allow_origin_string_match'?: (_envoy_type_matcher_v3_StringMatcher)[]; + /** + * Specify whether allow requests whose target server's IP address is more private than that from + * which the request initiator was fetched. + * + * More details refer to https://developer.chrome.com/blog/private-network-access-preflight. + */ + 'allow_private_network_access'?: (_google_protobuf_BoolValue | null); 'enabled_specifier'?: "filter_enabled"; } /** - * [#next-free-field: 12] + * Cors policy configuration. + * + * .. attention:: + * + * This message has been deprecated. Please use + * :ref:`CorsPolicy in filter extension ` + * as as alternative. + * + * [#next-free-field: 13] */ export interface CorsPolicy__Output { /** - * Specifies the content for the *access-control-allow-methods* header. + * Specifies the content for the ``access-control-allow-methods`` header. */ 'allow_methods': (string); /** - * Specifies the content for the *access-control-allow-headers* header. + * Specifies the content for the ``access-control-allow-headers`` header. */ 'allow_headers': (string); /** - * Specifies the content for the *access-control-expose-headers* header. + * Specifies the content for the ``access-control-expose-headers`` header. */ 'expose_headers': (string); /** - * Specifies the content for the *access-control-max-age* header. + * Specifies the content for the ``access-control-max-age`` header. */ 'max_age': (string); /** @@ -101,7 +124,7 @@ export interface CorsPolicy__Output { * * If :ref:`runtime_key ` is specified, * Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate - * and track the request's *Origin* to determine if it's valid but will not enforce any policies. + * and track the request's ``Origin`` to determine if it's valid but will not enforce any policies. */ 'shadow_enabled': (_envoy_config_core_v3_RuntimeFractionalPercent__Output | null); /** @@ -109,5 +132,12 @@ export interface CorsPolicy__Output { * string matchers match. */ 'allow_origin_string_match': (_envoy_type_matcher_v3_StringMatcher__Output)[]; + /** + * Specify whether allow requests whose target server's IP address is more private than that from + * which the request initiator was fetched. + * + * More details refer to https://developer.chrome.com/blog/private-network-access-preflight. + */ + 'allow_private_network_access': (_google_protobuf_BoolValue__Output | null); 'enabled_specifier': "filter_enabled"; } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/DirectResponseAction.ts b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/DirectResponseAction.ts index 794ae510a..7c0f9ee67 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/DirectResponseAction.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/DirectResponseAction.ts @@ -13,7 +13,7 @@ export interface DirectResponseAction { * * .. note:: * - * Headers can be specified using *response_headers_to_add* in the enclosing + * Headers can be specified using ``response_headers_to_add`` in the enclosing * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` or * :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`. */ @@ -31,7 +31,7 @@ export interface DirectResponseAction__Output { * * .. note:: * - * Headers can be specified using *response_headers_to_add* in the enclosing + * Headers can be specified using ``response_headers_to_add`` in the enclosing * :ref:`envoy_v3_api_msg_config.route.v3.Route`, :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` or * :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`. */ diff --git a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/FilterConfig.ts b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/FilterConfig.ts index 2c960419c..e5a3b5778 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/FilterConfig.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/FilterConfig.ts @@ -9,7 +9,6 @@ import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__ * :ref:`Route.typed_per_filter_config`, * or :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config` * to add additional flags to the filter. - * [#not-implemented-hide:] */ export interface FilterConfig { /** @@ -22,6 +21,23 @@ export interface FilterConfig { * than rejecting the config. */ 'is_optional'?: (boolean); + /** + * If true, the filter is disabled in the route or virtual host and the ``config`` field is ignored. + * + * .. note:: + * + * This field will take effect when the request arrive and filter chain is created for the request. + * If initial route is selected for the request and a filter is disabled in the initial route, then + * the filter will not be added to the filter chain. + * And if the request is mutated later and re-match to another route, the disabled filter by the + * initial route will not be added back to the filter chain because the filter chain is already + * created and it is too late to change the chain. + * + * This field only make sense for the downstream HTTP filters for now. + * + * [#not-implemented-hide:] + */ + 'disabled'?: (boolean); } /** @@ -31,7 +47,6 @@ export interface FilterConfig { * :ref:`Route.typed_per_filter_config`, * or :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config` * to add additional flags to the filter. - * [#not-implemented-hide:] */ export interface FilterConfig__Output { /** @@ -44,4 +59,21 @@ export interface FilterConfig__Output { * than rejecting the config. */ 'is_optional': (boolean); + /** + * If true, the filter is disabled in the route or virtual host and the ``config`` field is ignored. + * + * .. note:: + * + * This field will take effect when the request arrive and filter chain is created for the request. + * If initial route is selected for the request and a filter is disabled in the initial route, then + * the filter will not be added to the filter chain. + * And if the request is mutated later and re-match to another route, the disabled filter by the + * initial route will not be added back to the filter chain because the filter chain is already + * created and it is too late to change the chain. + * + * This field only make sense for the downstream HTTP filters for now. + * + * [#not-implemented-hide:] + */ + 'disabled': (boolean); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/HeaderMatcher.ts b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/HeaderMatcher.ts index bde8f28cd..e073a8f13 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/HeaderMatcher.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/HeaderMatcher.ts @@ -8,19 +8,21 @@ import type { Long } from '@grpc/proto-loader'; /** * .. attention:: * - * Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 *Host* - * header. Thus, if attempting to match on *Host*, match on *:authority* instead. + * Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1 ``Host`` + * header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead. * * .. attention:: * - * To route on HTTP method, use the special HTTP/2 *:method* header. This works for both + * To route on HTTP method, use the special HTTP/2 ``:method`` header. This works for both * HTTP/1 and HTTP/2 as Envoy normalizes headers. E.g., * * .. code-block:: json * * { * "name": ":method", - * "exact_match": "POST" + * "string_match": { + * "exact": "POST" + * } * } * * .. attention:: @@ -30,7 +32,7 @@ import type { Long } from '@grpc/proto-loader'; * value. * * [#next-major-version: HeaderMatcher should be refactored to use StringMatcher.] - * [#next-free-field: 14] + * [#next-free-field: 15] */ export interface HeaderMatcher { /** @@ -52,8 +54,8 @@ export interface HeaderMatcher { * * Examples: * - * * For range [-10,0), route will match for header value -1, but not for 0, "somestring", 10.9, - * "-1somestring" + * * For range [-10,0), route will match for header value -1, but not for 0, ``somestring``, 10.9, + * ``-1somestring`` */ 'range_match'?: (_envoy_type_v3_Int64Range | null); /** @@ -66,7 +68,7 @@ export interface HeaderMatcher { * * Examples: * - * * The regex ``\d{3}`` does not match the value *1234*, so it will match when inverted. + * * The regex ``\d{3}`` does not match the value ``1234``, so it will match when inverted. * * The range [-10,0) will match the value -1, so it will not match when inverted. */ 'invert_match'?: (boolean); @@ -77,7 +79,7 @@ export interface HeaderMatcher { * * Examples: * - * * The prefix *abcd* matches the value *abcdxyz*, but not for *abcxyz*. + * * The prefix ``abcd`` matches the value ``abcdxyz``, but not for ``abcxyz``. */ 'prefix_match'?: (string); /** @@ -87,7 +89,7 @@ export interface HeaderMatcher { * * Examples: * - * * The suffix *abcd* matches the value *xyzabcd*, but not for *xyzbcd*. + * * The suffix ``abcd`` matches the value ``xyzabcd``, but not for ``xyzbcd``. */ 'suffix_match'?: (string); /** @@ -105,13 +107,42 @@ export interface HeaderMatcher { * * Examples: * - * * The value *abcd* matches the value *xyzabcdpqr*, but not for *xyzbcdpqr*. + * * The value ``abcd`` matches the value ``xyzabcdpqr``, but not for ``xyzbcdpqr``. */ 'contains_match'?: (string); /** * If specified, header match will be performed based on the string match of the header value. */ 'string_match'?: (_envoy_type_matcher_v3_StringMatcher | null); + /** + * If specified, for any header match rule, if the header match rule specified header + * does not exist, this header value will be treated as empty. Defaults to false. + * + * Examples: + * + * * The header match rule specified header "header1" to range match of [0, 10], + * :ref:`invert_match ` + * is set to true and :ref:`treat_missing_header_as_empty ` + * is set to true; The "header1" header is not present. The match rule will + * treat the "header1" as an empty header. The empty header does not match the range, + * so it will match when inverted. + * * The header match rule specified header "header2" to range match of [0, 10], + * :ref:`invert_match ` + * is set to true and :ref:`treat_missing_header_as_empty ` + * is set to false; The "header2" header is not present and the header + * matcher rule for "header2" will be ignored so it will not match. + * * The header match rule specified header "header3" to a string regex match + * ``^$`` which means an empty string, and + * :ref:`treat_missing_header_as_empty ` + * is set to true; The "header3" header is not present. + * The match rule will treat the "header3" header as an empty header so it will match. + * * The header match rule specified header "header4" to a string regex match + * ``^$`` which means an empty string, and + * :ref:`treat_missing_header_as_empty ` + * is set to false; The "header4" header is not present. + * The match rule for "header4" will be ignored so it will not match. + */ + 'treat_missing_header_as_empty'?: (boolean); /** * Specifies how the header match will be performed to route the request. */ @@ -121,19 +152,21 @@ export interface HeaderMatcher { /** * .. attention:: * - * Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 *Host* - * header. Thus, if attempting to match on *Host*, match on *:authority* instead. + * Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1 ``Host`` + * header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead. * * .. attention:: * - * To route on HTTP method, use the special HTTP/2 *:method* header. This works for both + * To route on HTTP method, use the special HTTP/2 ``:method`` header. This works for both * HTTP/1 and HTTP/2 as Envoy normalizes headers. E.g., * * .. code-block:: json * * { * "name": ":method", - * "exact_match": "POST" + * "string_match": { + * "exact": "POST" + * } * } * * .. attention:: @@ -143,7 +176,7 @@ export interface HeaderMatcher { * value. * * [#next-major-version: HeaderMatcher should be refactored to use StringMatcher.] - * [#next-free-field: 14] + * [#next-free-field: 15] */ export interface HeaderMatcher__Output { /** @@ -165,8 +198,8 @@ export interface HeaderMatcher__Output { * * Examples: * - * * For range [-10,0), route will match for header value -1, but not for 0, "somestring", 10.9, - * "-1somestring" + * * For range [-10,0), route will match for header value -1, but not for 0, ``somestring``, 10.9, + * ``-1somestring`` */ 'range_match'?: (_envoy_type_v3_Int64Range__Output | null); /** @@ -179,7 +212,7 @@ export interface HeaderMatcher__Output { * * Examples: * - * * The regex ``\d{3}`` does not match the value *1234*, so it will match when inverted. + * * The regex ``\d{3}`` does not match the value ``1234``, so it will match when inverted. * * The range [-10,0) will match the value -1, so it will not match when inverted. */ 'invert_match': (boolean); @@ -190,7 +223,7 @@ export interface HeaderMatcher__Output { * * Examples: * - * * The prefix *abcd* matches the value *abcdxyz*, but not for *abcxyz*. + * * The prefix ``abcd`` matches the value ``abcdxyz``, but not for ``abcxyz``. */ 'prefix_match'?: (string); /** @@ -200,7 +233,7 @@ export interface HeaderMatcher__Output { * * Examples: * - * * The suffix *abcd* matches the value *xyzabcd*, but not for *xyzbcd*. + * * The suffix ``abcd`` matches the value ``xyzabcd``, but not for ``xyzbcd``. */ 'suffix_match'?: (string); /** @@ -218,13 +251,42 @@ export interface HeaderMatcher__Output { * * Examples: * - * * The value *abcd* matches the value *xyzabcdpqr*, but not for *xyzbcdpqr*. + * * The value ``abcd`` matches the value ``xyzabcdpqr``, but not for ``xyzbcdpqr``. */ 'contains_match'?: (string); /** * If specified, header match will be performed based on the string match of the header value. */ 'string_match'?: (_envoy_type_matcher_v3_StringMatcher__Output | null); + /** + * If specified, for any header match rule, if the header match rule specified header + * does not exist, this header value will be treated as empty. Defaults to false. + * + * Examples: + * + * * The header match rule specified header "header1" to range match of [0, 10], + * :ref:`invert_match ` + * is set to true and :ref:`treat_missing_header_as_empty ` + * is set to true; The "header1" header is not present. The match rule will + * treat the "header1" as an empty header. The empty header does not match the range, + * so it will match when inverted. + * * The header match rule specified header "header2" to range match of [0, 10], + * :ref:`invert_match ` + * is set to true and :ref:`treat_missing_header_as_empty ` + * is set to false; The "header2" header is not present and the header + * matcher rule for "header2" will be ignored so it will not match. + * * The header match rule specified header "header3" to a string regex match + * ``^$`` which means an empty string, and + * :ref:`treat_missing_header_as_empty ` + * is set to true; The "header3" header is not present. + * The match rule will treat the "header3" header as an empty header so it will match. + * * The header match rule specified header "header4" to a string regex match + * ``^$`` which means an empty string, and + * :ref:`treat_missing_header_as_empty ` + * is set to false; The "header4" header is not present. + * The match rule for "header4" will be ignored so it will not match. + */ + 'treat_missing_header_as_empty': (boolean); /** * Specifies how the header match will be performed to route the request. */ diff --git a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/QueryParameterMatcher.ts b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/QueryParameterMatcher.ts index d511259b0..b98b6329b 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/QueryParameterMatcher.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/QueryParameterMatcher.ts @@ -10,7 +10,7 @@ import type { StringMatcher as _envoy_type_matcher_v3_StringMatcher, StringMatch export interface QueryParameterMatcher { /** * Specifies the name of a key that must be present in the requested - * *path*'s query string. + * ``path``'s query string. */ 'name'?: (string); /** @@ -32,7 +32,7 @@ export interface QueryParameterMatcher { export interface QueryParameterMatcher__Output { /** * Specifies the name of a key that must be present in the requested - * *path*'s query string. + * ``path``'s query string. */ 'name': (string); /** diff --git a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RateLimit.ts b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RateLimit.ts index f1d49537c..cd47e471a 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RateLimit.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RateLimit.ts @@ -5,9 +5,10 @@ import type { TypedExtensionConfig as _envoy_config_core_v3_TypedExtensionConfig import type { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _google_protobuf_BoolValue__Output } from '../../../../google/protobuf/BoolValue'; import type { HeaderMatcher as _envoy_config_route_v3_HeaderMatcher, HeaderMatcher__Output as _envoy_config_route_v3_HeaderMatcher__Output } from '../../../../envoy/config/route/v3/HeaderMatcher'; import type { MetadataKey as _envoy_type_metadata_v3_MetadataKey, MetadataKey__Output as _envoy_type_metadata_v3_MetadataKey__Output } from '../../../../envoy/type/metadata/v3/MetadataKey'; +import type { QueryParameterMatcher as _envoy_config_route_v3_QueryParameterMatcher, QueryParameterMatcher__Output as _envoy_config_route_v3_QueryParameterMatcher__Output } from '../../../../envoy/config/route/v3/QueryParameterMatcher'; /** - * [#next-free-field: 10] + * [#next-free-field: 12] */ export interface _envoy_config_route_v3_RateLimit_Action { /** @@ -47,14 +48,28 @@ export interface _envoy_config_route_v3_RateLimit_Action { 'metadata'?: (_envoy_config_route_v3_RateLimit_Action_MetaData | null); /** * Rate limit descriptor extension. See the rate limit descriptor extensions documentation. + * + * :ref:`HTTP matching input functions ` are + * permitted as descriptor extensions. The input functions are only + * looked up if there is no rate limit descriptor extension matching + * the type URL. + * * [#extension-category: envoy.rate_limit_descriptors] */ 'extension'?: (_envoy_config_core_v3_TypedExtensionConfig | null); - 'action_specifier'?: "source_cluster"|"destination_cluster"|"request_headers"|"remote_address"|"generic_key"|"header_value_match"|"dynamic_metadata"|"metadata"|"extension"; + /** + * Rate limit on masked remote address. + */ + 'masked_remote_address'?: (_envoy_config_route_v3_RateLimit_Action_MaskedRemoteAddress | null); + /** + * Rate limit on the existence of query parameters. + */ + 'query_parameter_value_match'?: (_envoy_config_route_v3_RateLimit_Action_QueryParameterValueMatch | null); + 'action_specifier'?: "source_cluster"|"destination_cluster"|"request_headers"|"remote_address"|"generic_key"|"header_value_match"|"dynamic_metadata"|"metadata"|"extension"|"masked_remote_address"|"query_parameter_value_match"; } /** - * [#next-free-field: 10] + * [#next-free-field: 12] */ export interface _envoy_config_route_v3_RateLimit_Action__Output { /** @@ -94,10 +109,24 @@ export interface _envoy_config_route_v3_RateLimit_Action__Output { 'metadata'?: (_envoy_config_route_v3_RateLimit_Action_MetaData__Output | null); /** * Rate limit descriptor extension. See the rate limit descriptor extensions documentation. + * + * :ref:`HTTP matching input functions ` are + * permitted as descriptor extensions. The input functions are only + * looked up if there is no rate limit descriptor extension matching + * the type URL. + * * [#extension-category: envoy.rate_limit_descriptors] */ 'extension'?: (_envoy_config_core_v3_TypedExtensionConfig__Output | null); - 'action_specifier': "source_cluster"|"destination_cluster"|"request_headers"|"remote_address"|"generic_key"|"header_value_match"|"dynamic_metadata"|"metadata"|"extension"; + /** + * Rate limit on masked remote address. + */ + 'masked_remote_address'?: (_envoy_config_route_v3_RateLimit_Action_MaskedRemoteAddress__Output | null); + /** + * Rate limit on the existence of query parameters. + */ + 'query_parameter_value_match'?: (_envoy_config_route_v3_RateLimit_Action_QueryParameterValueMatch__Output | null); + 'action_specifier': "source_cluster"|"destination_cluster"|"request_headers"|"remote_address"|"generic_key"|"header_value_match"|"dynamic_metadata"|"metadata"|"extension"|"masked_remote_address"|"query_parameter_value_match"; } /** @@ -164,7 +193,7 @@ export interface _envoy_config_route_v3_RateLimit_Action_DynamicMetaData { */ 'metadata_key'?: (_envoy_type_metadata_v3_MetadataKey | null); /** - * An optional value to use if *metadata_key* is empty. If not set and + * An optional value to use if ``metadata_key`` is empty. If not set and * no value is present under the metadata_key then no descriptor is generated. */ 'default_value'?: (string); @@ -192,7 +221,7 @@ export interface _envoy_config_route_v3_RateLimit_Action_DynamicMetaData__Output */ 'metadata_key': (_envoy_type_metadata_v3_MetadataKey__Output | null); /** - * An optional value to use if *metadata_key* is empty. If not set and + * An optional value to use if ``metadata_key`` is empty. If not set and * no value is present under the metadata_key then no descriptor is generated. */ 'default_value': (string); @@ -270,6 +299,10 @@ export interface _envoy_config_route_v3_RateLimit_Action_GenericKey__Output { * ("header_match", "") */ export interface _envoy_config_route_v3_RateLimit_Action_HeaderValueMatch { + /** + * The key to use in the descriptor entry. Defaults to ``header_match``. + */ + 'descriptor_key'?: (string); /** * The value to use in the descriptor entry. */ @@ -299,6 +332,10 @@ export interface _envoy_config_route_v3_RateLimit_Action_HeaderValueMatch { * ("header_match", "") */ export interface _envoy_config_route_v3_RateLimit_Action_HeaderValueMatch__Output { + /** + * The key to use in the descriptor entry. Defaults to ``header_match``. + */ + 'descriptor_key': (string); /** * The value to use in the descriptor entry. */ @@ -320,12 +357,67 @@ export interface _envoy_config_route_v3_RateLimit_Action_HeaderValueMatch__Outpu 'headers': (_envoy_config_route_v3_HeaderMatcher__Output)[]; } +/** + * The following descriptor entry is appended to the descriptor and is populated using the + * masked address from :ref:`x-forwarded-for `: + * + * .. code-block:: cpp + * + * ("masked_remote_address", "") + */ +export interface _envoy_config_route_v3_RateLimit_Action_MaskedRemoteAddress { + /** + * Length of prefix mask len for IPv4 (e.g. 0, 32). + * Defaults to 32 when unset. + * For example, trusted address from x-forwarded-for is ``192.168.1.1``, + * the descriptor entry is ("masked_remote_address", "192.168.1.1/32"); + * if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24"). + */ + 'v4_prefix_mask_len'?: (_google_protobuf_UInt32Value | null); + /** + * Length of prefix mask len for IPv6 (e.g. 0, 128). + * Defaults to 128 when unset. + * For example, trusted address from x-forwarded-for is ``2001:abcd:ef01:2345:6789:abcd:ef01:234``, + * the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128"); + * if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64"). + */ + 'v6_prefix_mask_len'?: (_google_protobuf_UInt32Value | null); +} + +/** + * The following descriptor entry is appended to the descriptor and is populated using the + * masked address from :ref:`x-forwarded-for `: + * + * .. code-block:: cpp + * + * ("masked_remote_address", "") + */ +export interface _envoy_config_route_v3_RateLimit_Action_MaskedRemoteAddress__Output { + /** + * Length of prefix mask len for IPv4 (e.g. 0, 32). + * Defaults to 32 when unset. + * For example, trusted address from x-forwarded-for is ``192.168.1.1``, + * the descriptor entry is ("masked_remote_address", "192.168.1.1/32"); + * if mask len is 24, the descriptor entry is ("masked_remote_address", "192.168.1.0/24"). + */ + 'v4_prefix_mask_len': (_google_protobuf_UInt32Value__Output | null); + /** + * Length of prefix mask len for IPv6 (e.g. 0, 128). + * Defaults to 128 when unset. + * For example, trusted address from x-forwarded-for is ``2001:abcd:ef01:2345:6789:abcd:ef01:234``, + * the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345:6789:abcd:ef01:234/128"); + * if mask len is 64, the descriptor entry is ("masked_remote_address", "2001:abcd:ef01:2345::/64"). + */ + 'v6_prefix_mask_len': (_google_protobuf_UInt32Value__Output | null); +} + /** * The following descriptor entry is appended when the metadata contains a key value: * * .. code-block:: cpp * * ("", "") + * [#next-free-field: 6] */ export interface _envoy_config_route_v3_RateLimit_Action_MetaData { /** @@ -338,14 +430,21 @@ export interface _envoy_config_route_v3_RateLimit_Action_MetaData { */ 'metadata_key'?: (_envoy_type_metadata_v3_MetadataKey | null); /** - * An optional value to use if *metadata_key* is empty. If not set and - * no value is present under the metadata_key then no descriptor is generated. + * An optional value to use if ``metadata_key`` is empty. If not set and + * no value is present under the metadata_key then ``skip_if_absent`` is followed to + * skip calling the rate limiting service or skip the descriptor. */ 'default_value'?: (string); /** * Source of metadata */ 'source'?: (_envoy_config_route_v3_RateLimit_Action_MetaData_Source | keyof typeof _envoy_config_route_v3_RateLimit_Action_MetaData_Source); + /** + * If set to true, Envoy skips the descriptor while calling rate limiting service + * when ``metadata_key`` is empty and ``default_value`` is not set. By default it skips calling the + * rate limiting service in that case. + */ + 'skip_if_absent'?: (boolean); } /** @@ -354,6 +453,7 @@ export interface _envoy_config_route_v3_RateLimit_Action_MetaData { * .. code-block:: cpp * * ("", "") + * [#next-free-field: 6] */ export interface _envoy_config_route_v3_RateLimit_Action_MetaData__Output { /** @@ -366,14 +466,21 @@ export interface _envoy_config_route_v3_RateLimit_Action_MetaData__Output { */ 'metadata_key': (_envoy_type_metadata_v3_MetadataKey__Output | null); /** - * An optional value to use if *metadata_key* is empty. If not set and - * no value is present under the metadata_key then no descriptor is generated. + * An optional value to use if ``metadata_key`` is empty. If not set and + * no value is present under the metadata_key then ``skip_if_absent`` is followed to + * skip calling the rate limiting service or skip the descriptor. */ 'default_value': (string); /** * Source of metadata */ 'source': (keyof typeof _envoy_config_route_v3_RateLimit_Action_MetaData_Source); + /** + * If set to true, Envoy skips the descriptor while calling rate limiting service + * when ``metadata_key`` is empty and ``default_value`` is not set. By default it skips calling the + * rate limiting service in that case. + */ + 'skip_if_absent': (boolean); } export interface _envoy_config_route_v3_RateLimit_Override { @@ -392,6 +499,72 @@ export interface _envoy_config_route_v3_RateLimit_Override__Output { 'override_specifier': "dynamic_metadata"; } +/** + * The following descriptor entry is appended to the descriptor: + * + * .. code-block:: cpp + * + * ("query_match", "") + */ +export interface _envoy_config_route_v3_RateLimit_Action_QueryParameterValueMatch { + /** + * The key to use in the descriptor entry. Defaults to ``query_match``. + */ + 'descriptor_key'?: (string); + /** + * The value to use in the descriptor entry. + */ + 'descriptor_value'?: (string); + /** + * If set to true, the action will append a descriptor entry when the + * request matches the headers. If set to false, the action will append a + * descriptor entry when the request does not match the headers. The + * default value is true. + */ + 'expect_match'?: (_google_protobuf_BoolValue | null); + /** + * Specifies a set of query parameters that the rate limit action should match + * on. The action will check the request’s query parameters against all the + * specified query parameters in the config. A match will happen if all the + * query parameters in the config are present in the request with the same values + * (or based on presence if the value field is not in the config). + */ + 'query_parameters'?: (_envoy_config_route_v3_QueryParameterMatcher)[]; +} + +/** + * The following descriptor entry is appended to the descriptor: + * + * .. code-block:: cpp + * + * ("query_match", "") + */ +export interface _envoy_config_route_v3_RateLimit_Action_QueryParameterValueMatch__Output { + /** + * The key to use in the descriptor entry. Defaults to ``query_match``. + */ + 'descriptor_key': (string); + /** + * The value to use in the descriptor entry. + */ + 'descriptor_value': (string); + /** + * If set to true, the action will append a descriptor entry when the + * request matches the headers. If set to false, the action will append a + * descriptor entry when the request does not match the headers. The + * default value is true. + */ + 'expect_match': (_google_protobuf_BoolValue__Output | null); + /** + * Specifies a set of query parameters that the rate limit action should match + * on. The action will check the request’s query parameters against all the + * specified query parameters in the config. A match will happen if all the + * query parameters in the config are present in the request with the same values + * (or based on presence if the value field is not in the config). + */ + 'query_parameters': (_envoy_config_route_v3_QueryParameterMatcher__Output)[]; +} + /** * The following descriptor entry is appended to the descriptor and is populated using the * trusted address from :ref:`x-forwarded-for `: @@ -416,7 +589,7 @@ export interface _envoy_config_route_v3_RateLimit_Action_RemoteAddress__Output { /** * The following descriptor entry is appended when a header contains a key that matches the - * *header_name*: + * ``header_name``: * * .. code-block:: cpp * @@ -443,7 +616,7 @@ export interface _envoy_config_route_v3_RateLimit_Action_RequestHeaders { /** * The following descriptor entry is appended when a header contains a key that matches the - * *header_name*: + * ``header_name``: * * .. code-block:: cpp * diff --git a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RedirectAction.ts b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RedirectAction.ts index e6d41fd7b..fd11a681b 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RedirectAction.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RedirectAction.ts @@ -115,10 +115,10 @@ export interface RedirectAction { 'regex_rewrite'?: (_envoy_type_matcher_v3_RegexMatchAndSubstitute | null); /** * When the scheme redirection take place, the following rules apply: - * 1. If the source URI scheme is `http` and the port is explicitly - * set to `:80`, the port will be removed after the redirection - * 2. If the source URI scheme is `https` and the port is explicitly - * set to `:443`, the port will be removed after the redirection + * 1. If the source URI scheme is ``http`` and the port is explicitly + * set to ``:80``, the port will be removed after the redirection + * 2. If the source URI scheme is ``https`` and the port is explicitly + * set to ``:443``, the port will be removed after the redirection */ 'scheme_rewrite_specifier'?: "https_redirect"|"scheme_redirect"; 'path_rewrite_specifier'?: "path_redirect"|"prefix_rewrite"|"regex_rewrite"; @@ -212,10 +212,10 @@ export interface RedirectAction__Output { 'regex_rewrite'?: (_envoy_type_matcher_v3_RegexMatchAndSubstitute__Output | null); /** * When the scheme redirection take place, the following rules apply: - * 1. If the source URI scheme is `http` and the port is explicitly - * set to `:80`, the port will be removed after the redirection - * 2. If the source URI scheme is `https` and the port is explicitly - * set to `:443`, the port will be removed after the redirection + * 1. If the source URI scheme is ``http`` and the port is explicitly + * set to ``:80``, the port will be removed after the redirection + * 2. If the source URI scheme is ``https`` and the port is explicitly + * set to ``:443``, the port will be removed after the redirection */ 'scheme_rewrite_specifier': "https_redirect"|"scheme_redirect"; 'path_rewrite_specifier': "path_redirect"|"prefix_rewrite"|"regex_rewrite"; diff --git a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RetryPolicy.ts b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RetryPolicy.ts index 0d523b52e..d60458728 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RetryPolicy.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RetryPolicy.ts @@ -176,8 +176,8 @@ export interface _envoy_config_route_v3_RetryPolicy_RetryBackOff { 'base_interval'?: (_google_protobuf_Duration | null); /** * Specifies the maximum interval between retries. This parameter is optional, but must be - * greater than or equal to the `base_interval` if set. The default is 10 times the - * `base_interval`. See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion + * greater than or equal to the ``base_interval`` if set. The default is 10 times the + * ``base_interval``. See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion * of Envoy's back-off algorithm. */ 'max_interval'?: (_google_protobuf_Duration | null); @@ -193,8 +193,8 @@ export interface _envoy_config_route_v3_RetryPolicy_RetryBackOff__Output { 'base_interval': (_google_protobuf_Duration__Output | null); /** * Specifies the maximum interval between retries. This parameter is optional, but must be - * greater than or equal to the `base_interval` if set. The default is 10 times the - * `base_interval`. See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion + * greater than or equal to the ``base_interval`` if set. The default is 10 times the + * ``base_interval``. See :ref:`config_http_filters_router_x-envoy-max-retries` for a discussion * of Envoy's back-off algorithm. */ 'max_interval': (_google_protobuf_Duration__Output | null); @@ -293,7 +293,7 @@ export interface RetryPolicy { /** * Specifies parameters that control exponential retry back off. This parameter is optional, in which case the * default base interval is 25 milliseconds or, if set, the current value of the - * `upstream.base_retry_backoff_ms` runtime parameter. The default maximum interval is 10 times + * ``upstream.base_retry_backoff_ms`` runtime parameter. The default maximum interval is 10 times * the base interval. The documentation for :ref:`config_http_filters_router_x-envoy-max-retries` * describes Envoy's back-off algorithm. */ @@ -314,7 +314,7 @@ export interface RetryPolicy { * return a response header like ``Retry-After`` or ``X-RateLimit-Reset`` to * provide feedback to the client on how long to wait before retrying. If * configured, this back-off strategy will be used instead of the - * default exponential back off strategy (configured using `retry_back_off`) + * default exponential back off strategy (configured using ``retry_back_off``) * whenever a response includes the matching headers. */ 'rate_limited_retry_back_off'?: (_envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff | null); @@ -405,7 +405,7 @@ export interface RetryPolicy__Output { /** * Specifies parameters that control exponential retry back off. This parameter is optional, in which case the * default base interval is 25 milliseconds or, if set, the current value of the - * `upstream.base_retry_backoff_ms` runtime parameter. The default maximum interval is 10 times + * ``upstream.base_retry_backoff_ms`` runtime parameter. The default maximum interval is 10 times * the base interval. The documentation for :ref:`config_http_filters_router_x-envoy-max-retries` * describes Envoy's back-off algorithm. */ @@ -426,7 +426,7 @@ export interface RetryPolicy__Output { * return a response header like ``Retry-After`` or ``X-RateLimit-Reset`` to * provide feedback to the client on how long to wait before retrying. If * configured, this back-off strategy will be used instead of the - * default exponential back off strategy (configured using `retry_back_off`) + * default exponential back off strategy (configured using ``retry_back_off``) * whenever a response includes the matching headers. */ 'rate_limited_retry_back_off': (_envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff__Output | null); diff --git a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/Route.ts b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/Route.ts index d48b554d0..beda9395d 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/Route.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/Route.ts @@ -21,7 +21,7 @@ import type { NonForwardingAction as _envoy_config_route_v3_NonForwardingAction, * * Envoy supports routing on HTTP method via :ref:`header matching * `. - * [#next-free-field: 19] + * [#next-free-field: 20] */ export interface Route { /** @@ -41,7 +41,7 @@ export interface Route { * about the route. It can be used for configuration, stats, and logging. * The metadata should go under the filter namespace that will need it. * For instance, if the metadata is intended for the Router filter, - * the filter name should be specified as *envoy.filters.http.router*. + * the filter name should be specified as ``envoy.filters.http.router``. */ 'metadata'?: (_envoy_config_core_v3_Metadata | null); /** @@ -81,11 +81,15 @@ export interface Route { */ 'request_headers_to_remove'?: (string)[]; /** - * The typed_per_filter_config field can be used to provide route-specific - * configurations for filters. The key should match the filter name, such as - * *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter - * specific; see the :ref:`HTTP filter documentation ` for - * if and how it is utilized. + * The per_filter_config field can be used to provide route-specific configurations for filters. + * The key should match the :ref:`filter config name + * `. + * The canonical filter name (e.g., ``envoy.filters.http.buffer`` for the HTTP buffer filter) can also + * be used for the backwards compatibility. If there is no entry referred by the filter config name, the + * entry referred by the canonical filter name will be provided to the filters as fallback. + * + * Use of this field is filter specific; + * see the :ref:`HTTP filter documentation ` for if and how it is utilized. * [#comment: An entry's value may be wrapped in a * :ref:`FilterConfig` * message to specify additional options.] @@ -121,6 +125,22 @@ export interface Route { * in Envoy for a filter that directly generates responses for requests. */ 'non_forwarding_action'?: (_envoy_config_route_v3_NonForwardingAction | null); + /** + * The human readable prefix to use when emitting statistics for this endpoint. + * The statistics are rooted at vhost..route.. + * This should be set for highly critical + * endpoints that one wishes to get “per-route” statistics on. + * If not set, endpoint statistics are not generated. + * + * The emitted statistics are the same as those documented for :ref:`virtual clusters `. + * + * .. warning:: + * + * We do not recommend setting up a stat prefix for + * every application endpoint. This is both not easily maintainable and + * statistics use a non-trivial amount of memory(approximately 1KiB per route). + */ + 'stat_prefix'?: (string); 'action'?: "route"|"redirect"|"direct_response"|"filter_action"|"non_forwarding_action"; } @@ -132,7 +152,7 @@ export interface Route { * * Envoy supports routing on HTTP method via :ref:`header matching * `. - * [#next-free-field: 19] + * [#next-free-field: 20] */ export interface Route__Output { /** @@ -152,7 +172,7 @@ export interface Route__Output { * about the route. It can be used for configuration, stats, and logging. * The metadata should go under the filter namespace that will need it. * For instance, if the metadata is intended for the Router filter, - * the filter name should be specified as *envoy.filters.http.router*. + * the filter name should be specified as ``envoy.filters.http.router``. */ 'metadata': (_envoy_config_core_v3_Metadata__Output | null); /** @@ -192,11 +212,15 @@ export interface Route__Output { */ 'request_headers_to_remove': (string)[]; /** - * The typed_per_filter_config field can be used to provide route-specific - * configurations for filters. The key should match the filter name, such as - * *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter - * specific; see the :ref:`HTTP filter documentation ` for - * if and how it is utilized. + * The per_filter_config field can be used to provide route-specific configurations for filters. + * The key should match the :ref:`filter config name + * `. + * The canonical filter name (e.g., ``envoy.filters.http.buffer`` for the HTTP buffer filter) can also + * be used for the backwards compatibility. If there is no entry referred by the filter config name, the + * entry referred by the canonical filter name will be provided to the filters as fallback. + * + * Use of this field is filter specific; + * see the :ref:`HTTP filter documentation ` for if and how it is utilized. * [#comment: An entry's value may be wrapped in a * :ref:`FilterConfig` * message to specify additional options.] @@ -232,5 +256,21 @@ export interface Route__Output { * in Envoy for a filter that directly generates responses for requests. */ 'non_forwarding_action'?: (_envoy_config_route_v3_NonForwardingAction__Output | null); + /** + * The human readable prefix to use when emitting statistics for this endpoint. + * The statistics are rooted at vhost..route.. + * This should be set for highly critical + * endpoints that one wishes to get “per-route” statistics on. + * If not set, endpoint statistics are not generated. + * + * The emitted statistics are the same as those documented for :ref:`virtual clusters `. + * + * .. warning:: + * + * We do not recommend setting up a stat prefix for + * every application endpoint. This is both not easily maintainable and + * statistics use a non-trivial amount of memory(approximately 1KiB per route). + */ + 'stat_prefix': (string); 'action': "route"|"redirect"|"direct_response"|"filter_action"|"non_forwarding_action"; } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RouteAction.ts b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RouteAction.ts index 43bd51723..9dd8b7c2c 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RouteAction.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RouteAction.ts @@ -13,6 +13,8 @@ import type { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output a import type { RegexMatchAndSubstitute as _envoy_type_matcher_v3_RegexMatchAndSubstitute, RegexMatchAndSubstitute__Output as _envoy_type_matcher_v3_RegexMatchAndSubstitute__Output } from '../../../../envoy/type/matcher/v3/RegexMatchAndSubstitute'; import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; import type { InternalRedirectPolicy as _envoy_config_route_v3_InternalRedirectPolicy, InternalRedirectPolicy__Output as _envoy_config_route_v3_InternalRedirectPolicy__Output } from '../../../../envoy/config/route/v3/InternalRedirectPolicy'; +import type { ClusterSpecifierPlugin as _envoy_config_route_v3_ClusterSpecifierPlugin, ClusterSpecifierPlugin__Output as _envoy_config_route_v3_ClusterSpecifierPlugin__Output } from '../../../../envoy/config/route/v3/ClusterSpecifierPlugin'; +import type { TypedExtensionConfig as _envoy_config_core_v3_TypedExtensionConfig, TypedExtensionConfig__Output as _envoy_config_core_v3_TypedExtensionConfig__Output } from '../../../../envoy/config/core/v3/TypedExtensionConfig'; import type { RuntimeFractionalPercent as _envoy_config_core_v3_RuntimeFractionalPercent, RuntimeFractionalPercent__Output as _envoy_config_core_v3_RuntimeFractionalPercent__Output } from '../../../../envoy/config/core/v3/RuntimeFractionalPercent'; import type { ProxyProtocolConfig as _envoy_config_core_v3_ProxyProtocolConfig, ProxyProtocolConfig__Output as _envoy_config_core_v3_ProxyProtocolConfig__Output } from '../../../../envoy/config/core/v3/ProxyProtocolConfig'; @@ -27,6 +29,10 @@ export enum _envoy_config_route_v3_RouteAction_ClusterNotFoundResponseCode { * HTTP status code - 404 Not Found. */ NOT_FOUND = 1, + /** + * HTTP status code - 500 Internal Server Error. + */ + INTERNAL_SERVER_ERROR = 2, } /** @@ -148,8 +154,8 @@ export interface _envoy_config_route_v3_RouteAction_HashPolicy_Cookie__Output { export interface _envoy_config_route_v3_RouteAction_HashPolicy_FilterState { /** * The name of the Object in the per-request filterState, which is an - * Envoy::Http::Hashable object. If there is no data associated with the key, - * or the stored object is not Envoy::Http::Hashable, no hash will be produced. + * Envoy::Hashable object. If there is no data associated with the key, + * or the stored object is not Envoy::Hashable, no hash will be produced. */ 'key'?: (string); } @@ -157,8 +163,8 @@ export interface _envoy_config_route_v3_RouteAction_HashPolicy_FilterState { export interface _envoy_config_route_v3_RouteAction_HashPolicy_FilterState__Output { /** * The name of the Object in the per-request filterState, which is an - * Envoy::Http::Hashable object. If there is no data associated with the key, - * or the stored object is not Envoy::Http::Hashable, no hash will be produced. + * Envoy::Hashable object. If there is no data associated with the key, + * or the stored object is not Envoy::Hashable, no hash will be produced. */ 'key': (string); } @@ -317,12 +323,12 @@ export interface _envoy_config_route_v3_RouteAction_MaxStreamDuration { /** * If present, and the request contains a `grpc-timeout header * `_, use that value as the - * *max_stream_duration*, but limit the applied timeout to the maximum value specified here. - * If set to 0, the `grpc-timeout` header is used without modification. + * ``max_stream_duration``, but limit the applied timeout to the maximum value specified here. + * If set to 0, the ``grpc-timeout`` header is used without modification. */ 'grpc_timeout_header_max'?: (_google_protobuf_Duration | null); /** - * If present, Envoy will adjust the timeout provided by the `grpc-timeout` header by + * If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by * subtracting the provided duration from the header. This is useful for allowing Envoy to set * its global timeout to be less than that of the deadline imposed by the calling client, which * makes it more likely that Envoy will handle the timeout instead of having the call canceled @@ -347,12 +353,12 @@ export interface _envoy_config_route_v3_RouteAction_MaxStreamDuration__Output { /** * If present, and the request contains a `grpc-timeout header * `_, use that value as the - * *max_stream_duration*, but limit the applied timeout to the maximum value specified here. - * If set to 0, the `grpc-timeout` header is used without modification. + * ``max_stream_duration``, but limit the applied timeout to the maximum value specified here. + * If set to 0, the ``grpc-timeout`` header is used without modification. */ 'grpc_timeout_header_max': (_google_protobuf_Duration__Output | null); /** - * If present, Envoy will adjust the timeout provided by the `grpc-timeout` header by + * If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by * subtracting the provided duration from the header. This is useful for allowing Envoy to set * its global timeout to be less than that of the deadline imposed by the calling client, which * makes it more likely that Envoy will handle the timeout instead of having the call canceled @@ -386,23 +392,47 @@ export interface _envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter__O * respond before returning the response from the primary cluster. All normal statistics are * collected for the shadow cluster making this feature useful for testing. * - * During shadowing, the host/authority header is altered such that *-shadow* is appended. This is - * useful for logging. For example, *cluster1* becomes *cluster1-shadow*. + * During shadowing, the host/authority header is altered such that ``-shadow`` is appended. This is + * useful for logging. For example, ``cluster1`` becomes ``cluster1-shadow``. * * .. note:: * * Shadowing will not be triggered if the primary cluster does not exist. + * + * .. note:: + * + * Shadowing doesn't support Http CONNECT and upgrades. + * [#next-free-field: 6] */ export interface _envoy_config_route_v3_RouteAction_RequestMirrorPolicy { /** + * Only one of ``cluster`` and ``cluster_header`` can be specified. + * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}] * Specifies the cluster that requests will be mirrored to. The cluster must * exist in the cluster manager configuration. */ 'cluster'?: (string); + /** + * Only one of ``cluster`` and ``cluster_header`` can be specified. + * Envoy will determine the cluster to route to by reading the value of the + * HTTP header named by cluster_header from the request headers. Only the first value in header is used, + * and no shadow request will happen if the value is not found in headers. Envoy will not wait for + * the shadow cluster to respond before returning the response from the primary cluster. + * + * .. attention:: + * + * Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1 + * ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead. + * + * .. note:: + * + * If the header appears multiple times only the first value is used. + */ + 'cluster_header'?: (string); /** * If not specified, all requests to the target cluster will be mirrored. * - * If specified, this field takes precedence over the `runtime_key` field and requests must also + * If specified, this field takes precedence over the ``runtime_key`` field and requests must also * fall under the percentage of matches indicated by this field. * * For some fraction N/D, a random number in the range [0,D) is selected. If the @@ -422,23 +452,47 @@ export interface _envoy_config_route_v3_RouteAction_RequestMirrorPolicy { * respond before returning the response from the primary cluster. All normal statistics are * collected for the shadow cluster making this feature useful for testing. * - * During shadowing, the host/authority header is altered such that *-shadow* is appended. This is - * useful for logging. For example, *cluster1* becomes *cluster1-shadow*. + * During shadowing, the host/authority header is altered such that ``-shadow`` is appended. This is + * useful for logging. For example, ``cluster1`` becomes ``cluster1-shadow``. * * .. note:: * * Shadowing will not be triggered if the primary cluster does not exist. + * + * .. note:: + * + * Shadowing doesn't support Http CONNECT and upgrades. + * [#next-free-field: 6] */ export interface _envoy_config_route_v3_RouteAction_RequestMirrorPolicy__Output { /** + * Only one of ``cluster`` and ``cluster_header`` can be specified. + * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}] * Specifies the cluster that requests will be mirrored to. The cluster must * exist in the cluster manager configuration. */ 'cluster': (string); + /** + * Only one of ``cluster`` and ``cluster_header`` can be specified. + * Envoy will determine the cluster to route to by reading the value of the + * HTTP header named by cluster_header from the request headers. Only the first value in header is used, + * and no shadow request will happen if the value is not found in headers. Envoy will not wait for + * the shadow cluster to respond before returning the response from the primary cluster. + * + * .. attention:: + * + * Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1 + * ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead. + * + * .. note:: + * + * If the header appears multiple times only the first value is used. + */ + 'cluster_header': (string); /** * If not specified, all requests to the target cluster will be mirrored. * - * If specified, this field takes precedence over the `runtime_key` field and requests must also + * If specified, this field takes precedence over the ``runtime_key`` field and requests must also * fall under the percentage of matches indicated by this field. * * For some fraction N/D, a random number in the range [0,D) is selected. If the @@ -509,7 +563,7 @@ export interface _envoy_config_route_v3_RouteAction_UpgradeConfig__Output { } /** - * [#next-free-field: 38] + * [#next-free-field: 42] */ export interface RouteAction { /** @@ -525,8 +579,8 @@ export interface RouteAction { * * .. attention:: * - * Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 - * *Host* header. Thus, if attempting to match on *Host*, match on *:authority* instead. + * Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1 + * ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead. * * .. note:: * @@ -546,7 +600,7 @@ export interface RouteAction { * in the upstream cluster with metadata matching what's set in this field will be considered * for load balancing. If using :ref:`weighted_clusters * `, metadata will be merged, with values - * provided there taking precedence. The filter name should be specified as *envoy.lb*. + * provided there taking precedence. The filter name should be specified as ``envoy.lb``. */ 'metadata_match'?: (_envoy_config_core_v3_Metadata | null); /** @@ -556,16 +610,16 @@ export interface RouteAction { * place the original path before rewrite into the :ref:`x-envoy-original-path * ` header. * - * Only one of *prefix_rewrite* or - * :ref:`regex_rewrite ` - * may be specified. + * Only one of :ref:`regex_rewrite ` + * :ref:`path_rewrite_policy `, + * or :ref:`prefix_rewrite ` may be specified. * * .. attention:: * * Pay careful attention to the use of trailing slashes in the * :ref:`route's match ` prefix value. * Stripping a prefix from a path requires multiple Routes to handle all cases. For example, - * rewriting * /prefix* to * /* and * /prefix/etc* to * /etc* cannot be done in a single + * rewriting ``/prefix`` to ``/`` and ``/prefix/etc`` to ``/etc`` cannot be done in a single * :ref:`Route `, as shown by the below config entries: * * .. code-block:: yaml @@ -579,21 +633,27 @@ export interface RouteAction { * route: * prefix_rewrite: "/" * - * Having above entries in the config, requests to * /prefix* will be stripped to * /*, while - * requests to * /prefix/etc* will be stripped to * /etc*. + * Having above entries in the config, requests to ``/prefix`` will be stripped to ``/``, while + * requests to ``/prefix/etc`` will be stripped to ``/etc``. */ 'prefix_rewrite'?: (string); /** * Indicates that during forwarding, the host header will be swapped with - * this value. + * this value. Using this option will append the + * :ref:`config_http_conn_man_headers_x-forwarded-host` header if + * :ref:`append_x_forwarded_host ` + * is set. */ 'host_rewrite_literal'?: (string); /** * Indicates that during forwarding, the host header will be swapped with * the hostname of the upstream host chosen by the cluster manager. This * option is applicable only when the destination cluster for a route is of - * type *strict_dns* or *logical_dns*. Setting this to true with other cluster - * types has no effect. + * type ``strict_dns`` or ``logical_dns``. Setting this to true with other cluster types + * has no effect. Using this option will append the + * :ref:`config_http_conn_man_headers_x-forwarded-host` header if + * :ref:`append_x_forwarded_host ` + * is set. */ 'auto_host_rewrite'?: (_google_protobuf_BoolValue | null); /** @@ -650,7 +710,16 @@ export interface RouteAction { */ 'hash_policy'?: (_envoy_config_route_v3_RouteAction_HashPolicy)[]; /** - * Indicates that the route has a CORS policy. + * Indicates that the route has a CORS policy. This field is ignored if related cors policy is + * found in the :ref:`Route.typed_per_filter_config` or + * :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config`. + * + * .. attention:: + * + * This option has been deprecated. Please use + * :ref:`Route.typed_per_filter_config` or + * :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config` + * to configure the CORS HTTP filter. */ 'cors'?: (_envoy_config_route_v3_CorsPolicy | null); /** @@ -665,7 +734,7 @@ export interface RouteAction { * or its default value (infinity) instead of * :ref:`timeout `, but limit the applied timeout * to the maximum value specified here. If configured as 0, the maximum allowed timeout for - * gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used + * gRPC requests is infinity. If not configured at all, the ``grpc-timeout`` header is not used * and gRPC requests time out like any other requests using * :ref:`timeout ` or its default. * This can be used to prevent unexpected upstream request timeouts due to potentially long @@ -716,7 +785,7 @@ export interface RouteAction { 'hedge_policy'?: (_envoy_config_route_v3_HedgePolicy | null); /** * Deprecated by :ref:`grpc_timeout_header_offset `. - * If present, Envoy will adjust the timeout provided by the `grpc-timeout` header by subtracting + * If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by subtracting * the provided duration from the header. This is useful in allowing Envoy to set its global * timeout to be less than that of the deadline imposed by the calling client, which makes it more * likely that Envoy will handle the timeout instead of having the call canceled by the client. @@ -728,7 +797,10 @@ export interface RouteAction { /** * Indicates that during forwarding, the host header will be swapped with the content of given * downstream or :ref:`custom ` header. - * If header value is empty, host header is left intact. + * If header value is empty, host header is left intact. Using this option will append the + * :ref:`config_http_conn_man_headers_x-forwarded-host` header if + * :ref:`append_x_forwarded_host ` + * is set. * * .. attention:: * @@ -741,7 +813,9 @@ export interface RouteAction { */ 'host_rewrite_header'?: (string); /** - * Indicates that the route has request mirroring policies. + * Specify a set of route request mirroring policies. + * It takes precedence over the virtual host and route config mirror policy entirely. + * That is, policies are not merged, the most specific non-empty one becomes the mirror policies. */ 'request_mirror_policies'?: (_envoy_config_route_v3_RouteAction_RequestMirrorPolicy)[]; /** @@ -771,8 +845,10 @@ export interface RouteAction { * before the rewrite into the :ref:`x-envoy-original-path * ` header. * - * Only one of :ref:`prefix_rewrite ` - * or *regex_rewrite* may be specified. + * Only one of :ref:`regex_rewrite `, + * :ref:`prefix_rewrite `, or + * :ref:`path_rewrite_policy `] + * may be specified. * * Examples using Google's `RE2 `_ engine: * @@ -811,6 +887,10 @@ export interface RouteAction { * Indicates that during forwarding, the host header will be swapped with * the result of the regex substitution executed on path value with query and fragment removed. * This is useful for transitioning variable content between path segment and subdomain. + * Using this option will append the + * :ref:`config_http_conn_man_headers_x-forwarded-host` header if + * :ref:`append_x_forwarded_host ` + * is set. * * For example with the following config: * @@ -822,7 +902,7 @@ export interface RouteAction { * regex: "^/(.+)/.+$" * substitution: \1 * - * Would rewrite the host header to `envoyproxy.io` given the path `/envoyproxy.io/some/path`. + * Would rewrite the host header to ``envoyproxy.io`` given the path ``/envoyproxy.io/some/path``. */ 'host_rewrite_path_regex'?: (_envoy_type_matcher_v3_RegexMatchAndSubstitute | null); /** @@ -830,20 +910,44 @@ export interface RouteAction { */ 'max_stream_duration'?: (_envoy_config_route_v3_RouteAction_MaxStreamDuration | null); /** - * [#not-implemented-hide:] - * Name of the cluster specifier plugin to use to determine the cluster for - * requests on this route. The plugin name must be defined in the associated - * :ref:`envoy_v3_api_field_config.route.v3.RouteConfiguration.cluster_specifier_plugins` - * in the - * :ref:`envoy_v3_api_field_config.core.v3.TypedExtensionConfig.name` field. + * Name of the cluster specifier plugin to use to determine the cluster for requests on this route. + * The cluster specifier plugin name must be defined in the associated + * :ref:`cluster specifier plugins ` + * in the :ref:`name ` field. */ 'cluster_specifier_plugin'?: (string); - 'cluster_specifier'?: "cluster"|"cluster_header"|"weighted_clusters"|"cluster_specifier_plugin"; + /** + * If set, then a host rewrite action (one of + * :ref:`host_rewrite_literal `, + * :ref:`auto_host_rewrite `, + * :ref:`host_rewrite_header `, or + * :ref:`host_rewrite_path_regex `) + * causes the original value of the host header, if any, to be appended to the + * :ref:`config_http_conn_man_headers_x-forwarded-host` HTTP header if it is different to the last value appended. + * This can be disabled by setting the runtime guard `envoy_reloadable_features_append_xfh_idempotent` to false. + */ + 'append_x_forwarded_host'?: (boolean); + /** + * Custom cluster specifier plugin configuration to use to determine the cluster for requests + * on this route. + */ + 'inline_cluster_specifier_plugin'?: (_envoy_config_route_v3_ClusterSpecifierPlugin | null); + /** + * Specifies how to send request over TLS early data. + * If absent, allows `safe HTTP requests `_ to be sent on early data. + * [#extension-category: envoy.route.early_data_policy] + */ + 'early_data_policy'?: (_envoy_config_core_v3_TypedExtensionConfig | null); + /** + * [#extension-category: envoy.path.rewrite] + */ + 'path_rewrite_policy'?: (_envoy_config_core_v3_TypedExtensionConfig | null); + 'cluster_specifier'?: "cluster"|"cluster_header"|"weighted_clusters"|"cluster_specifier_plugin"|"inline_cluster_specifier_plugin"; 'host_rewrite_specifier'?: "host_rewrite_literal"|"auto_host_rewrite"|"host_rewrite_header"|"host_rewrite_path_regex"; } /** - * [#next-free-field: 38] + * [#next-free-field: 42] */ export interface RouteAction__Output { /** @@ -859,8 +963,8 @@ export interface RouteAction__Output { * * .. attention:: * - * Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 - * *Host* header. Thus, if attempting to match on *Host*, match on *:authority* instead. + * Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1 + * ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead. * * .. note:: * @@ -880,7 +984,7 @@ export interface RouteAction__Output { * in the upstream cluster with metadata matching what's set in this field will be considered * for load balancing. If using :ref:`weighted_clusters * `, metadata will be merged, with values - * provided there taking precedence. The filter name should be specified as *envoy.lb*. + * provided there taking precedence. The filter name should be specified as ``envoy.lb``. */ 'metadata_match': (_envoy_config_core_v3_Metadata__Output | null); /** @@ -890,16 +994,16 @@ export interface RouteAction__Output { * place the original path before rewrite into the :ref:`x-envoy-original-path * ` header. * - * Only one of *prefix_rewrite* or - * :ref:`regex_rewrite ` - * may be specified. + * Only one of :ref:`regex_rewrite ` + * :ref:`path_rewrite_policy `, + * or :ref:`prefix_rewrite ` may be specified. * * .. attention:: * * Pay careful attention to the use of trailing slashes in the * :ref:`route's match ` prefix value. * Stripping a prefix from a path requires multiple Routes to handle all cases. For example, - * rewriting * /prefix* to * /* and * /prefix/etc* to * /etc* cannot be done in a single + * rewriting ``/prefix`` to ``/`` and ``/prefix/etc`` to ``/etc`` cannot be done in a single * :ref:`Route `, as shown by the below config entries: * * .. code-block:: yaml @@ -913,21 +1017,27 @@ export interface RouteAction__Output { * route: * prefix_rewrite: "/" * - * Having above entries in the config, requests to * /prefix* will be stripped to * /*, while - * requests to * /prefix/etc* will be stripped to * /etc*. + * Having above entries in the config, requests to ``/prefix`` will be stripped to ``/``, while + * requests to ``/prefix/etc`` will be stripped to ``/etc``. */ 'prefix_rewrite': (string); /** * Indicates that during forwarding, the host header will be swapped with - * this value. + * this value. Using this option will append the + * :ref:`config_http_conn_man_headers_x-forwarded-host` header if + * :ref:`append_x_forwarded_host ` + * is set. */ 'host_rewrite_literal'?: (string); /** * Indicates that during forwarding, the host header will be swapped with * the hostname of the upstream host chosen by the cluster manager. This * option is applicable only when the destination cluster for a route is of - * type *strict_dns* or *logical_dns*. Setting this to true with other cluster - * types has no effect. + * type ``strict_dns`` or ``logical_dns``. Setting this to true with other cluster types + * has no effect. Using this option will append the + * :ref:`config_http_conn_man_headers_x-forwarded-host` header if + * :ref:`append_x_forwarded_host ` + * is set. */ 'auto_host_rewrite'?: (_google_protobuf_BoolValue__Output | null); /** @@ -984,7 +1094,16 @@ export interface RouteAction__Output { */ 'hash_policy': (_envoy_config_route_v3_RouteAction_HashPolicy__Output)[]; /** - * Indicates that the route has a CORS policy. + * Indicates that the route has a CORS policy. This field is ignored if related cors policy is + * found in the :ref:`Route.typed_per_filter_config` or + * :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config`. + * + * .. attention:: + * + * This option has been deprecated. Please use + * :ref:`Route.typed_per_filter_config` or + * :ref:`WeightedCluster.ClusterWeight.typed_per_filter_config` + * to configure the CORS HTTP filter. */ 'cors': (_envoy_config_route_v3_CorsPolicy__Output | null); /** @@ -999,7 +1118,7 @@ export interface RouteAction__Output { * or its default value (infinity) instead of * :ref:`timeout `, but limit the applied timeout * to the maximum value specified here. If configured as 0, the maximum allowed timeout for - * gRPC requests is infinity. If not configured at all, the `grpc-timeout` header is not used + * gRPC requests is infinity. If not configured at all, the ``grpc-timeout`` header is not used * and gRPC requests time out like any other requests using * :ref:`timeout ` or its default. * This can be used to prevent unexpected upstream request timeouts due to potentially long @@ -1050,7 +1169,7 @@ export interface RouteAction__Output { 'hedge_policy': (_envoy_config_route_v3_HedgePolicy__Output | null); /** * Deprecated by :ref:`grpc_timeout_header_offset `. - * If present, Envoy will adjust the timeout provided by the `grpc-timeout` header by subtracting + * If present, Envoy will adjust the timeout provided by the ``grpc-timeout`` header by subtracting * the provided duration from the header. This is useful in allowing Envoy to set its global * timeout to be less than that of the deadline imposed by the calling client, which makes it more * likely that Envoy will handle the timeout instead of having the call canceled by the client. @@ -1062,7 +1181,10 @@ export interface RouteAction__Output { /** * Indicates that during forwarding, the host header will be swapped with the content of given * downstream or :ref:`custom ` header. - * If header value is empty, host header is left intact. + * If header value is empty, host header is left intact. Using this option will append the + * :ref:`config_http_conn_man_headers_x-forwarded-host` header if + * :ref:`append_x_forwarded_host ` + * is set. * * .. attention:: * @@ -1075,7 +1197,9 @@ export interface RouteAction__Output { */ 'host_rewrite_header'?: (string); /** - * Indicates that the route has request mirroring policies. + * Specify a set of route request mirroring policies. + * It takes precedence over the virtual host and route config mirror policy entirely. + * That is, policies are not merged, the most specific non-empty one becomes the mirror policies. */ 'request_mirror_policies': (_envoy_config_route_v3_RouteAction_RequestMirrorPolicy__Output)[]; /** @@ -1105,8 +1229,10 @@ export interface RouteAction__Output { * before the rewrite into the :ref:`x-envoy-original-path * ` header. * - * Only one of :ref:`prefix_rewrite ` - * or *regex_rewrite* may be specified. + * Only one of :ref:`regex_rewrite `, + * :ref:`prefix_rewrite `, or + * :ref:`path_rewrite_policy `] + * may be specified. * * Examples using Google's `RE2 `_ engine: * @@ -1145,6 +1271,10 @@ export interface RouteAction__Output { * Indicates that during forwarding, the host header will be swapped with * the result of the regex substitution executed on path value with query and fragment removed. * This is useful for transitioning variable content between path segment and subdomain. + * Using this option will append the + * :ref:`config_http_conn_man_headers_x-forwarded-host` header if + * :ref:`append_x_forwarded_host ` + * is set. * * For example with the following config: * @@ -1156,7 +1286,7 @@ export interface RouteAction__Output { * regex: "^/(.+)/.+$" * substitution: \1 * - * Would rewrite the host header to `envoyproxy.io` given the path `/envoyproxy.io/some/path`. + * Would rewrite the host header to ``envoyproxy.io`` given the path ``/envoyproxy.io/some/path``. */ 'host_rewrite_path_regex'?: (_envoy_type_matcher_v3_RegexMatchAndSubstitute__Output | null); /** @@ -1164,14 +1294,38 @@ export interface RouteAction__Output { */ 'max_stream_duration': (_envoy_config_route_v3_RouteAction_MaxStreamDuration__Output | null); /** - * [#not-implemented-hide:] - * Name of the cluster specifier plugin to use to determine the cluster for - * requests on this route. The plugin name must be defined in the associated - * :ref:`envoy_v3_api_field_config.route.v3.RouteConfiguration.cluster_specifier_plugins` - * in the - * :ref:`envoy_v3_api_field_config.core.v3.TypedExtensionConfig.name` field. + * Name of the cluster specifier plugin to use to determine the cluster for requests on this route. + * The cluster specifier plugin name must be defined in the associated + * :ref:`cluster specifier plugins ` + * in the :ref:`name ` field. */ 'cluster_specifier_plugin'?: (string); - 'cluster_specifier': "cluster"|"cluster_header"|"weighted_clusters"|"cluster_specifier_plugin"; + /** + * If set, then a host rewrite action (one of + * :ref:`host_rewrite_literal `, + * :ref:`auto_host_rewrite `, + * :ref:`host_rewrite_header `, or + * :ref:`host_rewrite_path_regex `) + * causes the original value of the host header, if any, to be appended to the + * :ref:`config_http_conn_man_headers_x-forwarded-host` HTTP header if it is different to the last value appended. + * This can be disabled by setting the runtime guard `envoy_reloadable_features_append_xfh_idempotent` to false. + */ + 'append_x_forwarded_host': (boolean); + /** + * Custom cluster specifier plugin configuration to use to determine the cluster for requests + * on this route. + */ + 'inline_cluster_specifier_plugin'?: (_envoy_config_route_v3_ClusterSpecifierPlugin__Output | null); + /** + * Specifies how to send request over TLS early data. + * If absent, allows `safe HTTP requests `_ to be sent on early data. + * [#extension-category: envoy.route.early_data_policy] + */ + 'early_data_policy': (_envoy_config_core_v3_TypedExtensionConfig__Output | null); + /** + * [#extension-category: envoy.path.rewrite] + */ + 'path_rewrite_policy': (_envoy_config_core_v3_TypedExtensionConfig__Output | null); + 'cluster_specifier': "cluster"|"cluster_header"|"weighted_clusters"|"cluster_specifier_plugin"|"inline_cluster_specifier_plugin"; 'host_rewrite_specifier': "host_rewrite_literal"|"auto_host_rewrite"|"host_rewrite_header"|"host_rewrite_path_regex"; } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RouteConfiguration.ts b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RouteConfiguration.ts index 516f4b06b..1eddc6528 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RouteConfiguration.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RouteConfiguration.ts @@ -6,9 +6,11 @@ import type { BoolValue as _google_protobuf_BoolValue, BoolValue__Output as _goo import type { Vhds as _envoy_config_route_v3_Vhds, Vhds__Output as _envoy_config_route_v3_Vhds__Output } from '../../../../envoy/config/route/v3/Vhds'; import type { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; import type { ClusterSpecifierPlugin as _envoy_config_route_v3_ClusterSpecifierPlugin, ClusterSpecifierPlugin__Output as _envoy_config_route_v3_ClusterSpecifierPlugin__Output } from '../../../../envoy/config/route/v3/ClusterSpecifierPlugin'; +import type { _envoy_config_route_v3_RouteAction_RequestMirrorPolicy, _envoy_config_route_v3_RouteAction_RequestMirrorPolicy__Output } from '../../../../envoy/config/route/v3/RouteAction'; +import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; /** - * [#next-free-field: 13] + * [#next-free-field: 17] */ export interface RouteConfiguration { /** @@ -75,10 +77,10 @@ export interface RouteConfiguration { 'request_headers_to_remove'?: (string)[]; /** * An array of virtual hosts will be dynamically loaded via the VHDS API. - * Both *virtual_hosts* and *vhds* fields will be used when present. *virtual_hosts* can be used - * for a base routing table or for infrequently changing virtual hosts. *vhds* is used for + * Both ``virtual_hosts`` and ``vhds`` fields will be used when present. ``virtual_hosts`` can be used + * for a base routing table or for infrequently changing virtual hosts. ``vhds`` is used for * on-demand discovery of virtual hosts. The contents of these two fields will be merged to - * generate a routing table for a given RouteConfiguration, with *vhds* derived configuration + * generate a routing table for a given RouteConfiguration, with ``vhds`` derived configuration * taking precedence. */ 'vhds'?: (_envoy_config_route_v3_Vhds | null); @@ -91,8 +93,6 @@ export interface RouteConfiguration { * * To allow setting overrides at the route or virtual host level, this order can be reversed * by setting this option to true. Defaults to false. - * - * [#next-major-version: In the v3 API, this will default to true.] */ 'most_specific_header_mutations_wins'?: (boolean); /** @@ -109,16 +109,49 @@ export interface RouteConfiguration { */ 'max_direct_response_body_size_bytes'?: (_google_protobuf_UInt32Value | null); /** - * [#not-implemented-hide:] * A list of plugins and their configurations which may be used by a - * :ref:`envoy_v3_api_field_config.route.v3.RouteAction.cluster_specifier_plugin` - * within the route. All *extension.name* fields in this list must be unique. + * :ref:`cluster specifier plugin name ` + * within the route. All ``extension.name`` fields in this list must be unique. */ 'cluster_specifier_plugins'?: (_envoy_config_route_v3_ClusterSpecifierPlugin)[]; + /** + * Specify a set of default request mirroring policies which apply to all routes under its virtual hosts. + * Note that policies are not merged, the most specific non-empty one becomes the mirror policies. + */ + 'request_mirror_policies'?: (_envoy_config_route_v3_RouteAction_RequestMirrorPolicy)[]; + /** + * By default, port in :authority header (if any) is used in host matching. + * With this option enabled, Envoy will ignore the port number in the :authority header (if any) when picking VirtualHost. + * NOTE: this option will not strip the port number (if any) contained in route config + * :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`.domains field. + */ + 'ignore_port_in_host_matching'?: (boolean); + /** + * Ignore path-parameters in path-matching. + * Before RFC3986, URI were like(RFC1808): :///;?# + * Envoy by default takes ":path" as ";". + * For users who want to only match path on the "" portion, this option should be true. + */ + 'ignore_path_parameters_in_path_matching'?: (boolean); + /** + * The typed_per_filter_config field can be used to provide RouteConfiguration level per filter config. + * The key should match the :ref:`filter config name + * `. + * The canonical filter name (e.g., ``envoy.filters.http.buffer`` for the HTTP buffer filter) can also + * be used for the backwards compatibility. If there is no entry referred by the filter config name, the + * entry referred by the canonical filter name will be provided to the filters as fallback. + * + * Use of this field is filter specific; + * see the :ref:`HTTP filter documentation ` for if and how it is utilized. + * [#comment: An entry's value may be wrapped in a + * :ref:`FilterConfig` + * message to specify additional options.] + */ + 'typed_per_filter_config'?: ({[key: string]: _google_protobuf_Any}); } /** - * [#next-free-field: 13] + * [#next-free-field: 17] */ export interface RouteConfiguration__Output { /** @@ -185,10 +218,10 @@ export interface RouteConfiguration__Output { 'request_headers_to_remove': (string)[]; /** * An array of virtual hosts will be dynamically loaded via the VHDS API. - * Both *virtual_hosts* and *vhds* fields will be used when present. *virtual_hosts* can be used - * for a base routing table or for infrequently changing virtual hosts. *vhds* is used for + * Both ``virtual_hosts`` and ``vhds`` fields will be used when present. ``virtual_hosts`` can be used + * for a base routing table or for infrequently changing virtual hosts. ``vhds`` is used for * on-demand discovery of virtual hosts. The contents of these two fields will be merged to - * generate a routing table for a given RouteConfiguration, with *vhds* derived configuration + * generate a routing table for a given RouteConfiguration, with ``vhds`` derived configuration * taking precedence. */ 'vhds': (_envoy_config_route_v3_Vhds__Output | null); @@ -201,8 +234,6 @@ export interface RouteConfiguration__Output { * * To allow setting overrides at the route or virtual host level, this order can be reversed * by setting this option to true. Defaults to false. - * - * [#next-major-version: In the v3 API, this will default to true.] */ 'most_specific_header_mutations_wins': (boolean); /** @@ -219,10 +250,43 @@ export interface RouteConfiguration__Output { */ 'max_direct_response_body_size_bytes': (_google_protobuf_UInt32Value__Output | null); /** - * [#not-implemented-hide:] * A list of plugins and their configurations which may be used by a - * :ref:`envoy_v3_api_field_config.route.v3.RouteAction.cluster_specifier_plugin` - * within the route. All *extension.name* fields in this list must be unique. + * :ref:`cluster specifier plugin name ` + * within the route. All ``extension.name`` fields in this list must be unique. */ 'cluster_specifier_plugins': (_envoy_config_route_v3_ClusterSpecifierPlugin__Output)[]; + /** + * Specify a set of default request mirroring policies which apply to all routes under its virtual hosts. + * Note that policies are not merged, the most specific non-empty one becomes the mirror policies. + */ + 'request_mirror_policies': (_envoy_config_route_v3_RouteAction_RequestMirrorPolicy__Output)[]; + /** + * By default, port in :authority header (if any) is used in host matching. + * With this option enabled, Envoy will ignore the port number in the :authority header (if any) when picking VirtualHost. + * NOTE: this option will not strip the port number (if any) contained in route config + * :ref:`envoy_v3_api_msg_config.route.v3.VirtualHost`.domains field. + */ + 'ignore_port_in_host_matching': (boolean); + /** + * Ignore path-parameters in path-matching. + * Before RFC3986, URI were like(RFC1808): :///;?# + * Envoy by default takes ":path" as ";". + * For users who want to only match path on the "" portion, this option should be true. + */ + 'ignore_path_parameters_in_path_matching': (boolean); + /** + * The typed_per_filter_config field can be used to provide RouteConfiguration level per filter config. + * The key should match the :ref:`filter config name + * `. + * The canonical filter name (e.g., ``envoy.filters.http.buffer`` for the HTTP buffer filter) can also + * be used for the backwards compatibility. If there is no entry referred by the filter config name, the + * entry referred by the canonical filter name will be provided to the filters as fallback. + * + * Use of this field is filter specific; + * see the :ref:`HTTP filter documentation ` for if and how it is utilized. + * [#comment: An entry's value may be wrapped in a + * :ref:`FilterConfig` + * message to specify additional options.] + */ + 'typed_per_filter_config': ({[key: string]: _google_protobuf_Any__Output}); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RouteList.ts b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RouteList.ts new file mode 100644 index 000000000..676d38554 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RouteList.ts @@ -0,0 +1,25 @@ +// Original file: deps/envoy-api/envoy/config/route/v3/route_components.proto + +import type { Route as _envoy_config_route_v3_Route, Route__Output as _envoy_config_route_v3_Route__Output } from '../../../../envoy/config/route/v3/Route'; + +/** + * This can be used in route matcher :ref:`VirtualHost.matcher `. + * When the matcher matches, routes will be matched and run. + */ +export interface RouteList { + /** + * The list of routes that will be matched and run, in order. The first route that matches will be used. + */ + 'routes'?: (_envoy_config_route_v3_Route)[]; +} + +/** + * This can be used in route matcher :ref:`VirtualHost.matcher `. + * When the matcher matches, routes will be matched and run. + */ +export interface RouteList__Output { + /** + * The list of routes that will be matched and run, in order. The first route that matches will be used. + */ + 'routes': (_envoy_config_route_v3_Route__Output)[]; +} diff --git a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RouteMatch.ts b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RouteMatch.ts index 9d872ed18..06982a82f 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RouteMatch.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/RouteMatch.ts @@ -6,6 +6,7 @@ import type { QueryParameterMatcher as _envoy_config_route_v3_QueryParameterMatc import type { RuntimeFractionalPercent as _envoy_config_core_v3_RuntimeFractionalPercent, RuntimeFractionalPercent__Output as _envoy_config_core_v3_RuntimeFractionalPercent__Output } from '../../../../envoy/config/core/v3/RuntimeFractionalPercent'; import type { RegexMatcher as _envoy_type_matcher_v3_RegexMatcher, RegexMatcher__Output as _envoy_type_matcher_v3_RegexMatcher__Output } from '../../../../envoy/type/matcher/v3/RegexMatcher'; import type { MetadataMatcher as _envoy_type_matcher_v3_MetadataMatcher, MetadataMatcher__Output as _envoy_type_matcher_v3_MetadataMatcher__Output } from '../../../../envoy/type/matcher/v3/MetadataMatcher'; +import type { TypedExtensionConfig as _envoy_config_core_v3_TypedExtensionConfig, TypedExtensionConfig__Output as _envoy_config_core_v3_TypedExtensionConfig__Output } from '../../../../envoy/config/core/v3/TypedExtensionConfig'; /** * An extensible message for matching CONNECT requests. @@ -52,17 +53,17 @@ export interface _envoy_config_route_v3_RouteMatch_TlsContextMatchOptions__Outpu } /** - * [#next-free-field: 14] + * [#next-free-field: 16] */ export interface RouteMatch { /** * If specified, the route is a prefix rule meaning that the prefix must - * match the beginning of the *:path* header. + * match the beginning of the ``:path`` header. */ 'prefix'?: (string); /** * If specified, the route is an exact path rule meaning that the path must - * exactly match the *:path* header once the query string is removed. + * exactly match the ``:path`` header once the query string is removed. */ 'path'?: (string); /** @@ -80,9 +81,9 @@ export interface RouteMatch { 'headers'?: (_envoy_config_route_v3_HeaderMatcher)[]; /** * Specifies a set of URL query parameters on which the route should - * match. The router will check the query string from the *path* header + * match. The router will check the query string from the ``path`` header * against all the specified query parameters. If the number of specified - * query parameters is nonzero, they all must match the *path* header's + * query parameters is nonzero, they all must match the ``path`` header's * query string for a match to occur. * * .. note:: @@ -121,9 +122,9 @@ export interface RouteMatch { 'runtime_fraction'?: (_envoy_config_core_v3_RuntimeFractionalPercent | null); /** * If specified, the route is a regular expression rule meaning that the - * regex must match the *:path* header once the query string is removed. The entire path + * regex must match the ``:path`` header once the query string is removed. The entire path * (without the query string) must match the regex. The rule will not match if only a - * subsequence of the *:path* header matches the regex. + * subsequence of the ``:path`` header matches the regex. * * [#next-major-version: In the v3 API we should redo how path specification works such * that we utilize StringMatcher, and additionally have consistent options around whether we @@ -160,21 +161,37 @@ export interface RouteMatch { * dynamic metadata for a match to occur. */ 'dynamic_metadata'?: (_envoy_type_matcher_v3_MetadataMatcher)[]; - 'path_specifier'?: "prefix"|"path"|"safe_regex"|"connect_matcher"; + /** + * If specified, the route is a path-separated prefix rule meaning that the + * ``:path`` header (without the query string) must either exactly match the + * ``path_separated_prefix`` or have it as a prefix, followed by ``/`` + * + * For example, ``/api/dev`` would match + * ``/api/dev``, ``/api/dev/``, ``/api/dev/v1``, and ``/api/dev?param=true`` + * but would not match ``/api/developer`` + * + * Expect the value to not contain ``?`` or ``#`` and not to end in ``/`` + */ + 'path_separated_prefix'?: (string); + /** + * [#extension-category: envoy.path.match] + */ + 'path_match_policy'?: (_envoy_config_core_v3_TypedExtensionConfig | null); + 'path_specifier'?: "prefix"|"path"|"safe_regex"|"connect_matcher"|"path_separated_prefix"|"path_match_policy"; } /** - * [#next-free-field: 14] + * [#next-free-field: 16] */ export interface RouteMatch__Output { /** * If specified, the route is a prefix rule meaning that the prefix must - * match the beginning of the *:path* header. + * match the beginning of the ``:path`` header. */ 'prefix'?: (string); /** * If specified, the route is an exact path rule meaning that the path must - * exactly match the *:path* header once the query string is removed. + * exactly match the ``:path`` header once the query string is removed. */ 'path'?: (string); /** @@ -192,9 +209,9 @@ export interface RouteMatch__Output { 'headers': (_envoy_config_route_v3_HeaderMatcher__Output)[]; /** * Specifies a set of URL query parameters on which the route should - * match. The router will check the query string from the *path* header + * match. The router will check the query string from the ``path`` header * against all the specified query parameters. If the number of specified - * query parameters is nonzero, they all must match the *path* header's + * query parameters is nonzero, they all must match the ``path`` header's * query string for a match to occur. * * .. note:: @@ -233,9 +250,9 @@ export interface RouteMatch__Output { 'runtime_fraction': (_envoy_config_core_v3_RuntimeFractionalPercent__Output | null); /** * If specified, the route is a regular expression rule meaning that the - * regex must match the *:path* header once the query string is removed. The entire path + * regex must match the ``:path`` header once the query string is removed. The entire path * (without the query string) must match the regex. The rule will not match if only a - * subsequence of the *:path* header matches the regex. + * subsequence of the ``:path`` header matches the regex. * * [#next-major-version: In the v3 API we should redo how path specification works such * that we utilize StringMatcher, and additionally have consistent options around whether we @@ -272,5 +289,21 @@ export interface RouteMatch__Output { * dynamic metadata for a match to occur. */ 'dynamic_metadata': (_envoy_type_matcher_v3_MetadataMatcher__Output)[]; - 'path_specifier': "prefix"|"path"|"safe_regex"|"connect_matcher"; + /** + * If specified, the route is a path-separated prefix rule meaning that the + * ``:path`` header (without the query string) must either exactly match the + * ``path_separated_prefix`` or have it as a prefix, followed by ``/`` + * + * For example, ``/api/dev`` would match + * ``/api/dev``, ``/api/dev/``, ``/api/dev/v1``, and ``/api/dev?param=true`` + * but would not match ``/api/developer`` + * + * Expect the value to not contain ``?`` or ``#`` and not to end in ``/`` + */ + 'path_separated_prefix'?: (string); + /** + * [#extension-category: envoy.path.match] + */ + 'path_match_policy'?: (_envoy_config_core_v3_TypedExtensionConfig__Output | null); + 'path_specifier': "prefix"|"path"|"safe_regex"|"connect_matcher"|"path_separated_prefix"|"path_match_policy"; } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/ScopedRouteConfiguration.ts b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/ScopedRouteConfiguration.ts index 5865eadd3..e13c537d4 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/ScopedRouteConfiguration.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/ScopedRouteConfiguration.ts @@ -1,5 +1,6 @@ // Original file: deps/envoy-api/envoy/config/route/v3/scoped_route.proto +import type { RouteConfiguration as _envoy_config_route_v3_RouteConfiguration, RouteConfiguration__Output as _envoy_config_route_v3_RouteConfiguration__Output } from '../../../../envoy/config/route/v3/RouteConfiguration'; export interface _envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment { /** @@ -52,7 +53,10 @@ export interface _envoy_config_route_v3_ScopedRouteConfiguration_Key__Output { /** * Specifies a routing scope, which associates a * :ref:`Key` to a - * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` (identified by its resource name). + * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. + * The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` can be obtained dynamically + * via RDS (:ref:`route_configuration_name`) + * or specified inline (:ref:`route_configuration`). * * The HTTP connection manager builds up a table consisting of these Key to * RouteConfiguration mappings, and looks up the RouteConfiguration to use per @@ -106,8 +110,10 @@ export interface _envoy_config_route_v3_ScopedRouteConfiguration_Key__Output { * Host: foo.com * X-Route-Selector: vip=172.10.10.20 * - * would result in the routing table defined by the `route-config1` + * would result in the routing table defined by the ``route-config1`` * RouteConfiguration being assigned to the HTTP request/stream. + * + * [#next-free-field: 6] */ export interface ScopedRouteConfiguration { /** @@ -128,12 +134,19 @@ export interface ScopedRouteConfiguration { * Whether the RouteConfiguration should be loaded on demand. */ 'on_demand'?: (boolean); + /** + * The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated with the scope. + */ + 'route_configuration'?: (_envoy_config_route_v3_RouteConfiguration | null); } /** * Specifies a routing scope, which associates a * :ref:`Key` to a - * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` (identified by its resource name). + * :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration`. + * The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` can be obtained dynamically + * via RDS (:ref:`route_configuration_name`) + * or specified inline (:ref:`route_configuration`). * * The HTTP connection manager builds up a table consisting of these Key to * RouteConfiguration mappings, and looks up the RouteConfiguration to use per @@ -187,8 +200,10 @@ export interface ScopedRouteConfiguration { * Host: foo.com * X-Route-Selector: vip=172.10.10.20 * - * would result in the routing table defined by the `route-config1` + * would result in the routing table defined by the ``route-config1`` * RouteConfiguration being assigned to the HTTP request/stream. + * + * [#next-free-field: 6] */ export interface ScopedRouteConfiguration__Output { /** @@ -209,4 +224,8 @@ export interface ScopedRouteConfiguration__Output { * Whether the RouteConfiguration should be loaded on demand. */ 'on_demand': (boolean); + /** + * The :ref:`envoy_v3_api_msg_config.route.v3.RouteConfiguration` associated with the scope. + */ + 'route_configuration': (_envoy_config_route_v3_RouteConfiguration__Output | null); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/Tracing.ts b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/Tracing.ts index 962e9d51a..29995243b 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/Tracing.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/Tracing.ts @@ -8,7 +8,7 @@ export interface Tracing { * Target percentage of requests managed by this HTTP connection manager that will be force * traced if the :ref:`x-client-trace-id ` * header is set. This field is a direct analog for the runtime variable - * 'tracing.client_sampling' in the :ref:`HTTP Connection Manager + * 'tracing.client_enabled' in the :ref:`HTTP Connection Manager * `. * Default: 100% */ @@ -48,7 +48,7 @@ export interface Tracing__Output { * Target percentage of requests managed by this HTTP connection manager that will be force * traced if the :ref:`x-client-trace-id ` * header is set. This field is a direct analog for the runtime variable - * 'tracing.client_sampling' in the :ref:`HTTP Connection Manager + * 'tracing.client_enabled' in the :ref:`HTTP Connection Manager * `. * Default: 100% */ diff --git a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/VirtualCluster.ts b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/VirtualCluster.ts index 7674da733..3c65d6a34 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/VirtualCluster.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/VirtualCluster.ts @@ -30,7 +30,7 @@ export interface VirtualCluster { 'name'?: (string); /** * Specifies a list of header matchers to use for matching requests. Each specified header must - * match. The pseudo-headers `:path` and `:method` can be used to match the request path and + * match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and * method, respectively. */ 'headers'?: (_envoy_config_route_v3_HeaderMatcher)[]; @@ -64,7 +64,7 @@ export interface VirtualCluster__Output { 'name': (string); /** * Specifies a list of header matchers to use for matching requests. Each specified header must - * match. The pseudo-headers `:path` and `:method` can be used to match the request path and + * match. The pseudo-headers ``:path`` and ``:method`` can be used to match the request path and * method, respectively. */ 'headers': (_envoy_config_route_v3_HeaderMatcher__Output)[]; diff --git a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/VirtualHost.ts b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/VirtualHost.ts index 017900ed9..b2c344fff 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/VirtualHost.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/VirtualHost.ts @@ -9,6 +9,8 @@ import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__ import type { RetryPolicy as _envoy_config_route_v3_RetryPolicy, RetryPolicy__Output as _envoy_config_route_v3_RetryPolicy__Output } from '../../../../envoy/config/route/v3/RetryPolicy'; import type { HedgePolicy as _envoy_config_route_v3_HedgePolicy, HedgePolicy__Output as _envoy_config_route_v3_HedgePolicy__Output } from '../../../../envoy/config/route/v3/HedgePolicy'; import type { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; +import type { Matcher as _xds_type_matcher_v3_Matcher, Matcher__Output as _xds_type_matcher_v3_Matcher__Output } from '../../../../xds/type/matcher/v3/Matcher'; +import type { _envoy_config_route_v3_RouteAction_RequestMirrorPolicy, _envoy_config_route_v3_RouteAction_RequestMirrorPolicy__Output } from '../../../../envoy/config/route/v3/RouteAction'; // Original file: deps/envoy-api/envoy/config/route/v3/route_components.proto @@ -35,7 +37,7 @@ export enum _envoy_config_route_v3_VirtualHost_TlsRequirementType { * host header. This allows a single listener to service multiple top level domain path trees. Once * a virtual host is selected based on the domain, the routes are processed in order to see which * upstream cluster to route to or whether to perform a redirect. - * [#next-free-field: 21] + * [#next-free-field: 24] */ export interface VirtualHost { /** @@ -67,6 +69,7 @@ export interface VirtualHost { /** * The list of routes that will be matched, in order, for incoming requests. * The first route that matches will be used. + * Only one of this and ``matcher`` can be specified. */ 'routes'?: (_envoy_config_route_v3_Route)[]; /** @@ -94,7 +97,15 @@ export interface VirtualHost { */ 'request_headers_to_add'?: (_envoy_config_core_v3_HeaderValueOption)[]; /** - * Indicates that the virtual host has a CORS policy. + * Indicates that the virtual host has a CORS policy. This field is ignored if related cors policy is + * found in the + * :ref:`VirtualHost.typed_per_filter_config`. + * + * .. attention:: + * + * This option has been deprecated. Please use + * :ref:`VirtualHost.typed_per_filter_config` + * to configure the CORS HTTP filter. */ 'cors'?: (_envoy_config_route_v3_CorsPolicy | null); /** @@ -130,11 +141,15 @@ export interface VirtualHost { */ 'include_request_attempt_count'?: (boolean); /** - * The per_filter_config field can be used to provide virtual host-specific - * configurations for filters. The key should match the filter name, such as - * *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter - * specific; see the :ref:`HTTP filter documentation ` - * for if and how it is utilized. + * The per_filter_config field can be used to provide virtual host-specific configurations for filters. + * The key should match the :ref:`filter config name + * `. + * The canonical filter name (e.g., ``envoy.filters.http.buffer`` for the HTTP buffer filter) can also + * be used for the backwards compatibility. If there is no entry referred by the filter config name, the + * entry referred by the canonical filter name will be provided to the filters as fallback. + * + * Use of this field is filter specific; + * see the :ref:`HTTP filter documentation ` for if and how it is utilized. * [#comment: An entry's value may be wrapped in a * :ref:`FilterConfig` * message to specify additional options.] @@ -177,6 +192,23 @@ export interface VirtualHost { * set if this field is used. */ 'retry_policy_typed_config'?: (_google_protobuf_Any | null); + /** + * [#next-major-version: This should be included in a oneof with routes wrapped in a message.] + * The match tree to use when resolving route actions for incoming requests. Only one of this and ``routes`` + * can be specified. + */ + 'matcher'?: (_xds_type_matcher_v3_Matcher | null); + /** + * Specify a set of default request mirroring policies for every route under this virtual host. + * It takes precedence over the route config mirror policy entirely. + * That is, policies are not merged, the most specific non-empty one becomes the mirror policies. + */ + 'request_mirror_policies'?: (_envoy_config_route_v3_RouteAction_RequestMirrorPolicy)[]; + /** + * Decides whether to include the :ref:`x-envoy-is-timeout-retry ` + * request header in retries initiated by per try timeouts. + */ + 'include_is_timeout_retry_header'?: (boolean); } /** @@ -185,7 +217,7 @@ export interface VirtualHost { * host header. This allows a single listener to service multiple top level domain path trees. Once * a virtual host is selected based on the domain, the routes are processed in order to see which * upstream cluster to route to or whether to perform a redirect. - * [#next-free-field: 21] + * [#next-free-field: 24] */ export interface VirtualHost__Output { /** @@ -217,6 +249,7 @@ export interface VirtualHost__Output { /** * The list of routes that will be matched, in order, for incoming requests. * The first route that matches will be used. + * Only one of this and ``matcher`` can be specified. */ 'routes': (_envoy_config_route_v3_Route__Output)[]; /** @@ -244,7 +277,15 @@ export interface VirtualHost__Output { */ 'request_headers_to_add': (_envoy_config_core_v3_HeaderValueOption__Output)[]; /** - * Indicates that the virtual host has a CORS policy. + * Indicates that the virtual host has a CORS policy. This field is ignored if related cors policy is + * found in the + * :ref:`VirtualHost.typed_per_filter_config`. + * + * .. attention:: + * + * This option has been deprecated. Please use + * :ref:`VirtualHost.typed_per_filter_config` + * to configure the CORS HTTP filter. */ 'cors': (_envoy_config_route_v3_CorsPolicy__Output | null); /** @@ -280,11 +321,15 @@ export interface VirtualHost__Output { */ 'include_request_attempt_count': (boolean); /** - * The per_filter_config field can be used to provide virtual host-specific - * configurations for filters. The key should match the filter name, such as - * *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter - * specific; see the :ref:`HTTP filter documentation ` - * for if and how it is utilized. + * The per_filter_config field can be used to provide virtual host-specific configurations for filters. + * The key should match the :ref:`filter config name + * `. + * The canonical filter name (e.g., ``envoy.filters.http.buffer`` for the HTTP buffer filter) can also + * be used for the backwards compatibility. If there is no entry referred by the filter config name, the + * entry referred by the canonical filter name will be provided to the filters as fallback. + * + * Use of this field is filter specific; + * see the :ref:`HTTP filter documentation ` for if and how it is utilized. * [#comment: An entry's value may be wrapped in a * :ref:`FilterConfig` * message to specify additional options.] @@ -327,4 +372,21 @@ export interface VirtualHost__Output { * set if this field is used. */ 'retry_policy_typed_config': (_google_protobuf_Any__Output | null); + /** + * [#next-major-version: This should be included in a oneof with routes wrapped in a message.] + * The match tree to use when resolving route actions for incoming requests. Only one of this and ``routes`` + * can be specified. + */ + 'matcher': (_xds_type_matcher_v3_Matcher__Output | null); + /** + * Specify a set of default request mirroring policies for every route under this virtual host. + * It takes precedence over the route config mirror policy entirely. + * That is, policies are not merged, the most specific non-empty one becomes the mirror policies. + */ + 'request_mirror_policies': (_envoy_config_route_v3_RouteAction_RequestMirrorPolicy__Output)[]; + /** + * Decides whether to include the :ref:`x-envoy-is-timeout-retry ` + * request header in retries initiated by per try timeouts. + */ + 'include_is_timeout_retry_header': (boolean); } diff --git a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/WeightedCluster.ts b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/WeightedCluster.ts index e734073be..cc820654d 100644 --- a/packages/grpc-js-xds/src/generated/envoy/config/route/v3/WeightedCluster.ts +++ b/packages/grpc-js-xds/src/generated/envoy/config/route/v3/WeightedCluster.ts @@ -10,14 +10,14 @@ import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__ */ export interface _envoy_config_route_v3_WeightedCluster_ClusterWeight { /** - * Only one of *name* and *cluster_header* may be specified. + * Only one of ``name`` and ``cluster_header`` may be specified. * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}] * Name of the upstream cluster. The cluster must exist in the * :ref:`cluster manager configuration `. */ 'name'?: (string); /** - * Only one of *name* and *cluster_header* may be specified. + * Only one of ``name`` and ``cluster_header`` may be specified. * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1 }] * Envoy will determine the cluster to route to by reading the value of the * HTTP header named by cluster_header from the request headers. If the @@ -26,8 +26,8 @@ export interface _envoy_config_route_v3_WeightedCluster_ClusterWeight { * * .. attention:: * - * Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 - * *Host* header. Thus, if attempting to match on *Host*, match on *:authority* instead. + * Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1 + * ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead. * * .. note:: * @@ -35,10 +35,11 @@ export interface _envoy_config_route_v3_WeightedCluster_ClusterWeight { */ 'cluster_header'?: (string); /** - * An integer between 0 and :ref:`total_weight - * `. When a request matches the route, - * the choice of an upstream cluster is determined by its weight. The sum of weights across all - * entries in the clusters array must add up to the total_weight, which defaults to 100. + * The weight of the cluster. This value is relative to the other clusters' + * weights. When a request matches the route, the choice of an upstream cluster + * is determined by its weight. The sum of weights across all + * entries in the clusters array must be greater than 0, and must not exceed + * uint32_t maximal value (4294967295). */ 'weight'?: (_google_protobuf_UInt32Value | null); /** @@ -46,7 +47,7 @@ export interface _envoy_config_route_v3_WeightedCluster_ClusterWeight { * the upstream cluster with metadata matching what is set in this field will be considered for * load balancing. Note that this will be merged with what's provided in * :ref:`RouteAction.metadata_match `, with - * values here taking precedence. The filter name should be specified as *envoy.lb*. + * values here taking precedence. The filter name should be specified as ``envoy.lb``. */ 'metadata_match'?: (_envoy_config_core_v3_Metadata | null); /** @@ -80,11 +81,16 @@ export interface _envoy_config_route_v3_WeightedCluster_ClusterWeight { */ 'response_headers_to_remove'?: (string)[]; /** - * The per_filter_config field can be used to provide weighted cluster-specific - * configurations for filters. The key should match the filter name, such as - * *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter - * specific; see the :ref:`HTTP filter documentation ` - * for if and how it is utilized. + * The per_filter_config field can be used to provide weighted cluster-specific configurations + * for filters. + * The key should match the :ref:`filter config name + * `. + * The canonical filter name (e.g., ``envoy.filters.http.buffer`` for the HTTP buffer filter) can also + * be used for the backwards compatibility. If there is no entry referred by the filter config name, the + * entry referred by the canonical filter name will be provided to the filters as fallback. + * + * Use of this field is filter specific; + * see the :ref:`HTTP filter documentation ` for if and how it is utilized. * [#comment: An entry's value may be wrapped in a * :ref:`FilterConfig` * message to specify additional options.] @@ -103,14 +109,14 @@ export interface _envoy_config_route_v3_WeightedCluster_ClusterWeight { */ export interface _envoy_config_route_v3_WeightedCluster_ClusterWeight__Output { /** - * Only one of *name* and *cluster_header* may be specified. + * Only one of ``name`` and ``cluster_header`` may be specified. * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1}] * Name of the upstream cluster. The cluster must exist in the * :ref:`cluster manager configuration `. */ 'name': (string); /** - * Only one of *name* and *cluster_header* may be specified. + * Only one of ``name`` and ``cluster_header`` may be specified. * [#next-major-version: Need to add back the validation rule: (validate.rules).string = {min_len: 1 }] * Envoy will determine the cluster to route to by reading the value of the * HTTP header named by cluster_header from the request headers. If the @@ -119,8 +125,8 @@ export interface _envoy_config_route_v3_WeightedCluster_ClusterWeight__Output { * * .. attention:: * - * Internally, Envoy always uses the HTTP/2 *:authority* header to represent the HTTP/1 - * *Host* header. Thus, if attempting to match on *Host*, match on *:authority* instead. + * Internally, Envoy always uses the HTTP/2 ``:authority`` header to represent the HTTP/1 + * ``Host`` header. Thus, if attempting to match on ``Host``, match on ``:authority`` instead. * * .. note:: * @@ -128,10 +134,11 @@ export interface _envoy_config_route_v3_WeightedCluster_ClusterWeight__Output { */ 'cluster_header': (string); /** - * An integer between 0 and :ref:`total_weight - * `. When a request matches the route, - * the choice of an upstream cluster is determined by its weight. The sum of weights across all - * entries in the clusters array must add up to the total_weight, which defaults to 100. + * The weight of the cluster. This value is relative to the other clusters' + * weights. When a request matches the route, the choice of an upstream cluster + * is determined by its weight. The sum of weights across all + * entries in the clusters array must be greater than 0, and must not exceed + * uint32_t maximal value (4294967295). */ 'weight': (_google_protobuf_UInt32Value__Output | null); /** @@ -139,7 +146,7 @@ export interface _envoy_config_route_v3_WeightedCluster_ClusterWeight__Output { * the upstream cluster with metadata matching what is set in this field will be considered for * load balancing. Note that this will be merged with what's provided in * :ref:`RouteAction.metadata_match `, with - * values here taking precedence. The filter name should be specified as *envoy.lb*. + * values here taking precedence. The filter name should be specified as ``envoy.lb``. */ 'metadata_match': (_envoy_config_core_v3_Metadata__Output | null); /** @@ -173,11 +180,16 @@ export interface _envoy_config_route_v3_WeightedCluster_ClusterWeight__Output { */ 'response_headers_to_remove': (string)[]; /** - * The per_filter_config field can be used to provide weighted cluster-specific - * configurations for filters. The key should match the filter name, such as - * *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter - * specific; see the :ref:`HTTP filter documentation ` - * for if and how it is utilized. + * The per_filter_config field can be used to provide weighted cluster-specific configurations + * for filters. + * The key should match the :ref:`filter config name + * `. + * The canonical filter name (e.g., ``envoy.filters.http.buffer`` for the HTTP buffer filter) can also + * be used for the backwards compatibility. If there is no entry referred by the filter config name, the + * entry referred by the canonical filter name will be provided to the filters as fallback. + * + * Use of this field is filter specific; + * see the :ref:`HTTP filter documentation ` for if and how it is utilized. * [#comment: An entry's value may be wrapped in a * :ref:`FilterConfig` * message to specify additional options.] @@ -206,10 +218,10 @@ export interface WeightedCluster { 'clusters'?: (_envoy_config_route_v3_WeightedCluster_ClusterWeight)[]; /** * Specifies the runtime key prefix that should be used to construct the - * runtime keys associated with each cluster. When the *runtime_key_prefix* is + * runtime keys associated with each cluster. When the ``runtime_key_prefix`` is * specified, the router will look for weights associated with each upstream - * cluster under the key *runtime_key_prefix* + "." + *cluster[i].name* where - * *cluster[i]* denotes an entry in the clusters array field. If the runtime + * cluster under the key ``runtime_key_prefix`` + ``.`` + ``cluster[i].name`` where + * ``cluster[i]`` denotes an entry in the clusters array field. If the runtime * key for the cluster does not exist, the value specified in the * configuration file will be used as the default weight. See the :ref:`runtime documentation * ` for how key names map to the underlying implementation. @@ -217,9 +229,20 @@ export interface WeightedCluster { 'runtime_key_prefix'?: (string); /** * Specifies the total weight across all clusters. The sum of all cluster weights must equal this - * value, which must be greater than 0. Defaults to 100. + * value, if this is greater than 0. + * This field is now deprecated, and the client will use the sum of all + * cluster weights. It is up to the management server to supply the correct weights. */ 'total_weight'?: (_google_protobuf_UInt32Value | null); + /** + * Specifies the header name that is used to look up the random value passed in the request header. + * This is used to ensure consistent cluster picking across multiple proxy levels for weighted traffic. + * If header is not present or invalid, Envoy will fall back to use the internally generated random value. + * This header is expected to be single-valued header as we only want to have one selected value throughout + * the process for the consistency. And the value is a unsigned number between 0 and UINT64_MAX. + */ + 'header_name'?: (string); + 'random_value_specifier'?: "header_name"; } /** @@ -237,10 +260,10 @@ export interface WeightedCluster__Output { 'clusters': (_envoy_config_route_v3_WeightedCluster_ClusterWeight__Output)[]; /** * Specifies the runtime key prefix that should be used to construct the - * runtime keys associated with each cluster. When the *runtime_key_prefix* is + * runtime keys associated with each cluster. When the ``runtime_key_prefix`` is * specified, the router will look for weights associated with each upstream - * cluster under the key *runtime_key_prefix* + "." + *cluster[i].name* where - * *cluster[i]* denotes an entry in the clusters array field. If the runtime + * cluster under the key ``runtime_key_prefix`` + ``.`` + ``cluster[i].name`` where + * ``cluster[i]`` denotes an entry in the clusters array field. If the runtime * key for the cluster does not exist, the value specified in the * configuration file will be used as the default weight. See the :ref:`runtime documentation * ` for how key names map to the underlying implementation. @@ -248,7 +271,18 @@ export interface WeightedCluster__Output { 'runtime_key_prefix': (string); /** * Specifies the total weight across all clusters. The sum of all cluster weights must equal this - * value, which must be greater than 0. Defaults to 100. + * value, if this is greater than 0. + * This field is now deprecated, and the client will use the sum of all + * cluster weights. It is up to the management server to supply the correct weights. */ 'total_weight': (_google_protobuf_UInt32Value__Output | null); + /** + * Specifies the header name that is used to look up the random value passed in the request header. + * This is used to ensure consistent cluster picking across multiple proxy levels for weighted traffic. + * If header is not present or invalid, Envoy will fall back to use the internally generated random value. + * This header is expected to be single-valued header as we only want to have one selected value throughout + * the process for the consistency. And the value is a unsigned number between 0 and UINT64_MAX. + */ + 'header_name'?: (string); + 'random_value_specifier': "header_name"; } diff --git a/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/AccessLogCommon.ts b/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/AccessLogCommon.ts new file mode 100644 index 000000000..7679dfac1 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/AccessLogCommon.ts @@ -0,0 +1,421 @@ +// Original file: deps/envoy-api/envoy/data/accesslog/v3/accesslog.proto + +import type { Address as _envoy_config_core_v3_Address, Address__Output as _envoy_config_core_v3_Address__Output } from '../../../../envoy/config/core/v3/Address'; +import type { TLSProperties as _envoy_data_accesslog_v3_TLSProperties, TLSProperties__Output as _envoy_data_accesslog_v3_TLSProperties__Output } from '../../../../envoy/data/accesslog/v3/TLSProperties'; +import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../../google/protobuf/Timestamp'; +import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../../google/protobuf/Duration'; +import type { ResponseFlags as _envoy_data_accesslog_v3_ResponseFlags, ResponseFlags__Output as _envoy_data_accesslog_v3_ResponseFlags__Output } from '../../../../envoy/data/accesslog/v3/ResponseFlags'; +import type { Metadata as _envoy_config_core_v3_Metadata, Metadata__Output as _envoy_config_core_v3_Metadata__Output } from '../../../../envoy/config/core/v3/Metadata'; +import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; +import type { AccessLogType as _envoy_data_accesslog_v3_AccessLogType } from '../../../../envoy/data/accesslog/v3/AccessLogType'; +import type { Long } from '@grpc/proto-loader'; + +/** + * Defines fields that are shared by all Envoy access logs. + * [#next-free-field: 34] + */ +export interface AccessLogCommon { + /** + * [#not-implemented-hide:] + * This field indicates the rate at which this log entry was sampled. + * Valid range is (0.0, 1.0]. + */ + 'sample_rate'?: (number | string); + /** + * This field is the remote/origin address on which the request from the user was received. + * Note: This may not be the physical peer. E.g, if the remote address is inferred from for + * example the x-forwarder-for header, proxy protocol, etc. + */ + 'downstream_remote_address'?: (_envoy_config_core_v3_Address | null); + /** + * This field is the local/destination address on which the request from the user was received. + */ + 'downstream_local_address'?: (_envoy_config_core_v3_Address | null); + /** + * If the connection is secure,S this field will contain TLS properties. + */ + 'tls_properties'?: (_envoy_data_accesslog_v3_TLSProperties | null); + /** + * The time that Envoy started servicing this request. This is effectively the time that the first + * downstream byte is received. + */ + 'start_time'?: (_google_protobuf_Timestamp | null); + /** + * Interval between the first downstream byte received and the last + * downstream byte received (i.e. time it takes to receive a request). + */ + 'time_to_last_rx_byte'?: (_google_protobuf_Duration | null); + /** + * Interval between the first downstream byte received and the first upstream byte sent. There may + * by considerable delta between ``time_to_last_rx_byte`` and this value due to filters. + * Additionally, the same caveats apply as documented in ``time_to_last_downstream_tx_byte`` about + * not accounting for kernel socket buffer time, etc. + */ + 'time_to_first_upstream_tx_byte'?: (_google_protobuf_Duration | null); + /** + * Interval between the first downstream byte received and the last upstream byte sent. There may + * by considerable delta between ``time_to_last_rx_byte`` and this value due to filters. + * Additionally, the same caveats apply as documented in ``time_to_last_downstream_tx_byte`` about + * not accounting for kernel socket buffer time, etc. + */ + 'time_to_last_upstream_tx_byte'?: (_google_protobuf_Duration | null); + /** + * Interval between the first downstream byte received and the first upstream + * byte received (i.e. time it takes to start receiving a response). + */ + 'time_to_first_upstream_rx_byte'?: (_google_protobuf_Duration | null); + /** + * Interval between the first downstream byte received and the last upstream + * byte received (i.e. time it takes to receive a complete response). + */ + 'time_to_last_upstream_rx_byte'?: (_google_protobuf_Duration | null); + /** + * Interval between the first downstream byte received and the first downstream byte sent. + * There may be a considerable delta between the ``time_to_first_upstream_rx_byte`` and this field + * due to filters. Additionally, the same caveats apply as documented in + * ``time_to_last_downstream_tx_byte`` about not accounting for kernel socket buffer time, etc. + */ + 'time_to_first_downstream_tx_byte'?: (_google_protobuf_Duration | null); + /** + * Interval between the first downstream byte received and the last downstream byte sent. + * Depending on protocol, buffering, windowing, filters, etc. there may be a considerable delta + * between ``time_to_last_upstream_rx_byte`` and this field. Note also that this is an approximate + * time. In the current implementation it does not include kernel socket buffer time. In the + * current implementation it also does not include send window buffering inside the HTTP/2 codec. + * In the future it is likely that work will be done to make this duration more accurate. + */ + 'time_to_last_downstream_tx_byte'?: (_google_protobuf_Duration | null); + /** + * The upstream remote/destination address that handles this exchange. This does not include + * retries. + */ + 'upstream_remote_address'?: (_envoy_config_core_v3_Address | null); + /** + * The upstream local/origin address that handles this exchange. This does not include retries. + */ + 'upstream_local_address'?: (_envoy_config_core_v3_Address | null); + /** + * The upstream cluster that ``upstream_remote_address`` belongs to. + */ + 'upstream_cluster'?: (string); + /** + * Flags indicating occurrences during request/response processing. + */ + 'response_flags'?: (_envoy_data_accesslog_v3_ResponseFlags | null); + /** + * All metadata encountered during request processing, including endpoint + * selection. + * + * This can be used to associate IDs attached to the various configurations + * used to process this request with the access log entry. For example, a + * route created from a higher level forwarding rule with some ID can place + * that ID in this field and cross reference later. It can also be used to + * determine if a canary endpoint was used or not. + */ + 'metadata'?: (_envoy_config_core_v3_Metadata | null); + /** + * If upstream connection failed due to transport socket (e.g. TLS handshake), provides the + * failure reason from the transport socket. The format of this field depends on the configured + * upstream transport socket. Common TLS failures are in + * :ref:`TLS trouble shooting `. + */ + 'upstream_transport_failure_reason'?: (string); + /** + * The name of the route + */ + 'route_name'?: (string); + /** + * This field is the downstream direct remote address on which the request from the user was + * received. Note: This is always the physical peer, even if the remote address is inferred from + * for example the x-forwarder-for header, proxy protocol, etc. + */ + 'downstream_direct_remote_address'?: (_envoy_config_core_v3_Address | null); + /** + * Map of filter state in stream info that have been configured to be logged. If the filter + * state serialized to any message other than ``google.protobuf.Any`` it will be packed into + * ``google.protobuf.Any``. + */ + 'filter_state_objects'?: ({[key: string]: _google_protobuf_Any}); + /** + * A list of custom tags, which annotate logs with additional information. + * To configure this value, users should configure + * :ref:`custom_tags `. + */ + 'custom_tags'?: ({[key: string]: string}); + /** + * For HTTP: Total duration in milliseconds of the request from the start time to the last byte out. + * For TCP: Total duration in milliseconds of the downstream connection. + * This is the total duration of the request (i.e., when the request's ActiveStream is destroyed) + * and may be longer than ``time_to_last_downstream_tx_byte``. + */ + 'duration'?: (_google_protobuf_Duration | null); + /** + * For HTTP: Number of times the request is attempted upstream. Note that the field is omitted when the request was never attempted upstream. + * For TCP: Number of times the connection request is attempted upstream. Note that the field is omitted when the connect request was never attempted upstream. + */ + 'upstream_request_attempt_count'?: (number); + /** + * Connection termination details may provide additional information about why the connection was terminated by Envoy for L4 reasons. + */ + 'connection_termination_details'?: (string); + /** + * Optional unique id of stream (TCP connection, long-live HTTP2 stream, HTTP request) for logging and tracing. + * This could be any format string that could be used to identify one stream. + */ + 'stream_id'?: (string); + /** + * If this log entry is final log entry that flushed after the stream completed or + * intermediate log entry that flushed periodically during the stream. + * There may be multiple intermediate log entries and only one final log entry for each + * long-live stream (TCP connection, long-live HTTP2 stream). + * And if it is necessary, unique ID or identifier can be added to the log entry + * :ref:`stream_id ` to + * correlate all these intermediate log entries and final log entry. + * + * .. attention:: + * + * This field is deprecated in favor of ``access_log_type`` for better indication of the + * type of the access log record. + */ + 'intermediate_log_entry'?: (boolean); + /** + * If downstream connection in listener failed due to transport socket (e.g. TLS handshake), provides the + * failure reason from the transport socket. The format of this field depends on the configured downstream + * transport socket. Common TLS failures are in :ref:`TLS trouble shooting `. + */ + 'downstream_transport_failure_reason'?: (string); + /** + * For HTTP: Total number of bytes sent to the downstream by the http stream. + * For TCP: Total number of bytes sent to the downstream by the tcp proxy. + */ + 'downstream_wire_bytes_sent'?: (number | string | Long); + /** + * For HTTP: Total number of bytes received from the downstream by the http stream. Envoy over counts sizes of received HTTP/1.1 pipelined requests by adding up bytes of requests in the pipeline to the one currently being processed. + * For TCP: Total number of bytes received from the downstream by the tcp proxy. + */ + 'downstream_wire_bytes_received'?: (number | string | Long); + /** + * For HTTP: Total number of bytes sent to the upstream by the http stream. This value accumulates during upstream retries. + * For TCP: Total number of bytes sent to the upstream by the tcp proxy. + */ + 'upstream_wire_bytes_sent'?: (number | string | Long); + /** + * For HTTP: Total number of bytes received from the upstream by the http stream. + * For TCP: Total number of bytes sent to the upstream by the tcp proxy. + */ + 'upstream_wire_bytes_received'?: (number | string | Long); + /** + * The type of the access log, which indicates when the log was recorded. + * See :ref:`ACCESS_LOG_TYPE ` for the available values. + * In case the access log was recorded by a flow which does not correspond to one of the supported + * values, then the default value will be ``NotSet``. + * For more information about how access log behaves and when it is being recorded, + * please refer to :ref:`access logging `. + */ + 'access_log_type'?: (_envoy_data_accesslog_v3_AccessLogType | keyof typeof _envoy_data_accesslog_v3_AccessLogType); +} + +/** + * Defines fields that are shared by all Envoy access logs. + * [#next-free-field: 34] + */ +export interface AccessLogCommon__Output { + /** + * [#not-implemented-hide:] + * This field indicates the rate at which this log entry was sampled. + * Valid range is (0.0, 1.0]. + */ + 'sample_rate': (number); + /** + * This field is the remote/origin address on which the request from the user was received. + * Note: This may not be the physical peer. E.g, if the remote address is inferred from for + * example the x-forwarder-for header, proxy protocol, etc. + */ + 'downstream_remote_address': (_envoy_config_core_v3_Address__Output | null); + /** + * This field is the local/destination address on which the request from the user was received. + */ + 'downstream_local_address': (_envoy_config_core_v3_Address__Output | null); + /** + * If the connection is secure,S this field will contain TLS properties. + */ + 'tls_properties': (_envoy_data_accesslog_v3_TLSProperties__Output | null); + /** + * The time that Envoy started servicing this request. This is effectively the time that the first + * downstream byte is received. + */ + 'start_time': (_google_protobuf_Timestamp__Output | null); + /** + * Interval between the first downstream byte received and the last + * downstream byte received (i.e. time it takes to receive a request). + */ + 'time_to_last_rx_byte': (_google_protobuf_Duration__Output | null); + /** + * Interval between the first downstream byte received and the first upstream byte sent. There may + * by considerable delta between ``time_to_last_rx_byte`` and this value due to filters. + * Additionally, the same caveats apply as documented in ``time_to_last_downstream_tx_byte`` about + * not accounting for kernel socket buffer time, etc. + */ + 'time_to_first_upstream_tx_byte': (_google_protobuf_Duration__Output | null); + /** + * Interval between the first downstream byte received and the last upstream byte sent. There may + * by considerable delta between ``time_to_last_rx_byte`` and this value due to filters. + * Additionally, the same caveats apply as documented in ``time_to_last_downstream_tx_byte`` about + * not accounting for kernel socket buffer time, etc. + */ + 'time_to_last_upstream_tx_byte': (_google_protobuf_Duration__Output | null); + /** + * Interval between the first downstream byte received and the first upstream + * byte received (i.e. time it takes to start receiving a response). + */ + 'time_to_first_upstream_rx_byte': (_google_protobuf_Duration__Output | null); + /** + * Interval between the first downstream byte received and the last upstream + * byte received (i.e. time it takes to receive a complete response). + */ + 'time_to_last_upstream_rx_byte': (_google_protobuf_Duration__Output | null); + /** + * Interval between the first downstream byte received and the first downstream byte sent. + * There may be a considerable delta between the ``time_to_first_upstream_rx_byte`` and this field + * due to filters. Additionally, the same caveats apply as documented in + * ``time_to_last_downstream_tx_byte`` about not accounting for kernel socket buffer time, etc. + */ + 'time_to_first_downstream_tx_byte': (_google_protobuf_Duration__Output | null); + /** + * Interval between the first downstream byte received and the last downstream byte sent. + * Depending on protocol, buffering, windowing, filters, etc. there may be a considerable delta + * between ``time_to_last_upstream_rx_byte`` and this field. Note also that this is an approximate + * time. In the current implementation it does not include kernel socket buffer time. In the + * current implementation it also does not include send window buffering inside the HTTP/2 codec. + * In the future it is likely that work will be done to make this duration more accurate. + */ + 'time_to_last_downstream_tx_byte': (_google_protobuf_Duration__Output | null); + /** + * The upstream remote/destination address that handles this exchange. This does not include + * retries. + */ + 'upstream_remote_address': (_envoy_config_core_v3_Address__Output | null); + /** + * The upstream local/origin address that handles this exchange. This does not include retries. + */ + 'upstream_local_address': (_envoy_config_core_v3_Address__Output | null); + /** + * The upstream cluster that ``upstream_remote_address`` belongs to. + */ + 'upstream_cluster': (string); + /** + * Flags indicating occurrences during request/response processing. + */ + 'response_flags': (_envoy_data_accesslog_v3_ResponseFlags__Output | null); + /** + * All metadata encountered during request processing, including endpoint + * selection. + * + * This can be used to associate IDs attached to the various configurations + * used to process this request with the access log entry. For example, a + * route created from a higher level forwarding rule with some ID can place + * that ID in this field and cross reference later. It can also be used to + * determine if a canary endpoint was used or not. + */ + 'metadata': (_envoy_config_core_v3_Metadata__Output | null); + /** + * If upstream connection failed due to transport socket (e.g. TLS handshake), provides the + * failure reason from the transport socket. The format of this field depends on the configured + * upstream transport socket. Common TLS failures are in + * :ref:`TLS trouble shooting `. + */ + 'upstream_transport_failure_reason': (string); + /** + * The name of the route + */ + 'route_name': (string); + /** + * This field is the downstream direct remote address on which the request from the user was + * received. Note: This is always the physical peer, even if the remote address is inferred from + * for example the x-forwarder-for header, proxy protocol, etc. + */ + 'downstream_direct_remote_address': (_envoy_config_core_v3_Address__Output | null); + /** + * Map of filter state in stream info that have been configured to be logged. If the filter + * state serialized to any message other than ``google.protobuf.Any`` it will be packed into + * ``google.protobuf.Any``. + */ + 'filter_state_objects': ({[key: string]: _google_protobuf_Any__Output}); + /** + * A list of custom tags, which annotate logs with additional information. + * To configure this value, users should configure + * :ref:`custom_tags `. + */ + 'custom_tags': ({[key: string]: string}); + /** + * For HTTP: Total duration in milliseconds of the request from the start time to the last byte out. + * For TCP: Total duration in milliseconds of the downstream connection. + * This is the total duration of the request (i.e., when the request's ActiveStream is destroyed) + * and may be longer than ``time_to_last_downstream_tx_byte``. + */ + 'duration': (_google_protobuf_Duration__Output | null); + /** + * For HTTP: Number of times the request is attempted upstream. Note that the field is omitted when the request was never attempted upstream. + * For TCP: Number of times the connection request is attempted upstream. Note that the field is omitted when the connect request was never attempted upstream. + */ + 'upstream_request_attempt_count': (number); + /** + * Connection termination details may provide additional information about why the connection was terminated by Envoy for L4 reasons. + */ + 'connection_termination_details': (string); + /** + * Optional unique id of stream (TCP connection, long-live HTTP2 stream, HTTP request) for logging and tracing. + * This could be any format string that could be used to identify one stream. + */ + 'stream_id': (string); + /** + * If this log entry is final log entry that flushed after the stream completed or + * intermediate log entry that flushed periodically during the stream. + * There may be multiple intermediate log entries and only one final log entry for each + * long-live stream (TCP connection, long-live HTTP2 stream). + * And if it is necessary, unique ID or identifier can be added to the log entry + * :ref:`stream_id ` to + * correlate all these intermediate log entries and final log entry. + * + * .. attention:: + * + * This field is deprecated in favor of ``access_log_type`` for better indication of the + * type of the access log record. + */ + 'intermediate_log_entry': (boolean); + /** + * If downstream connection in listener failed due to transport socket (e.g. TLS handshake), provides the + * failure reason from the transport socket. The format of this field depends on the configured downstream + * transport socket. Common TLS failures are in :ref:`TLS trouble shooting `. + */ + 'downstream_transport_failure_reason': (string); + /** + * For HTTP: Total number of bytes sent to the downstream by the http stream. + * For TCP: Total number of bytes sent to the downstream by the tcp proxy. + */ + 'downstream_wire_bytes_sent': (string); + /** + * For HTTP: Total number of bytes received from the downstream by the http stream. Envoy over counts sizes of received HTTP/1.1 pipelined requests by adding up bytes of requests in the pipeline to the one currently being processed. + * For TCP: Total number of bytes received from the downstream by the tcp proxy. + */ + 'downstream_wire_bytes_received': (string); + /** + * For HTTP: Total number of bytes sent to the upstream by the http stream. This value accumulates during upstream retries. + * For TCP: Total number of bytes sent to the upstream by the tcp proxy. + */ + 'upstream_wire_bytes_sent': (string); + /** + * For HTTP: Total number of bytes received from the upstream by the http stream. + * For TCP: Total number of bytes sent to the upstream by the tcp proxy. + */ + 'upstream_wire_bytes_received': (string); + /** + * The type of the access log, which indicates when the log was recorded. + * See :ref:`ACCESS_LOG_TYPE ` for the available values. + * In case the access log was recorded by a flow which does not correspond to one of the supported + * values, then the default value will be ``NotSet``. + * For more information about how access log behaves and when it is being recorded, + * please refer to :ref:`access logging `. + */ + 'access_log_type': (keyof typeof _envoy_data_accesslog_v3_AccessLogType); +} diff --git a/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/AccessLogType.ts b/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/AccessLogType.ts new file mode 100644 index 000000000..a50bb42c1 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/AccessLogType.ts @@ -0,0 +1,15 @@ +// Original file: deps/envoy-api/envoy/data/accesslog/v3/accesslog.proto + +export enum AccessLogType { + NotSet = 0, + TcpUpstreamConnected = 1, + TcpPeriodic = 2, + TcpConnectionEnd = 3, + DownstreamStart = 4, + DownstreamPeriodic = 5, + DownstreamEnd = 6, + UpstreamPoolReady = 7, + UpstreamPeriodic = 8, + UpstreamEnd = 9, + DownstreamTunnelSuccessfullyEstablished = 10, +} diff --git a/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/ConnectionProperties.ts b/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/ConnectionProperties.ts new file mode 100644 index 000000000..a0cdfc75f --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/ConnectionProperties.ts @@ -0,0 +1,31 @@ +// Original file: deps/envoy-api/envoy/data/accesslog/v3/accesslog.proto + +import type { Long } from '@grpc/proto-loader'; + +/** + * Defines fields for a connection + */ +export interface ConnectionProperties { + /** + * Number of bytes received from downstream. + */ + 'received_bytes'?: (number | string | Long); + /** + * Number of bytes sent to downstream. + */ + 'sent_bytes'?: (number | string | Long); +} + +/** + * Defines fields for a connection + */ +export interface ConnectionProperties__Output { + /** + * Number of bytes received from downstream. + */ + 'received_bytes': (string); + /** + * Number of bytes sent to downstream. + */ + 'sent_bytes': (string); +} diff --git a/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/HTTPAccessLogEntry.ts b/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/HTTPAccessLogEntry.ts new file mode 100644 index 000000000..760954bb1 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/HTTPAccessLogEntry.ts @@ -0,0 +1,50 @@ +// Original file: deps/envoy-api/envoy/data/accesslog/v3/accesslog.proto + +import type { AccessLogCommon as _envoy_data_accesslog_v3_AccessLogCommon, AccessLogCommon__Output as _envoy_data_accesslog_v3_AccessLogCommon__Output } from '../../../../envoy/data/accesslog/v3/AccessLogCommon'; +import type { HTTPRequestProperties as _envoy_data_accesslog_v3_HTTPRequestProperties, HTTPRequestProperties__Output as _envoy_data_accesslog_v3_HTTPRequestProperties__Output } from '../../../../envoy/data/accesslog/v3/HTTPRequestProperties'; +import type { HTTPResponseProperties as _envoy_data_accesslog_v3_HTTPResponseProperties, HTTPResponseProperties__Output as _envoy_data_accesslog_v3_HTTPResponseProperties__Output } from '../../../../envoy/data/accesslog/v3/HTTPResponseProperties'; + +// Original file: deps/envoy-api/envoy/data/accesslog/v3/accesslog.proto + +/** + * HTTP version + */ +export enum _envoy_data_accesslog_v3_HTTPAccessLogEntry_HTTPVersion { + PROTOCOL_UNSPECIFIED = 0, + HTTP10 = 1, + HTTP11 = 2, + HTTP2 = 3, + HTTP3 = 4, +} + +export interface HTTPAccessLogEntry { + /** + * Common properties shared by all Envoy access logs. + */ + 'common_properties'?: (_envoy_data_accesslog_v3_AccessLogCommon | null); + 'protocol_version'?: (_envoy_data_accesslog_v3_HTTPAccessLogEntry_HTTPVersion | keyof typeof _envoy_data_accesslog_v3_HTTPAccessLogEntry_HTTPVersion); + /** + * Description of the incoming HTTP request. + */ + 'request'?: (_envoy_data_accesslog_v3_HTTPRequestProperties | null); + /** + * Description of the outgoing HTTP response. + */ + 'response'?: (_envoy_data_accesslog_v3_HTTPResponseProperties | null); +} + +export interface HTTPAccessLogEntry__Output { + /** + * Common properties shared by all Envoy access logs. + */ + 'common_properties': (_envoy_data_accesslog_v3_AccessLogCommon__Output | null); + 'protocol_version': (keyof typeof _envoy_data_accesslog_v3_HTTPAccessLogEntry_HTTPVersion); + /** + * Description of the incoming HTTP request. + */ + 'request': (_envoy_data_accesslog_v3_HTTPRequestProperties__Output | null); + /** + * Description of the outgoing HTTP response. + */ + 'response': (_envoy_data_accesslog_v3_HTTPResponseProperties__Output | null); +} diff --git a/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/HTTPRequestProperties.ts b/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/HTTPRequestProperties.ts new file mode 100644 index 000000000..9e145503c --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/HTTPRequestProperties.ts @@ -0,0 +1,163 @@ +// Original file: deps/envoy-api/envoy/data/accesslog/v3/accesslog.proto + +import type { RequestMethod as _envoy_config_core_v3_RequestMethod } from '../../../../envoy/config/core/v3/RequestMethod'; +import type { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; +import type { Long } from '@grpc/proto-loader'; + +/** + * [#next-free-field: 16] + */ +export interface HTTPRequestProperties { + /** + * The request method (RFC 7231/2616). + */ + 'request_method'?: (_envoy_config_core_v3_RequestMethod | keyof typeof _envoy_config_core_v3_RequestMethod); + /** + * The scheme portion of the incoming request URI. + */ + 'scheme'?: (string); + /** + * HTTP/2 ``:authority`` or HTTP/1.1 ``Host`` header value. + */ + 'authority'?: (string); + /** + * The port of the incoming request URI + * (unused currently, as port is composed onto authority). + */ + 'port'?: (_google_protobuf_UInt32Value | null); + /** + * The path portion from the incoming request URI. + */ + 'path'?: (string); + /** + * Value of the ``User-Agent`` request header. + */ + 'user_agent'?: (string); + /** + * Value of the ``Referer`` request header. + */ + 'referer'?: (string); + /** + * Value of the ``X-Forwarded-For`` request header. + */ + 'forwarded_for'?: (string); + /** + * Value of the ``X-Request-Id`` request header + * + * This header is used by Envoy to uniquely identify a request. + * It will be generated for all external requests and internal requests that + * do not already have a request ID. + */ + 'request_id'?: (string); + /** + * Value of the ``X-Envoy-Original-Path`` request header. + */ + 'original_path'?: (string); + /** + * Size of the HTTP request headers in bytes. + * + * This value is captured from the OSI layer 7 perspective, i.e. it does not + * include overhead from framing or encoding at other networking layers. + */ + 'request_headers_bytes'?: (number | string | Long); + /** + * Size of the HTTP request body in bytes. + * + * This value is captured from the OSI layer 7 perspective, i.e. it does not + * include overhead from framing or encoding at other networking layers. + */ + 'request_body_bytes'?: (number | string | Long); + /** + * Map of additional headers that have been configured to be logged. + */ + 'request_headers'?: ({[key: string]: string}); + /** + * Number of header bytes sent to the upstream by the http stream, including protocol overhead. + * + * This value accumulates during upstream retries. + */ + 'upstream_header_bytes_sent'?: (number | string | Long); + /** + * Number of header bytes received from the downstream by the http stream, including protocol overhead. + */ + 'downstream_header_bytes_received'?: (number | string | Long); +} + +/** + * [#next-free-field: 16] + */ +export interface HTTPRequestProperties__Output { + /** + * The request method (RFC 7231/2616). + */ + 'request_method': (keyof typeof _envoy_config_core_v3_RequestMethod); + /** + * The scheme portion of the incoming request URI. + */ + 'scheme': (string); + /** + * HTTP/2 ``:authority`` or HTTP/1.1 ``Host`` header value. + */ + 'authority': (string); + /** + * The port of the incoming request URI + * (unused currently, as port is composed onto authority). + */ + 'port': (_google_protobuf_UInt32Value__Output | null); + /** + * The path portion from the incoming request URI. + */ + 'path': (string); + /** + * Value of the ``User-Agent`` request header. + */ + 'user_agent': (string); + /** + * Value of the ``Referer`` request header. + */ + 'referer': (string); + /** + * Value of the ``X-Forwarded-For`` request header. + */ + 'forwarded_for': (string); + /** + * Value of the ``X-Request-Id`` request header + * + * This header is used by Envoy to uniquely identify a request. + * It will be generated for all external requests and internal requests that + * do not already have a request ID. + */ + 'request_id': (string); + /** + * Value of the ``X-Envoy-Original-Path`` request header. + */ + 'original_path': (string); + /** + * Size of the HTTP request headers in bytes. + * + * This value is captured from the OSI layer 7 perspective, i.e. it does not + * include overhead from framing or encoding at other networking layers. + */ + 'request_headers_bytes': (string); + /** + * Size of the HTTP request body in bytes. + * + * This value is captured from the OSI layer 7 perspective, i.e. it does not + * include overhead from framing or encoding at other networking layers. + */ + 'request_body_bytes': (string); + /** + * Map of additional headers that have been configured to be logged. + */ + 'request_headers': ({[key: string]: string}); + /** + * Number of header bytes sent to the upstream by the http stream, including protocol overhead. + * + * This value accumulates during upstream retries. + */ + 'upstream_header_bytes_sent': (string); + /** + * Number of header bytes received from the downstream by the http stream, including protocol overhead. + */ + 'downstream_header_bytes_received': (string); +} diff --git a/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/HTTPResponseProperties.ts b/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/HTTPResponseProperties.ts new file mode 100644 index 000000000..1368fc8cd --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/HTTPResponseProperties.ts @@ -0,0 +1,92 @@ +// Original file: deps/envoy-api/envoy/data/accesslog/v3/accesslog.proto + +import type { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; +import type { Long } from '@grpc/proto-loader'; + +/** + * [#next-free-field: 9] + */ +export interface HTTPResponseProperties { + /** + * The HTTP response code returned by Envoy. + */ + 'response_code'?: (_google_protobuf_UInt32Value | null); + /** + * Size of the HTTP response headers in bytes. + * + * This value is captured from the OSI layer 7 perspective, i.e. it does not + * include protocol overhead or overhead from framing or encoding at other networking layers. + */ + 'response_headers_bytes'?: (number | string | Long); + /** + * Size of the HTTP response body in bytes. + * + * This value is captured from the OSI layer 7 perspective, i.e. it does not + * include overhead from framing or encoding at other networking layers. + */ + 'response_body_bytes'?: (number | string | Long); + /** + * Map of additional headers configured to be logged. + */ + 'response_headers'?: ({[key: string]: string}); + /** + * Map of trailers configured to be logged. + */ + 'response_trailers'?: ({[key: string]: string}); + /** + * The HTTP response code details. + */ + 'response_code_details'?: (string); + /** + * Number of header bytes received from the upstream by the http stream, including protocol overhead. + */ + 'upstream_header_bytes_received'?: (number | string | Long); + /** + * Number of header bytes sent to the downstream by the http stream, including protocol overhead. + */ + 'downstream_header_bytes_sent'?: (number | string | Long); +} + +/** + * [#next-free-field: 9] + */ +export interface HTTPResponseProperties__Output { + /** + * The HTTP response code returned by Envoy. + */ + 'response_code': (_google_protobuf_UInt32Value__Output | null); + /** + * Size of the HTTP response headers in bytes. + * + * This value is captured from the OSI layer 7 perspective, i.e. it does not + * include protocol overhead or overhead from framing or encoding at other networking layers. + */ + 'response_headers_bytes': (string); + /** + * Size of the HTTP response body in bytes. + * + * This value is captured from the OSI layer 7 perspective, i.e. it does not + * include overhead from framing or encoding at other networking layers. + */ + 'response_body_bytes': (string); + /** + * Map of additional headers configured to be logged. + */ + 'response_headers': ({[key: string]: string}); + /** + * Map of trailers configured to be logged. + */ + 'response_trailers': ({[key: string]: string}); + /** + * The HTTP response code details. + */ + 'response_code_details': (string); + /** + * Number of header bytes received from the upstream by the http stream, including protocol overhead. + */ + 'upstream_header_bytes_received': (string); + /** + * Number of header bytes sent to the downstream by the http stream, including protocol overhead. + */ + 'downstream_header_bytes_sent': (string); +} diff --git a/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/ResponseFlags.ts b/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/ResponseFlags.ts new file mode 100644 index 000000000..ec45824b3 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/ResponseFlags.ts @@ -0,0 +1,255 @@ +// Original file: deps/envoy-api/envoy/data/accesslog/v3/accesslog.proto + + +// Original file: deps/envoy-api/envoy/data/accesslog/v3/accesslog.proto + +/** + * Reasons why the request was unauthorized + */ +export enum _envoy_data_accesslog_v3_ResponseFlags_Unauthorized_Reason { + REASON_UNSPECIFIED = 0, + /** + * The request was denied by the external authorization service. + */ + EXTERNAL_SERVICE = 1, +} + +export interface _envoy_data_accesslog_v3_ResponseFlags_Unauthorized { + 'reason'?: (_envoy_data_accesslog_v3_ResponseFlags_Unauthorized_Reason | keyof typeof _envoy_data_accesslog_v3_ResponseFlags_Unauthorized_Reason); +} + +export interface _envoy_data_accesslog_v3_ResponseFlags_Unauthorized__Output { + 'reason': (keyof typeof _envoy_data_accesslog_v3_ResponseFlags_Unauthorized_Reason); +} + +/** + * Flags indicating occurrences during request/response processing. + * [#next-free-field: 28] + */ +export interface ResponseFlags { + /** + * Indicates local server healthcheck failed. + */ + 'failed_local_healthcheck'?: (boolean); + /** + * Indicates there was no healthy upstream. + */ + 'no_healthy_upstream'?: (boolean); + /** + * Indicates an there was an upstream request timeout. + */ + 'upstream_request_timeout'?: (boolean); + /** + * Indicates local codec level reset was sent on the stream. + */ + 'local_reset'?: (boolean); + /** + * Indicates remote codec level reset was received on the stream. + */ + 'upstream_remote_reset'?: (boolean); + /** + * Indicates there was a local reset by a connection pool due to an initial connection failure. + */ + 'upstream_connection_failure'?: (boolean); + /** + * Indicates the stream was reset due to an upstream connection termination. + */ + 'upstream_connection_termination'?: (boolean); + /** + * Indicates the stream was reset because of a resource overflow. + */ + 'upstream_overflow'?: (boolean); + /** + * Indicates no route was found for the request. + */ + 'no_route_found'?: (boolean); + /** + * Indicates that the request was delayed before proxying. + */ + 'delay_injected'?: (boolean); + /** + * Indicates that the request was aborted with an injected error code. + */ + 'fault_injected'?: (boolean); + /** + * Indicates that the request was rate-limited locally. + */ + 'rate_limited'?: (boolean); + /** + * Indicates if the request was deemed unauthorized and the reason for it. + */ + 'unauthorized_details'?: (_envoy_data_accesslog_v3_ResponseFlags_Unauthorized | null); + /** + * Indicates that the request was rejected because there was an error in rate limit service. + */ + 'rate_limit_service_error'?: (boolean); + /** + * Indicates the stream was reset due to a downstream connection termination. + */ + 'downstream_connection_termination'?: (boolean); + /** + * Indicates that the upstream retry limit was exceeded, resulting in a downstream error. + */ + 'upstream_retry_limit_exceeded'?: (boolean); + /** + * Indicates that the stream idle timeout was hit, resulting in a downstream 408. + */ + 'stream_idle_timeout'?: (boolean); + /** + * Indicates that the request was rejected because an envoy request header failed strict + * validation. + */ + 'invalid_envoy_request_headers'?: (boolean); + /** + * Indicates there was an HTTP protocol error on the downstream request. + */ + 'downstream_protocol_error'?: (boolean); + /** + * Indicates there was a max stream duration reached on the upstream request. + */ + 'upstream_max_stream_duration_reached'?: (boolean); + /** + * Indicates the response was served from a cache filter. + */ + 'response_from_cache_filter'?: (boolean); + /** + * Indicates that a filter configuration is not available. + */ + 'no_filter_config_found'?: (boolean); + /** + * Indicates that request or connection exceeded the downstream connection duration. + */ + 'duration_timeout'?: (boolean); + /** + * Indicates there was an HTTP protocol error in the upstream response. + */ + 'upstream_protocol_error'?: (boolean); + /** + * Indicates no cluster was found for the request. + */ + 'no_cluster_found'?: (boolean); + /** + * Indicates overload manager terminated the request. + */ + 'overload_manager'?: (boolean); + /** + * Indicates a DNS resolution failed. + */ + 'dns_resolution_failure'?: (boolean); +} + +/** + * Flags indicating occurrences during request/response processing. + * [#next-free-field: 28] + */ +export interface ResponseFlags__Output { + /** + * Indicates local server healthcheck failed. + */ + 'failed_local_healthcheck': (boolean); + /** + * Indicates there was no healthy upstream. + */ + 'no_healthy_upstream': (boolean); + /** + * Indicates an there was an upstream request timeout. + */ + 'upstream_request_timeout': (boolean); + /** + * Indicates local codec level reset was sent on the stream. + */ + 'local_reset': (boolean); + /** + * Indicates remote codec level reset was received on the stream. + */ + 'upstream_remote_reset': (boolean); + /** + * Indicates there was a local reset by a connection pool due to an initial connection failure. + */ + 'upstream_connection_failure': (boolean); + /** + * Indicates the stream was reset due to an upstream connection termination. + */ + 'upstream_connection_termination': (boolean); + /** + * Indicates the stream was reset because of a resource overflow. + */ + 'upstream_overflow': (boolean); + /** + * Indicates no route was found for the request. + */ + 'no_route_found': (boolean); + /** + * Indicates that the request was delayed before proxying. + */ + 'delay_injected': (boolean); + /** + * Indicates that the request was aborted with an injected error code. + */ + 'fault_injected': (boolean); + /** + * Indicates that the request was rate-limited locally. + */ + 'rate_limited': (boolean); + /** + * Indicates if the request was deemed unauthorized and the reason for it. + */ + 'unauthorized_details': (_envoy_data_accesslog_v3_ResponseFlags_Unauthorized__Output | null); + /** + * Indicates that the request was rejected because there was an error in rate limit service. + */ + 'rate_limit_service_error': (boolean); + /** + * Indicates the stream was reset due to a downstream connection termination. + */ + 'downstream_connection_termination': (boolean); + /** + * Indicates that the upstream retry limit was exceeded, resulting in a downstream error. + */ + 'upstream_retry_limit_exceeded': (boolean); + /** + * Indicates that the stream idle timeout was hit, resulting in a downstream 408. + */ + 'stream_idle_timeout': (boolean); + /** + * Indicates that the request was rejected because an envoy request header failed strict + * validation. + */ + 'invalid_envoy_request_headers': (boolean); + /** + * Indicates there was an HTTP protocol error on the downstream request. + */ + 'downstream_protocol_error': (boolean); + /** + * Indicates there was a max stream duration reached on the upstream request. + */ + 'upstream_max_stream_duration_reached': (boolean); + /** + * Indicates the response was served from a cache filter. + */ + 'response_from_cache_filter': (boolean); + /** + * Indicates that a filter configuration is not available. + */ + 'no_filter_config_found': (boolean); + /** + * Indicates that request or connection exceeded the downstream connection duration. + */ + 'duration_timeout': (boolean); + /** + * Indicates there was an HTTP protocol error in the upstream response. + */ + 'upstream_protocol_error': (boolean); + /** + * Indicates no cluster was found for the request. + */ + 'no_cluster_found': (boolean); + /** + * Indicates overload manager terminated the request. + */ + 'overload_manager': (boolean); + /** + * Indicates a DNS resolution failed. + */ + 'dns_resolution_failure': (boolean); +} diff --git a/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/TCPAccessLogEntry.ts b/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/TCPAccessLogEntry.ts new file mode 100644 index 000000000..55e9cace0 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/TCPAccessLogEntry.ts @@ -0,0 +1,26 @@ +// Original file: deps/envoy-api/envoy/data/accesslog/v3/accesslog.proto + +import type { AccessLogCommon as _envoy_data_accesslog_v3_AccessLogCommon, AccessLogCommon__Output as _envoy_data_accesslog_v3_AccessLogCommon__Output } from '../../../../envoy/data/accesslog/v3/AccessLogCommon'; +import type { ConnectionProperties as _envoy_data_accesslog_v3_ConnectionProperties, ConnectionProperties__Output as _envoy_data_accesslog_v3_ConnectionProperties__Output } from '../../../../envoy/data/accesslog/v3/ConnectionProperties'; + +export interface TCPAccessLogEntry { + /** + * Common properties shared by all Envoy access logs. + */ + 'common_properties'?: (_envoy_data_accesslog_v3_AccessLogCommon | null); + /** + * Properties of the TCP connection. + */ + 'connection_properties'?: (_envoy_data_accesslog_v3_ConnectionProperties | null); +} + +export interface TCPAccessLogEntry__Output { + /** + * Common properties shared by all Envoy access logs. + */ + 'common_properties': (_envoy_data_accesslog_v3_AccessLogCommon__Output | null); + /** + * Properties of the TCP connection. + */ + 'connection_properties': (_envoy_data_accesslog_v3_ConnectionProperties__Output | null); +} diff --git a/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/TLSProperties.ts b/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/TLSProperties.ts new file mode 100644 index 000000000..106d24d09 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/data/accesslog/v3/TLSProperties.ts @@ -0,0 +1,131 @@ +// Original file: deps/envoy-api/envoy/data/accesslog/v3/accesslog.proto + +import type { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../google/protobuf/UInt32Value'; + +export interface _envoy_data_accesslog_v3_TLSProperties_CertificateProperties { + /** + * SANs present in the certificate. + */ + 'subject_alt_name'?: (_envoy_data_accesslog_v3_TLSProperties_CertificateProperties_SubjectAltName)[]; + /** + * The subject field of the certificate. + */ + 'subject'?: (string); +} + +export interface _envoy_data_accesslog_v3_TLSProperties_CertificateProperties__Output { + /** + * SANs present in the certificate. + */ + 'subject_alt_name': (_envoy_data_accesslog_v3_TLSProperties_CertificateProperties_SubjectAltName__Output)[]; + /** + * The subject field of the certificate. + */ + 'subject': (string); +} + +export interface _envoy_data_accesslog_v3_TLSProperties_CertificateProperties_SubjectAltName { + 'uri'?: (string); + /** + * [#not-implemented-hide:] + */ + 'dns'?: (string); + 'san'?: "uri"|"dns"; +} + +export interface _envoy_data_accesslog_v3_TLSProperties_CertificateProperties_SubjectAltName__Output { + 'uri'?: (string); + /** + * [#not-implemented-hide:] + */ + 'dns'?: (string); + 'san': "uri"|"dns"; +} + +// Original file: deps/envoy-api/envoy/data/accesslog/v3/accesslog.proto + +export enum _envoy_data_accesslog_v3_TLSProperties_TLSVersion { + VERSION_UNSPECIFIED = 0, + TLSv1 = 1, + TLSv1_1 = 2, + TLSv1_2 = 3, + TLSv1_3 = 4, +} + +/** + * Properties of a negotiated TLS connection. + * [#next-free-field: 8] + */ +export interface TLSProperties { + /** + * Version of TLS that was negotiated. + */ + 'tls_version'?: (_envoy_data_accesslog_v3_TLSProperties_TLSVersion | keyof typeof _envoy_data_accesslog_v3_TLSProperties_TLSVersion); + /** + * TLS cipher suite negotiated during handshake. The value is a + * four-digit hex code defined by the IANA TLS Cipher Suite Registry + * (e.g. ``009C`` for ``TLS_RSA_WITH_AES_128_GCM_SHA256``). + * + * Here it is expressed as an integer. + */ + 'tls_cipher_suite'?: (_google_protobuf_UInt32Value | null); + /** + * SNI hostname from handshake. + */ + 'tls_sni_hostname'?: (string); + /** + * Properties of the local certificate used to negotiate TLS. + */ + 'local_certificate_properties'?: (_envoy_data_accesslog_v3_TLSProperties_CertificateProperties | null); + /** + * Properties of the peer certificate used to negotiate TLS. + */ + 'peer_certificate_properties'?: (_envoy_data_accesslog_v3_TLSProperties_CertificateProperties | null); + /** + * The TLS session ID. + */ + 'tls_session_id'?: (string); + /** + * The ``JA3`` fingerprint when ``JA3`` fingerprinting is enabled. + */ + 'ja3_fingerprint'?: (string); +} + +/** + * Properties of a negotiated TLS connection. + * [#next-free-field: 8] + */ +export interface TLSProperties__Output { + /** + * Version of TLS that was negotiated. + */ + 'tls_version': (keyof typeof _envoy_data_accesslog_v3_TLSProperties_TLSVersion); + /** + * TLS cipher suite negotiated during handshake. The value is a + * four-digit hex code defined by the IANA TLS Cipher Suite Registry + * (e.g. ``009C`` for ``TLS_RSA_WITH_AES_128_GCM_SHA256``). + * + * Here it is expressed as an integer. + */ + 'tls_cipher_suite': (_google_protobuf_UInt32Value__Output | null); + /** + * SNI hostname from handshake. + */ + 'tls_sni_hostname': (string); + /** + * Properties of the local certificate used to negotiate TLS. + */ + 'local_certificate_properties': (_envoy_data_accesslog_v3_TLSProperties_CertificateProperties__Output | null); + /** + * Properties of the peer certificate used to negotiate TLS. + */ + 'peer_certificate_properties': (_envoy_data_accesslog_v3_TLSProperties_CertificateProperties__Output | null); + /** + * The TLS session ID. + */ + 'tls_session_id': (string); + /** + * The ``JA3`` fingerprint when ``JA3`` fingerprinting is enabled. + */ + 'ja3_fingerprint': (string); +} diff --git a/packages/grpc-js-xds/src/generated/envoy/extensions/filters/http/fault/v3/HTTPFault.ts b/packages/grpc-js-xds/src/generated/envoy/extensions/filters/http/fault/v3/HTTPFault.ts index d78bd9e4a..dd3a3b50c 100644 --- a/packages/grpc-js-xds/src/generated/envoy/extensions/filters/http/fault/v3/HTTPFault.ts +++ b/packages/grpc-js-xds/src/generated/envoy/extensions/filters/http/fault/v3/HTTPFault.ts @@ -5,9 +5,10 @@ import type { FaultAbort as _envoy_extensions_filters_http_fault_v3_FaultAbort, import type { HeaderMatcher as _envoy_config_route_v3_HeaderMatcher, HeaderMatcher__Output as _envoy_config_route_v3_HeaderMatcher__Output } from '../../../../../../envoy/config/route/v3/HeaderMatcher'; import type { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output as _google_protobuf_UInt32Value__Output } from '../../../../../../google/protobuf/UInt32Value'; import type { FaultRateLimit as _envoy_extensions_filters_common_fault_v3_FaultRateLimit, FaultRateLimit__Output as _envoy_extensions_filters_common_fault_v3_FaultRateLimit__Output } from '../../../../../../envoy/extensions/filters/common/fault/v3/FaultRateLimit'; +import type { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../../../../../google/protobuf/Struct'; /** - * [#next-free-field: 16] + * [#next-free-field: 17] */ export interface HTTPFault { /** @@ -17,7 +18,7 @@ export interface HTTPFault { 'delay'?: (_envoy_extensions_filters_common_fault_v3_FaultDelay | null); /** * If specified, the filter will abort requests based on the values in - * the object. At least *abort* or *delay* must be specified. + * the object. At least ``abort`` or ``delay`` must be specified. */ 'abort'?: (_envoy_extensions_filters_http_fault_v3_FaultAbort | null); /** @@ -35,7 +36,7 @@ export interface HTTPFault { * The filter will check the request's headers against all the specified * headers in the filter config. A match will happen if all the headers in the * config are present in the request with the same values (or based on - * presence if the *value* field is not in the config). + * presence if the ``value`` field is not in the config). */ 'headers'?: (_envoy_config_route_v3_HeaderMatcher)[]; /** @@ -52,9 +53,9 @@ export interface HTTPFault { * filter. Note that because this setting can be overridden at the route level, it's possible * for the number of active faults to be greater than this value (if injected via a different * route). If not specified, defaults to unlimited. This setting can be overridden via - * `runtime ` and any faults that are not injected - * due to overflow will be indicated via the `faults_overflow - * ` stat. + * ``runtime `` and any faults that are not injected + * due to overflow will be indicated via the ``faults_overflow + * `` stat. * * .. attention:: * Like other :ref:`circuit breakers ` in Envoy, this is a fuzzy @@ -114,10 +115,18 @@ export interface HTTPFault { * Default value is false. */ 'disable_downstream_cluster_stats'?: (boolean); + /** + * When an abort or delay fault is executed, the metadata struct provided here will be added to the + * request's dynamic metadata under the namespace corresponding to the name of the fault filter. + * This data can be logged as part of Access Logs using the :ref:`command operator + * ` %DYNAMIC_METADATA(NAMESPACE)%, where NAMESPACE is the name of + * the fault filter. + */ + 'filter_metadata'?: (_google_protobuf_Struct | null); } /** - * [#next-free-field: 16] + * [#next-free-field: 17] */ export interface HTTPFault__Output { /** @@ -127,7 +136,7 @@ export interface HTTPFault__Output { 'delay': (_envoy_extensions_filters_common_fault_v3_FaultDelay__Output | null); /** * If specified, the filter will abort requests based on the values in - * the object. At least *abort* or *delay* must be specified. + * the object. At least ``abort`` or ``delay`` must be specified. */ 'abort': (_envoy_extensions_filters_http_fault_v3_FaultAbort__Output | null); /** @@ -145,7 +154,7 @@ export interface HTTPFault__Output { * The filter will check the request's headers against all the specified * headers in the filter config. A match will happen if all the headers in the * config are present in the request with the same values (or based on - * presence if the *value* field is not in the config). + * presence if the ``value`` field is not in the config). */ 'headers': (_envoy_config_route_v3_HeaderMatcher__Output)[]; /** @@ -162,9 +171,9 @@ export interface HTTPFault__Output { * filter. Note that because this setting can be overridden at the route level, it's possible * for the number of active faults to be greater than this value (if injected via a different * route). If not specified, defaults to unlimited. This setting can be overridden via - * `runtime ` and any faults that are not injected - * due to overflow will be indicated via the `faults_overflow - * ` stat. + * ``runtime `` and any faults that are not injected + * due to overflow will be indicated via the ``faults_overflow + * `` stat. * * .. attention:: * Like other :ref:`circuit breakers ` in Envoy, this is a fuzzy @@ -224,4 +233,12 @@ export interface HTTPFault__Output { * Default value is false. */ 'disable_downstream_cluster_stats': (boolean); + /** + * When an abort or delay fault is executed, the metadata struct provided here will be added to the + * request's dynamic metadata under the namespace corresponding to the name of the fault filter. + * This data can be logged as part of Access Logs using the :ref:`command operator + * ` %DYNAMIC_METADATA(NAMESPACE)%, where NAMESPACE is the name of + * the fault filter. + */ + 'filter_metadata': (_google_protobuf_Struct__Output | null); } diff --git a/packages/grpc-js-xds/src/generated/envoy/extensions/filters/network/http_connection_manager/v3/HttpConnectionManager.ts b/packages/grpc-js-xds/src/generated/envoy/extensions/filters/network/http_connection_manager/v3/HttpConnectionManager.ts index fdf7084fe..1b4f36fd8 100644 --- a/packages/grpc-js-xds/src/generated/envoy/extensions/filters/network/http_connection_manager/v3/HttpConnectionManager.ts +++ b/packages/grpc-js-xds/src/generated/envoy/extensions/filters/network/http_connection_manager/v3/HttpConnectionManager.ts @@ -19,6 +19,7 @@ import type { SchemeHeaderTransformation as _envoy_config_core_v3_SchemeHeaderTr import type { Percent as _envoy_type_v3_Percent, Percent__Output as _envoy_type_v3_Percent__Output } from '../../../../../../envoy/type/v3/Percent'; import type { CustomTag as _envoy_type_tracing_v3_CustomTag, CustomTag__Output as _envoy_type_tracing_v3_CustomTag__Output } from '../../../../../../envoy/type/tracing/v3/CustomTag'; import type { _envoy_config_trace_v3_Tracing_Http, _envoy_config_trace_v3_Tracing_Http__Output } from '../../../../../../envoy/config/trace/v3/Tracing'; +import type { CidrRange as _envoy_config_core_v3_CidrRange, CidrRange__Output as _envoy_config_core_v3_CidrRange__Output } from '../../../../../../envoy/config/core/v3/CidrRange'; import type { PathTransformation as _envoy_type_http_v3_PathTransformation, PathTransformation__Output as _envoy_type_http_v3_PathTransformation__Output } from '../../../../../../envoy/type/http/v3/PathTransformation'; // Original file: deps/envoy-api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto @@ -83,11 +84,68 @@ export enum _envoy_extensions_filters_network_http_connection_manager_v3_HttpCon ALWAYS_FORWARD_ONLY = 4, } +export interface _envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_HcmAccessLogOptions { + /** + * The interval to flush the above access logs. By default, the HCM will flush exactly one access log + * on stream close, when the HTTP request is complete. If this field is set, the HCM will flush access + * logs periodically at the specified interval. This is especially useful in the case of long-lived + * requests, such as CONNECT and Websockets. Final access logs can be detected via the + * `requestComplete()` method of `StreamInfo` in access log filters, or thru the `%DURATION%` substitution + * string. + * The interval must be at least 1 millisecond. + */ + 'access_log_flush_interval'?: (_google_protobuf_Duration | null); + /** + * If set to true, HCM will flush an access log when a new HTTP request is received, after request + * headers have been evaluated, before iterating through the HTTP filter chain. + * This log record, if enabled, does not depend on periodic log records or request completion log. + * Details related to upstream cluster, such as upstream host, will not be available for this log. + */ + 'flush_access_log_on_new_request'?: (boolean); + /** + * If true, the HCM will flush an access log when a tunnel is successfully established. For example, + * this could be when an upstream has successfully returned 101 Switching Protocols, or when the proxy + * has returned 200 to a CONNECT request. + */ + 'flush_log_on_tunnel_successfully_established'?: (boolean); +} + +export interface _envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_HcmAccessLogOptions__Output { + /** + * The interval to flush the above access logs. By default, the HCM will flush exactly one access log + * on stream close, when the HTTP request is complete. If this field is set, the HCM will flush access + * logs periodically at the specified interval. This is especially useful in the case of long-lived + * requests, such as CONNECT and Websockets. Final access logs can be detected via the + * `requestComplete()` method of `StreamInfo` in access log filters, or thru the `%DURATION%` substitution + * string. + * The interval must be at least 1 millisecond. + */ + 'access_log_flush_interval': (_google_protobuf_Duration__Output | null); + /** + * If set to true, HCM will flush an access log when a new HTTP request is received, after request + * headers have been evaluated, before iterating through the HTTP filter chain. + * This log record, if enabled, does not depend on periodic log records or request completion log. + * Details related to upstream cluster, such as upstream host, will not be available for this log. + */ + 'flush_access_log_on_new_request': (boolean); + /** + * If true, the HCM will flush an access log when a tunnel is successfully established. For example, + * this could be when an upstream has successfully returned 101 Switching Protocols, or when the proxy + * has returned 200 to a CONNECT request. + */ + 'flush_log_on_tunnel_successfully_established': (boolean); +} + export interface _envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig { /** * Whether unix socket addresses should be considered internal. */ 'unix_sockets'?: (boolean); + /** + * List of CIDR ranges that are treated as internal. If unset, then RFC1918 / RFC4193 + * IP addresses will be considered internal. + */ + 'cidr_ranges'?: (_envoy_config_core_v3_CidrRange)[]; } export interface _envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig__Output { @@ -95,6 +153,11 @@ export interface _envoy_extensions_filters_network_http_connection_manager_v3_Ht * Whether unix socket addresses should be considered internal. */ 'unix_sockets': (boolean); + /** + * List of CIDR ranges that are treated as internal. If unset, then RFC1918 / RFC4193 + * IP addresses will be considered internal. + */ + 'cidr_ranges': (_envoy_config_core_v3_CidrRange__Output)[]; } // Original file: deps/envoy-api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto @@ -116,15 +179,15 @@ export enum _envoy_extensions_filters_network_http_connection_manager_v3_HttpCon * path will be visible internally if a transformation is enabled. Any path rewrites that the * router performs (e.g. :ref:`regex_rewrite * ` or :ref:`prefix_rewrite - * `) will apply to the *:path* header + * `) will apply to the ``:path`` header * destined for the upstream. * - * Note: access logging and tracing will show the original *:path* header. + * Note: access logging and tracing will show the original ``:path`` header. */ export interface _envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_PathNormalizationOptions { /** * [#not-implemented-hide:] Normalization applies internally before any processing of requests by - * HTTP filters, routing, and matching *and* will affect the forwarded *:path* header. Defaults + * HTTP filters, routing, and matching *and* will affect the forwarded ``:path`` header. Defaults * to :ref:`NormalizePathRFC3986 * `. When not * specified, this value may be overridden by the runtime variable @@ -136,7 +199,7 @@ export interface _envoy_extensions_filters_network_http_connection_manager_v3_Ht /** * [#not-implemented-hide:] Normalization only applies internally before any processing of * requests by HTTP filters, routing, and matching. These will be applied after full - * transformation is applied. The *:path* header before this transformation will be restored in + * transformation is applied. The ``:path`` header before this transformation will be restored in * the router filter and sent upstream unless it was mutated by a filter. Defaults to no * transformations. * Multiple actions can be applied in the same Transformation, forming a sequential @@ -153,15 +216,15 @@ export interface _envoy_extensions_filters_network_http_connection_manager_v3_Ht * path will be visible internally if a transformation is enabled. Any path rewrites that the * router performs (e.g. :ref:`regex_rewrite * ` or :ref:`prefix_rewrite - * `) will apply to the *:path* header + * `) will apply to the ``:path`` header * destined for the upstream. * - * Note: access logging and tracing will show the original *:path* header. + * Note: access logging and tracing will show the original ``:path`` header. */ export interface _envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_PathNormalizationOptions__Output { /** * [#not-implemented-hide:] Normalization applies internally before any processing of requests by - * HTTP filters, routing, and matching *and* will affect the forwarded *:path* header. Defaults + * HTTP filters, routing, and matching *and* will affect the forwarded ``:path`` header. Defaults * to :ref:`NormalizePathRFC3986 * `. When not * specified, this value may be overridden by the runtime variable @@ -173,7 +236,7 @@ export interface _envoy_extensions_filters_network_http_connection_manager_v3_Ht /** * [#not-implemented-hide:] Normalization only applies internally before any processing of * requests by HTTP filters, routing, and matching. These will be applied after full - * transformation is applied. The *:path* header before this transformation will be restored in + * transformation is applied. The ``:path`` header before this transformation will be restored in * the router filter and sent upstream unless it was mutated by a filter. Defaults to no * transformations. * Multiple actions can be applied in the same Transformation, forming a sequential @@ -224,6 +287,122 @@ export enum _envoy_extensions_filters_network_http_connection_manager_v3_HttpCon UNESCAPE_AND_FORWARD = 4, } +/** + * Configures the manner in which the Proxy-Status HTTP response header is + * populated. + * + * See the [Proxy-Status + * RFC](https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-proxy-status-08). + * [#comment:TODO: Update this with the non-draft URL when finalized.] + * + * The Proxy-Status header is a string of the form: + * + * "; error=; details=
" + * [#next-free-field: 7] + */ +export interface _envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_ProxyStatusConfig { + /** + * If true, the details field of the Proxy-Status header is not populated with stream_info.response_code_details. + * This value defaults to ``false``, i.e. the ``details`` field is populated by default. + */ + 'remove_details'?: (boolean); + /** + * If true, the details field of the Proxy-Status header will not contain + * connection termination details. This value defaults to ``false``, i.e. the + * ``details`` field will contain connection termination details by default. + */ + 'remove_connection_termination_details'?: (boolean); + /** + * If true, the details field of the Proxy-Status header will not contain an + * enumeration of the Envoy ResponseFlags. This value defaults to ``false``, + * i.e. the ``details`` field will contain a list of ResponseFlags by default. + */ + 'remove_response_flags'?: (boolean); + /** + * If true, overwrites the existing Status header with the response code + * recommended by the Proxy-Status spec. + * This value defaults to ``false``, i.e. the HTTP response code is not + * overwritten. + */ + 'set_recommended_response_code'?: (boolean); + /** + * If ``use_node_id`` is set, Proxy-Status headers will use the Envoy's node + * ID as the name of the proxy. + */ + 'use_node_id'?: (boolean); + /** + * If ``literal_proxy_name`` is set, Proxy-Status headers will use this + * value as the name of the proxy. + */ + 'literal_proxy_name'?: (string); + /** + * The name of the proxy as it appears at the start of the Proxy-Status + * header. + * + * If neither of these values are set, this value defaults to ``server_name``, + * which itself defaults to "envoy". + */ + 'proxy_name'?: "use_node_id"|"literal_proxy_name"; +} + +/** + * Configures the manner in which the Proxy-Status HTTP response header is + * populated. + * + * See the [Proxy-Status + * RFC](https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-proxy-status-08). + * [#comment:TODO: Update this with the non-draft URL when finalized.] + * + * The Proxy-Status header is a string of the form: + * + * "; error=; details=
" + * [#next-free-field: 7] + */ +export interface _envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_ProxyStatusConfig__Output { + /** + * If true, the details field of the Proxy-Status header is not populated with stream_info.response_code_details. + * This value defaults to ``false``, i.e. the ``details`` field is populated by default. + */ + 'remove_details': (boolean); + /** + * If true, the details field of the Proxy-Status header will not contain + * connection termination details. This value defaults to ``false``, i.e. the + * ``details`` field will contain connection termination details by default. + */ + 'remove_connection_termination_details': (boolean); + /** + * If true, the details field of the Proxy-Status header will not contain an + * enumeration of the Envoy ResponseFlags. This value defaults to ``false``, + * i.e. the ``details`` field will contain a list of ResponseFlags by default. + */ + 'remove_response_flags': (boolean); + /** + * If true, overwrites the existing Status header with the response code + * recommended by the Proxy-Status spec. + * This value defaults to ``false``, i.e. the HTTP response code is not + * overwritten. + */ + 'set_recommended_response_code': (boolean); + /** + * If ``use_node_id`` is set, Proxy-Status headers will use the Envoy's node + * ID as the name of the proxy. + */ + 'use_node_id'?: (boolean); + /** + * If ``literal_proxy_name`` is set, Proxy-Status headers will use this + * value as the name of the proxy. + */ + 'literal_proxy_name'?: (string); + /** + * The name of the proxy as it appears at the start of the Proxy-Status + * header. + * + * If neither of these values are set, this value defaults to ``server_name``, + * which itself defaults to "envoy". + */ + 'proxy_name': "use_node_id"|"literal_proxy_name"; +} + // Original file: deps/envoy-api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto export enum _envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_ServerHeaderTransformation { @@ -317,7 +496,7 @@ export interface _envoy_extensions_filters_network_http_connection_manager_v3_Ht * Target percentage of requests managed by this HTTP connection manager that will be force * traced if the :ref:`x-client-trace-id ` * header is set. This field is a direct analog for the runtime variable - * 'tracing.client_sampling' in the :ref:`HTTP Connection Manager + * 'tracing.client_enabled' in the :ref:`HTTP Connection Manager * `. * Default: 100% */ @@ -361,7 +540,7 @@ export interface _envoy_extensions_filters_network_http_connection_manager_v3_Ht * If not specified, no tracing will be performed. * * .. attention:: - * Please be aware that *envoy.tracers.opencensus* provider can only be configured once + * Please be aware that ``envoy.tracers.opencensus`` provider can only be configured once * in Envoy lifetime. * Any attempts to reconfigure it or to use different configurations for different HCM filters * will be rejected. @@ -379,7 +558,7 @@ export interface _envoy_extensions_filters_network_http_connection_manager_v3_Ht * Target percentage of requests managed by this HTTP connection manager that will be force * traced if the :ref:`x-client-trace-id ` * header is set. This field is a direct analog for the runtime variable - * 'tracing.client_sampling' in the :ref:`HTTP Connection Manager + * 'tracing.client_enabled' in the :ref:`HTTP Connection Manager * `. * Default: 100% */ @@ -423,7 +602,7 @@ export interface _envoy_extensions_filters_network_http_connection_manager_v3_Ht * If not specified, no tracing will be performed. * * .. attention:: - * Please be aware that *envoy.tracers.opencensus* provider can only be configured once + * Please be aware that ``envoy.tracers.opencensus`` provider can only be configured once * in Envoy lifetime. * Any attempts to reconfigure it or to use different configurations for different HCM filters * will be rejected. @@ -508,7 +687,7 @@ export interface _envoy_extensions_filters_network_http_connection_manager_v3_Ht } /** - * [#next-free-field: 49] + * [#next-free-field: 57] */ export interface HttpConnectionManager { /** @@ -549,6 +728,10 @@ export interface HttpConnectionManager { 'tracing'?: (_envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing | null); /** * Additional HTTP/1 settings that are passed to the HTTP/1 codec. + * [#comment:TODO: The following fields are ignored when the + * :ref:`header validation configuration ` + * is present: + * 1. :ref:`allow_chunked_length `] */ 'http_protocol_options'?: (_envoy_config_core_v3_Http1ProtocolOptions | null); /** @@ -557,7 +740,7 @@ export interface HttpConnectionManager { 'http2_protocol_options'?: (_envoy_config_core_v3_Http2ProtocolOptions | null); /** * An optional override that the connection manager will write to the server - * header in responses. If not set, the default is *envoy*. + * header in responses. If not set, the default is ``envoy``. */ 'server_name'?: (string); /** @@ -604,8 +787,8 @@ export interface HttpConnectionManager { * ` * is APPEND_FORWARD or SANITIZE_SET and the client connection is mTLS. It specifies the fields in * the client certificate to be forwarded. Note that in the - * :ref:`config_http_conn_man_headers_x-forwarded-client-cert` header, *Hash* is always set, and - * *By* is always set when the client certificate presents the URI type Subject Alternative Name + * :ref:`config_http_conn_man_headers_x-forwarded-client-cert` header, ``Hash`` is always set, and + * ``By`` is always set when the client certificate presents the URI type Subject Alternative Name * value. */ 'set_current_client_cert_details'?: (_envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails | null); @@ -629,7 +812,7 @@ export interface HttpConnectionManager { * :ref:`use_remote_address * ` * is true and represent_ipv4_remote_address_as_ipv4_mapped_ipv6 is true and the remote address is - * an IPv4 address, the address will be mapped to IPv6 before it is appended to *x-forwarded-for*. + * an IPv4 address, the address will be mapped to IPv6 before it is appended to ``x-forwarded-for``. * This is useful for testing compatibility of upstream services that parse the header value. For * example, 50.0.0.1 is represented as ::FFFF:50.0.0.1. See `IPv4-Mapped IPv6 Addresses * `_ for details. This will also affect the @@ -647,7 +830,7 @@ export interface HttpConnectionManager { * has mutated the request headers. While :ref:`use_remote_address * ` * will also suppress XFF addition, it has consequences for logging and other - * Envoy uses of the remote address, so *skip_xff_append* should be used + * Envoy uses of the remote address, so ``skip_xff_append`` should be used * when only an elision of XFF addition is intended. */ 'skip_xff_append'?: (boolean); @@ -754,7 +937,7 @@ export interface HttpConnectionManager { 'max_request_headers_kb'?: (_google_protobuf_UInt32Value | null); /** * Should paths be normalized according to RFC 3986 before any processing of - * requests by HTTP filters or routing? This affects the upstream *:path* header + * requests by HTTP filters or routing? This affects the upstream ``:path`` header * as well. For paths that fail this check, Envoy will respond with 400 to * paths that are malformed. This defaults to false currently but will default * true in the future. When not specified, this value may be overridden by the @@ -764,6 +947,9 @@ export interface HttpConnectionManager { * for details of normalization. * Note that Envoy does not perform * `case normalization `_ + * [#comment:TODO: This field is ignored when the + * :ref:`header validation configuration ` + * is present.] */ 'normalize_path'?: (_google_protobuf_BoolValue | null); /** @@ -781,10 +967,13 @@ export interface HttpConnectionManager { 'preserve_external_request_id'?: (boolean); /** * Determines if adjacent slashes in the path are merged into one before any processing of - * requests by HTTP filters or routing. This affects the upstream *:path* header as well. Without - * setting this option, incoming requests with path `//dir///file` will not match against route - * with `prefix` match set to `/dir`. Defaults to `false`. Note that slash merging is not part of + * requests by HTTP filters or routing. This affects the upstream ``:path`` header as well. Without + * setting this option, incoming requests with path ``//dir///file`` will not match against route + * with ``prefix`` match set to ``/dir``. Defaults to ``false``. Note that slash merging is not part of * `HTTP spec `_ and is provided for convenience. + * [#comment:TODO: This field is ignored when the + * :ref:`header validation configuration ` + * is present.] */ 'merge_slashes'?: (boolean); /** @@ -835,10 +1024,10 @@ export interface HttpConnectionManager { * local port. This affects the upstream host header unless the method is * CONNECT in which case if no filter adds a port the original port will be restored before headers are * sent upstream. - * Without setting this option, incoming requests with host `example:443` will not match against - * route with :ref:`domains` match set to `example`. Defaults to `false`. Note that port removal is not part + * Without setting this option, incoming requests with host ``example:443`` will not match against + * route with :ref:`domains` match set to ``example``. Defaults to ``false``. Note that port removal is not part * of `HTTP spec `_ and is provided for convenience. - * Only one of `strip_matching_host_port` or `strip_any_host_port` can be set. + * Only one of ``strip_matching_host_port`` or ``strip_any_host_port`` can be set. */ 'strip_matching_host_port'?: (boolean); /** @@ -856,7 +1045,7 @@ export interface HttpConnectionManager { * ` or the new HTTP/2 option * :ref:`override_stream_error_on_invalid_http_message * ` - * *not* the deprecated but similarly named :ref:`stream_error_on_invalid_http_messaging + * ``not`` the deprecated but similarly named :ref:`stream_error_on_invalid_http_messaging * ` */ 'stream_error_on_invalid_http_message'?: (_google_protobuf_BoolValue | null); @@ -871,17 +1060,17 @@ export interface HttpConnectionManager { * of request by HTTP filters or routing. * This affects the upstream host header unless the method is CONNECT in * which case if no filter adds a port the original port will be restored before headers are sent upstream. - * Without setting this option, incoming requests with host `example:443` will not match against - * route with :ref:`domains` match set to `example`. Defaults to `false`. Note that port removal is not part + * Without setting this option, incoming requests with host ``example:443`` will not match against + * route with :ref:`domains` match set to ``example``. Defaults to ``false``. Note that port removal is not part * of `HTTP spec `_ and is provided for convenience. - * Only one of `strip_matching_host_port` or `strip_any_host_port` can be set. + * Only one of ``strip_matching_host_port`` or ``strip_any_host_port`` can be set. */ 'strip_any_host_port'?: (boolean); /** * [#not-implemented-hide:] Path normalization configuration. This includes * configurations for transformations (e.g. RFC 3986 normalization or merge * adjacent slashes) and the policy to apply them. The policy determines - * whether transformations affect the forwarded *:path* header. RFC 3986 path + * whether transformations affect the forwarded ``:path`` header. RFC 3986 path * normalization is enabled by default and the default policy is that the * normalized header will be forwarded. See :ref:`PathNormalizationOptions * ` @@ -899,6 +1088,9 @@ export interface HttpConnectionManager { * runtime variable. * The :ref:`http_connection_manager.path_with_escaped_slashes_action_sampling` runtime * variable can be used to apply the action to a portion of all requests. + * [#comment:TODO: This field is ignored when the + * :ref:`header validation configuration ` + * is present.] */ 'path_with_escaped_slashes_action'?: (_envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_PathWithEscapedSlashesAction | keyof typeof _envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_PathWithEscapedSlashesAction); /** @@ -925,11 +1117,11 @@ export interface HttpConnectionManager { * Determines if trailing dot of the host should be removed from host/authority header before any * processing of request by HTTP filters or routing. * This affects the upstream host header. - * Without setting this option, incoming requests with host `example.com.` will not match against - * route with :ref:`domains` match set to `example.com`. Defaults to `false`. + * Without setting this option, incoming requests with host ``example.com.`` will not match against + * route with :ref:`domains` match set to ``example.com``. Defaults to ``false``. * When the incoming request contains a host/authority header that includes a port number, * setting this option will strip a trailing dot, if present, from the host section, - * leaving the port as is (e.g. host value `example.com.:443` will be updated to `example.com:443`). + * leaving the port as is (e.g. host value ``example.com.:443`` will be updated to ``example.com:443``). */ 'strip_trailing_host_dot'?: (boolean); /** @@ -938,12 +1130,88 @@ export interface HttpConnectionManager { * handling applies. */ 'scheme_header_transformation'?: (_envoy_config_core_v3_SchemeHeaderTransformation | null); + /** + * Proxy-Status HTTP response header configuration. + * If this config is set, the Proxy-Status HTTP response header field is + * populated. By default, it is not. + */ + 'proxy_status_config'?: (_envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_ProxyStatusConfig | null); + /** + * Configuration options for Header Validation (UHV). + * UHV is an extensible mechanism for checking validity of HTTP requests as well as providing + * normalization for request attributes, such as URI path. + * If the typed_header_validation_config is present it overrides the following options: + * ``normalize_path``, ``merge_slashes``, ``path_with_escaped_slashes_action`` + * ``http_protocol_options.allow_chunked_length``, ``common_http_protocol_options.headers_with_underscores_action``. + * + * The default UHV checks the following: + * + * #. HTTP/1 header map validity according to `RFC 7230 section 3.2`_ + * #. Syntax of HTTP/1 request target URI and response status + * #. HTTP/2 header map validity according to `RFC 7540 section 8.1.2`_ + * #. Syntax of HTTP/3 pseudo headers + * #. Syntax of ``Content-Length`` and ``Transfer-Encoding`` + * #. Validation of HTTP/1 requests with both ``Content-Length`` and ``Transfer-Encoding`` headers + * #. Normalization of the URI path according to `Normalization and Comparison `_ + * without `case normalization `_ + * + * [#not-implemented-hide:] + * [#extension-category: envoy.http.header_validators] + */ + 'typed_header_validation_config'?: (_envoy_config_core_v3_TypedExtensionConfig | null); + /** + * Append the `x-forwarded-port` header with the port value client used to connect to Envoy. It + * will be ignored if the `x-forwarded-port` header has been set by any trusted proxy in front of Envoy. + */ + 'append_x_forwarded_port'?: (boolean); + /** + * The configuration for the early header mutation extensions. + * + * When configured the extensions will be called before any routing, tracing, or any filter processing. + * Each extension will be applied in the order they are configured. + * If the same header is mutated by multiple extensions, then the last extension will win. + * + * [#extension-category: envoy.http.early_header_mutation] + */ + 'early_header_mutation_extensions'?: (_envoy_config_core_v3_TypedExtensionConfig)[]; + /** + * Whether the HCM will add ProxyProtocolFilterState to the Connection lifetime filter state. Defaults to `true`. + * This should be set to `false` in cases where Envoy's view of the downstream address may not correspond to the + * actual client address, for example, if there's another proxy in front of the Envoy. + */ + 'add_proxy_protocol_connection_state'?: (_google_protobuf_BoolValue | null); + /** + * .. attention:: + * This field is deprecated in favor of + * :ref:`access_log_flush_interval + * `. + * Note that if both this field and :ref:`access_log_flush_interval + * ` + * are specified, the former (deprecated field) is ignored. + */ + 'access_log_flush_interval'?: (_google_protobuf_Duration | null); + /** + * .. attention:: + * This field is deprecated in favor of + * :ref:`flush_access_log_on_new_request + * `. + * Note that if both this field and :ref:`flush_access_log_on_new_request + * ` + * are specified, the former (deprecated field) is ignored. + */ + 'flush_access_log_on_new_request'?: (boolean); + /** + * Additional access log options for HTTP connection manager. + */ + 'access_log_options'?: (_envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_HcmAccessLogOptions | null); 'route_specifier'?: "rds"|"route_config"|"scoped_routes"; 'strip_port_mode'?: "strip_any_host_port"; } /** - * [#next-free-field: 49] + * [#next-free-field: 57] */ export interface HttpConnectionManager__Output { /** @@ -984,6 +1252,10 @@ export interface HttpConnectionManager__Output { 'tracing': (_envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing__Output | null); /** * Additional HTTP/1 settings that are passed to the HTTP/1 codec. + * [#comment:TODO: The following fields are ignored when the + * :ref:`header validation configuration ` + * is present: + * 1. :ref:`allow_chunked_length `] */ 'http_protocol_options': (_envoy_config_core_v3_Http1ProtocolOptions__Output | null); /** @@ -992,7 +1264,7 @@ export interface HttpConnectionManager__Output { 'http2_protocol_options': (_envoy_config_core_v3_Http2ProtocolOptions__Output | null); /** * An optional override that the connection manager will write to the server - * header in responses. If not set, the default is *envoy*. + * header in responses. If not set, the default is ``envoy``. */ 'server_name': (string); /** @@ -1039,8 +1311,8 @@ export interface HttpConnectionManager__Output { * ` * is APPEND_FORWARD or SANITIZE_SET and the client connection is mTLS. It specifies the fields in * the client certificate to be forwarded. Note that in the - * :ref:`config_http_conn_man_headers_x-forwarded-client-cert` header, *Hash* is always set, and - * *By* is always set when the client certificate presents the URI type Subject Alternative Name + * :ref:`config_http_conn_man_headers_x-forwarded-client-cert` header, ``Hash`` is always set, and + * ``By`` is always set when the client certificate presents the URI type Subject Alternative Name * value. */ 'set_current_client_cert_details': (_envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails__Output | null); @@ -1064,7 +1336,7 @@ export interface HttpConnectionManager__Output { * :ref:`use_remote_address * ` * is true and represent_ipv4_remote_address_as_ipv4_mapped_ipv6 is true and the remote address is - * an IPv4 address, the address will be mapped to IPv6 before it is appended to *x-forwarded-for*. + * an IPv4 address, the address will be mapped to IPv6 before it is appended to ``x-forwarded-for``. * This is useful for testing compatibility of upstream services that parse the header value. For * example, 50.0.0.1 is represented as ::FFFF:50.0.0.1. See `IPv4-Mapped IPv6 Addresses * `_ for details. This will also affect the @@ -1082,7 +1354,7 @@ export interface HttpConnectionManager__Output { * has mutated the request headers. While :ref:`use_remote_address * ` * will also suppress XFF addition, it has consequences for logging and other - * Envoy uses of the remote address, so *skip_xff_append* should be used + * Envoy uses of the remote address, so ``skip_xff_append`` should be used * when only an elision of XFF addition is intended. */ 'skip_xff_append': (boolean); @@ -1189,7 +1461,7 @@ export interface HttpConnectionManager__Output { 'max_request_headers_kb': (_google_protobuf_UInt32Value__Output | null); /** * Should paths be normalized according to RFC 3986 before any processing of - * requests by HTTP filters or routing? This affects the upstream *:path* header + * requests by HTTP filters or routing? This affects the upstream ``:path`` header * as well. For paths that fail this check, Envoy will respond with 400 to * paths that are malformed. This defaults to false currently but will default * true in the future. When not specified, this value may be overridden by the @@ -1199,6 +1471,9 @@ export interface HttpConnectionManager__Output { * for details of normalization. * Note that Envoy does not perform * `case normalization `_ + * [#comment:TODO: This field is ignored when the + * :ref:`header validation configuration ` + * is present.] */ 'normalize_path': (_google_protobuf_BoolValue__Output | null); /** @@ -1216,10 +1491,13 @@ export interface HttpConnectionManager__Output { 'preserve_external_request_id': (boolean); /** * Determines if adjacent slashes in the path are merged into one before any processing of - * requests by HTTP filters or routing. This affects the upstream *:path* header as well. Without - * setting this option, incoming requests with path `//dir///file` will not match against route - * with `prefix` match set to `/dir`. Defaults to `false`. Note that slash merging is not part of + * requests by HTTP filters or routing. This affects the upstream ``:path`` header as well. Without + * setting this option, incoming requests with path ``//dir///file`` will not match against route + * with ``prefix`` match set to ``/dir``. Defaults to ``false``. Note that slash merging is not part of * `HTTP spec `_ and is provided for convenience. + * [#comment:TODO: This field is ignored when the + * :ref:`header validation configuration ` + * is present.] */ 'merge_slashes': (boolean); /** @@ -1270,10 +1548,10 @@ export interface HttpConnectionManager__Output { * local port. This affects the upstream host header unless the method is * CONNECT in which case if no filter adds a port the original port will be restored before headers are * sent upstream. - * Without setting this option, incoming requests with host `example:443` will not match against - * route with :ref:`domains` match set to `example`. Defaults to `false`. Note that port removal is not part + * Without setting this option, incoming requests with host ``example:443`` will not match against + * route with :ref:`domains` match set to ``example``. Defaults to ``false``. Note that port removal is not part * of `HTTP spec `_ and is provided for convenience. - * Only one of `strip_matching_host_port` or `strip_any_host_port` can be set. + * Only one of ``strip_matching_host_port`` or ``strip_any_host_port`` can be set. */ 'strip_matching_host_port': (boolean); /** @@ -1291,7 +1569,7 @@ export interface HttpConnectionManager__Output { * ` or the new HTTP/2 option * :ref:`override_stream_error_on_invalid_http_message * ` - * *not* the deprecated but similarly named :ref:`stream_error_on_invalid_http_messaging + * ``not`` the deprecated but similarly named :ref:`stream_error_on_invalid_http_messaging * ` */ 'stream_error_on_invalid_http_message': (_google_protobuf_BoolValue__Output | null); @@ -1306,17 +1584,17 @@ export interface HttpConnectionManager__Output { * of request by HTTP filters or routing. * This affects the upstream host header unless the method is CONNECT in * which case if no filter adds a port the original port will be restored before headers are sent upstream. - * Without setting this option, incoming requests with host `example:443` will not match against - * route with :ref:`domains` match set to `example`. Defaults to `false`. Note that port removal is not part + * Without setting this option, incoming requests with host ``example:443`` will not match against + * route with :ref:`domains` match set to ``example``. Defaults to ``false``. Note that port removal is not part * of `HTTP spec `_ and is provided for convenience. - * Only one of `strip_matching_host_port` or `strip_any_host_port` can be set. + * Only one of ``strip_matching_host_port`` or ``strip_any_host_port`` can be set. */ 'strip_any_host_port'?: (boolean); /** * [#not-implemented-hide:] Path normalization configuration. This includes * configurations for transformations (e.g. RFC 3986 normalization or merge * adjacent slashes) and the policy to apply them. The policy determines - * whether transformations affect the forwarded *:path* header. RFC 3986 path + * whether transformations affect the forwarded ``:path`` header. RFC 3986 path * normalization is enabled by default and the default policy is that the * normalized header will be forwarded. See :ref:`PathNormalizationOptions * ` @@ -1334,6 +1612,9 @@ export interface HttpConnectionManager__Output { * runtime variable. * The :ref:`http_connection_manager.path_with_escaped_slashes_action_sampling` runtime * variable can be used to apply the action to a portion of all requests. + * [#comment:TODO: This field is ignored when the + * :ref:`header validation configuration ` + * is present.] */ 'path_with_escaped_slashes_action': (keyof typeof _envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_PathWithEscapedSlashesAction); /** @@ -1360,11 +1641,11 @@ export interface HttpConnectionManager__Output { * Determines if trailing dot of the host should be removed from host/authority header before any * processing of request by HTTP filters or routing. * This affects the upstream host header. - * Without setting this option, incoming requests with host `example.com.` will not match against - * route with :ref:`domains` match set to `example.com`. Defaults to `false`. + * Without setting this option, incoming requests with host ``example.com.`` will not match against + * route with :ref:`domains` match set to ``example.com``. Defaults to ``false``. * When the incoming request contains a host/authority header that includes a port number, * setting this option will strip a trailing dot, if present, from the host section, - * leaving the port as is (e.g. host value `example.com.:443` will be updated to `example.com:443`). + * leaving the port as is (e.g. host value ``example.com.:443`` will be updated to ``example.com:443``). */ 'strip_trailing_host_dot': (boolean); /** @@ -1373,6 +1654,82 @@ export interface HttpConnectionManager__Output { * handling applies. */ 'scheme_header_transformation': (_envoy_config_core_v3_SchemeHeaderTransformation__Output | null); + /** + * Proxy-Status HTTP response header configuration. + * If this config is set, the Proxy-Status HTTP response header field is + * populated. By default, it is not. + */ + 'proxy_status_config': (_envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_ProxyStatusConfig__Output | null); + /** + * Configuration options for Header Validation (UHV). + * UHV is an extensible mechanism for checking validity of HTTP requests as well as providing + * normalization for request attributes, such as URI path. + * If the typed_header_validation_config is present it overrides the following options: + * ``normalize_path``, ``merge_slashes``, ``path_with_escaped_slashes_action`` + * ``http_protocol_options.allow_chunked_length``, ``common_http_protocol_options.headers_with_underscores_action``. + * + * The default UHV checks the following: + * + * #. HTTP/1 header map validity according to `RFC 7230 section 3.2`_ + * #. Syntax of HTTP/1 request target URI and response status + * #. HTTP/2 header map validity according to `RFC 7540 section 8.1.2`_ + * #. Syntax of HTTP/3 pseudo headers + * #. Syntax of ``Content-Length`` and ``Transfer-Encoding`` + * #. Validation of HTTP/1 requests with both ``Content-Length`` and ``Transfer-Encoding`` headers + * #. Normalization of the URI path according to `Normalization and Comparison `_ + * without `case normalization `_ + * + * [#not-implemented-hide:] + * [#extension-category: envoy.http.header_validators] + */ + 'typed_header_validation_config': (_envoy_config_core_v3_TypedExtensionConfig__Output | null); + /** + * Append the `x-forwarded-port` header with the port value client used to connect to Envoy. It + * will be ignored if the `x-forwarded-port` header has been set by any trusted proxy in front of Envoy. + */ + 'append_x_forwarded_port': (boolean); + /** + * The configuration for the early header mutation extensions. + * + * When configured the extensions will be called before any routing, tracing, or any filter processing. + * Each extension will be applied in the order they are configured. + * If the same header is mutated by multiple extensions, then the last extension will win. + * + * [#extension-category: envoy.http.early_header_mutation] + */ + 'early_header_mutation_extensions': (_envoy_config_core_v3_TypedExtensionConfig__Output)[]; + /** + * Whether the HCM will add ProxyProtocolFilterState to the Connection lifetime filter state. Defaults to `true`. + * This should be set to `false` in cases where Envoy's view of the downstream address may not correspond to the + * actual client address, for example, if there's another proxy in front of the Envoy. + */ + 'add_proxy_protocol_connection_state': (_google_protobuf_BoolValue__Output | null); + /** + * .. attention:: + * This field is deprecated in favor of + * :ref:`access_log_flush_interval + * `. + * Note that if both this field and :ref:`access_log_flush_interval + * ` + * are specified, the former (deprecated field) is ignored. + */ + 'access_log_flush_interval': (_google_protobuf_Duration__Output | null); + /** + * .. attention:: + * This field is deprecated in favor of + * :ref:`flush_access_log_on_new_request + * `. + * Note that if both this field and :ref:`flush_access_log_on_new_request + * ` + * are specified, the former (deprecated field) is ignored. + */ + 'flush_access_log_on_new_request': (boolean); + /** + * Additional access log options for HTTP connection manager. + */ + 'access_log_options': (_envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_HcmAccessLogOptions__Output | null); 'route_specifier': "rds"|"route_config"|"scoped_routes"; 'strip_port_mode': "strip_any_host_port"; } diff --git a/packages/grpc-js-xds/src/generated/envoy/extensions/filters/network/http_connection_manager/v3/HttpFilter.ts b/packages/grpc-js-xds/src/generated/envoy/extensions/filters/network/http_connection_manager/v3/HttpFilter.ts index d1c1cbc06..1550ca237 100644 --- a/packages/grpc-js-xds/src/generated/envoy/extensions/filters/network/http_connection_manager/v3/HttpFilter.ts +++ b/packages/grpc-js-xds/src/generated/envoy/extensions/filters/network/http_connection_manager/v3/HttpFilter.ts @@ -8,9 +8,7 @@ import type { ExtensionConfigSource as _envoy_config_core_v3_ExtensionConfigSour */ export interface HttpFilter { /** - * The name of the filter configuration. The name is used as a fallback to - * select an extension if the type of the configuration proto is not - * sufficient. It also serves as a resource name in ExtensionConfigDS. + * The name of the filter configuration. It also serves as a resource name in ExtensionConfigDS. */ 'name'?: (string); /** @@ -38,7 +36,6 @@ export interface HttpFilter { * If true, clients that do not support this filter may ignore the * filter but otherwise accept the config. * Otherwise, clients that do not support this filter must reject the config. - * This is also same with typed per filter config. */ 'is_optional'?: (boolean); 'config_type'?: "typed_config"|"config_discovery"; @@ -49,9 +46,7 @@ export interface HttpFilter { */ export interface HttpFilter__Output { /** - * The name of the filter configuration. The name is used as a fallback to - * select an extension if the type of the configuration proto is not - * sufficient. It also serves as a resource name in ExtensionConfigDS. + * The name of the filter configuration. It also serves as a resource name in ExtensionConfigDS. */ 'name': (string); /** @@ -79,7 +74,6 @@ export interface HttpFilter__Output { * If true, clients that do not support this filter may ignore the * filter but otherwise accept the config. * Otherwise, clients that do not support this filter must reject the config. - * This is also same with typed per filter config. */ 'is_optional': (boolean); 'config_type': "typed_config"|"config_discovery"; diff --git a/packages/grpc-js-xds/src/generated/envoy/extensions/filters/network/http_connection_manager/v3/ResponseMapper.ts b/packages/grpc-js-xds/src/generated/envoy/extensions/filters/network/http_connection_manager/v3/ResponseMapper.ts index 26d14a07d..66533b411 100644 --- a/packages/grpc-js-xds/src/generated/envoy/extensions/filters/network/http_connection_manager/v3/ResponseMapper.ts +++ b/packages/grpc-js-xds/src/generated/envoy/extensions/filters/network/http_connection_manager/v3/ResponseMapper.ts @@ -20,12 +20,12 @@ export interface ResponseMapper { */ 'status_code'?: (_google_protobuf_UInt32Value | null); /** - * The new local reply body text if specified. It will be used in the `%LOCAL_REPLY_BODY%` - * command operator in the `body_format`. + * The new local reply body text if specified. It will be used in the ``%LOCAL_REPLY_BODY%`` + * command operator in the ``body_format``. */ 'body'?: (_envoy_config_core_v3_DataSource | null); /** - * A per mapper `body_format` to override the :ref:`body_format `. + * A per mapper ``body_format`` to override the :ref:`body_format `. * It will be used when this mapper is matched. */ 'body_format_override'?: (_envoy_config_core_v3_SubstitutionFormatString | null); @@ -50,12 +50,12 @@ export interface ResponseMapper__Output { */ 'status_code': (_google_protobuf_UInt32Value__Output | null); /** - * The new local reply body text if specified. It will be used in the `%LOCAL_REPLY_BODY%` - * command operator in the `body_format`. + * The new local reply body text if specified. It will be used in the ``%LOCAL_REPLY_BODY%`` + * command operator in the ``body_format``. */ 'body': (_envoy_config_core_v3_DataSource__Output | null); /** - * A per mapper `body_format` to override the :ref:`body_format `. + * A per mapper ``body_format`` to override the :ref:`body_format `. * It will be used when this mapper is matched. */ 'body_format_override': (_envoy_config_core_v3_SubstitutionFormatString__Output | null); diff --git a/packages/grpc-js-xds/src/generated/envoy/extensions/load_balancing_policies/wrr_locality/v3/WrrLocality.ts b/packages/grpc-js-xds/src/generated/envoy/extensions/load_balancing_policies/wrr_locality/v3/WrrLocality.ts new file mode 100644 index 000000000..d35fb06e5 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/extensions/load_balancing_policies/wrr_locality/v3/WrrLocality.ts @@ -0,0 +1,25 @@ +// Original file: deps/envoy-api/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto + +import type { LoadBalancingPolicy as _envoy_config_cluster_v3_LoadBalancingPolicy, LoadBalancingPolicy__Output as _envoy_config_cluster_v3_LoadBalancingPolicy__Output } from '../../../../../envoy/config/cluster/v3/LoadBalancingPolicy'; + +/** + * Configuration for the wrr_locality LB policy. See the :ref:`load balancing architecture overview + * ` for more information. + */ +export interface WrrLocality { + /** + * The child LB policy to create for endpoint-picking within the chosen locality. + */ + 'endpoint_picking_policy'?: (_envoy_config_cluster_v3_LoadBalancingPolicy | null); +} + +/** + * Configuration for the wrr_locality LB policy. See the :ref:`load balancing architecture overview + * ` for more information. + */ +export interface WrrLocality__Output { + /** + * The child LB policy to create for endpoint-picking within the chosen locality. + */ + 'endpoint_picking_policy': (_envoy_config_cluster_v3_LoadBalancingPolicy__Output | null); +} diff --git a/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/AggregatedDiscoveryService.ts b/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/AggregatedDiscoveryService.ts index e6498177b..e8d7df1f2 100644 --- a/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/AggregatedDiscoveryService.ts +++ b/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/AggregatedDiscoveryService.ts @@ -8,7 +8,7 @@ import type { DiscoveryRequest as _envoy_service_discovery_v3_DiscoveryRequest, import type { DiscoveryResponse as _envoy_service_discovery_v3_DiscoveryResponse, DiscoveryResponse__Output as _envoy_service_discovery_v3_DiscoveryResponse__Output } from '../../../../envoy/service/discovery/v3/DiscoveryResponse'; /** - * See https://github.com/lyft/envoy-api#apis for a description of the role of + * See https://github.com/envoyproxy/envoy-api#apis for a description of the role of * ADS and how it is intended to be used by a management server. ADS requests * have the same structure as their singleton xDS counterparts, but can * multiplex many resource types on a single stream. The type_url in the @@ -35,7 +35,7 @@ export interface AggregatedDiscoveryServiceClient extends grpc.Client { } /** - * See https://github.com/lyft/envoy-api#apis for a description of the role of + * See https://github.com/envoyproxy/envoy-api#apis for a description of the role of * ADS and how it is intended to be used by a management server. ADS requests * have the same structure as their singleton xDS counterparts, but can * multiplex many resource types on a single stream. The type_url in the diff --git a/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/DeltaDiscoveryRequest.ts b/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/DeltaDiscoveryRequest.ts index 6e900970a..6c1a3cd95 100644 --- a/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/DeltaDiscoveryRequest.ts +++ b/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/DeltaDiscoveryRequest.ts @@ -2,6 +2,7 @@ import type { Node as _envoy_config_core_v3_Node, Node__Output as _envoy_config_core_v3_Node__Output } from '../../../../envoy/config/core/v3/Node'; import type { Status as _google_rpc_Status, Status__Output as _google_rpc_Status__Output } from '../../../../google/rpc/Status'; +import type { ResourceLocator as _envoy_service_discovery_v3_ResourceLocator, ResourceLocator__Output as _envoy_service_discovery_v3_ResourceLocator__Output } from '../../../../envoy/service/discovery/v3/ResourceLocator'; /** * DeltaDiscoveryRequest and DeltaDiscoveryResponse are used in a new gRPC @@ -36,7 +37,7 @@ import type { Status as _google_rpc_Status, Status__Output as _google_rpc_Status * In particular, initial_resource_versions being sent at the "start" of every * gRPC stream actually entails a message for each type_url, each with its own * initial_resource_versions. - * [#next-free-field: 8] + * [#next-free-field: 10] */ export interface DeltaDiscoveryRequest { /** @@ -45,9 +46,9 @@ export interface DeltaDiscoveryRequest { 'node'?: (_envoy_config_core_v3_Node | null); /** * Type of the resource that is being requested, e.g. - * "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment". This does not need to be set if - * resources are only referenced via *xds_resource_subscribe* and - * *xds_resources_unsubscribe*. + * ``type.googleapis.com/envoy.api.v2.ClusterLoadAssignment``. This does not need to be set if + * resources are only referenced via ``xds_resource_subscribe`` and + * ``xds_resources_unsubscribe``. */ 'type_url'?: (string); /** @@ -98,10 +99,26 @@ export interface DeltaDiscoveryRequest { 'response_nonce'?: (string); /** * This is populated when the previous :ref:`DiscoveryResponse ` - * failed to update configuration. The *message* field in *error_details* + * failed to update configuration. The ``message`` field in ``error_details`` * provides the Envoy internal exception related to the failure. */ 'error_detail'?: (_google_rpc_Status | null); + /** + * [#not-implemented-hide:] + * Alternative to ``resource_names_subscribe`` field that allows specifying dynamic parameters + * along with each resource name. + * Note that it is legal for a request to have some resources listed + * in ``resource_names_subscribe`` and others in ``resource_locators_subscribe``. + */ + 'resource_locators_subscribe'?: (_envoy_service_discovery_v3_ResourceLocator)[]; + /** + * [#not-implemented-hide:] + * Alternative to ``resource_names_unsubscribe`` field that allows specifying dynamic parameters + * along with each resource name. + * Note that it is legal for a request to have some resources listed + * in ``resource_names_unsubscribe`` and others in ``resource_locators_unsubscribe``. + */ + 'resource_locators_unsubscribe'?: (_envoy_service_discovery_v3_ResourceLocator)[]; } /** @@ -137,7 +154,7 @@ export interface DeltaDiscoveryRequest { * In particular, initial_resource_versions being sent at the "start" of every * gRPC stream actually entails a message for each type_url, each with its own * initial_resource_versions. - * [#next-free-field: 8] + * [#next-free-field: 10] */ export interface DeltaDiscoveryRequest__Output { /** @@ -146,9 +163,9 @@ export interface DeltaDiscoveryRequest__Output { 'node': (_envoy_config_core_v3_Node__Output | null); /** * Type of the resource that is being requested, e.g. - * "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment". This does not need to be set if - * resources are only referenced via *xds_resource_subscribe* and - * *xds_resources_unsubscribe*. + * ``type.googleapis.com/envoy.api.v2.ClusterLoadAssignment``. This does not need to be set if + * resources are only referenced via ``xds_resource_subscribe`` and + * ``xds_resources_unsubscribe``. */ 'type_url': (string); /** @@ -199,8 +216,24 @@ export interface DeltaDiscoveryRequest__Output { 'response_nonce': (string); /** * This is populated when the previous :ref:`DiscoveryResponse ` - * failed to update configuration. The *message* field in *error_details* + * failed to update configuration. The ``message`` field in ``error_details`` * provides the Envoy internal exception related to the failure. */ 'error_detail': (_google_rpc_Status__Output | null); + /** + * [#not-implemented-hide:] + * Alternative to ``resource_names_subscribe`` field that allows specifying dynamic parameters + * along with each resource name. + * Note that it is legal for a request to have some resources listed + * in ``resource_names_subscribe`` and others in ``resource_locators_subscribe``. + */ + 'resource_locators_subscribe': (_envoy_service_discovery_v3_ResourceLocator__Output)[]; + /** + * [#not-implemented-hide:] + * Alternative to ``resource_names_unsubscribe`` field that allows specifying dynamic parameters + * along with each resource name. + * Note that it is legal for a request to have some resources listed + * in ``resource_names_unsubscribe`` and others in ``resource_locators_unsubscribe``. + */ + 'resource_locators_unsubscribe': (_envoy_service_discovery_v3_ResourceLocator__Output)[]; } diff --git a/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/DeltaDiscoveryResponse.ts b/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/DeltaDiscoveryResponse.ts index efbbed85c..0728140ee 100644 --- a/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/DeltaDiscoveryResponse.ts +++ b/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/DeltaDiscoveryResponse.ts @@ -2,9 +2,10 @@ import type { Resource as _envoy_service_discovery_v3_Resource, Resource__Output as _envoy_service_discovery_v3_Resource__Output } from '../../../../envoy/service/discovery/v3/Resource'; import type { ControlPlane as _envoy_config_core_v3_ControlPlane, ControlPlane__Output as _envoy_config_core_v3_ControlPlane__Output } from '../../../../envoy/config/core/v3/ControlPlane'; +import type { ResourceName as _envoy_service_discovery_v3_ResourceName, ResourceName__Output as _envoy_service_discovery_v3_ResourceName__Output } from '../../../../envoy/service/discovery/v3/ResourceName'; /** - * [#next-free-field: 8] + * [#next-free-field: 9] */ export interface DeltaDiscoveryResponse { /** @@ -36,10 +37,16 @@ export interface DeltaDiscoveryResponse { * The control plane instance that sent the response. */ 'control_plane'?: (_envoy_config_core_v3_ControlPlane | null); + /** + * Alternative to removed_resources that allows specifying which variant of + * a resource is being removed. This variant must be used for any resource + * for which dynamic parameter constraints were sent to the client. + */ + 'removed_resource_names'?: (_envoy_service_discovery_v3_ResourceName)[]; } /** - * [#next-free-field: 8] + * [#next-free-field: 9] */ export interface DeltaDiscoveryResponse__Output { /** @@ -71,4 +78,10 @@ export interface DeltaDiscoveryResponse__Output { * The control plane instance that sent the response. */ 'control_plane': (_envoy_config_core_v3_ControlPlane__Output | null); + /** + * Alternative to removed_resources that allows specifying which variant of + * a resource is being removed. This variant must be used for any resource + * for which dynamic parameter constraints were sent to the client. + */ + 'removed_resource_names': (_envoy_service_discovery_v3_ResourceName__Output)[]; } diff --git a/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/DiscoveryRequest.ts b/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/DiscoveryRequest.ts index f392ab8ae..95f1299cb 100644 --- a/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/DiscoveryRequest.ts +++ b/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/DiscoveryRequest.ts @@ -2,11 +2,12 @@ import type { Node as _envoy_config_core_v3_Node, Node__Output as _envoy_config_core_v3_Node__Output } from '../../../../envoy/config/core/v3/Node'; import type { Status as _google_rpc_Status, Status__Output as _google_rpc_Status__Output } from '../../../../google/rpc/Status'; +import type { ResourceLocator as _envoy_service_discovery_v3_ResourceLocator, ResourceLocator__Output as _envoy_service_discovery_v3_ResourceLocator__Output } from '../../../../envoy/service/discovery/v3/ResourceLocator'; /** * A DiscoveryRequest requests a set of versioned resources of the same type for * a given Envoy node on some API. - * [#next-free-field: 7] + * [#next-free-field: 8] */ export interface DiscoveryRequest { /** @@ -49,17 +50,27 @@ export interface DiscoveryRequest { 'response_nonce'?: (string); /** * This is populated when the previous :ref:`DiscoveryResponse ` - * failed to update configuration. The *message* field in *error_details* provides the Envoy + * failed to update configuration. The ``message`` field in ``error_details`` provides the Envoy * internal exception related to the failure. It is only intended for consumption during manual * debugging, the string provided is not guaranteed to be stable across Envoy versions. */ 'error_detail'?: (_google_rpc_Status | null); + /** + * [#not-implemented-hide:] + * Alternative to ``resource_names`` field that allows specifying dynamic + * parameters along with each resource name. Clients that populate this + * field must be able to handle responses from the server where resources + * are wrapped in a Resource message. + * Note that it is legal for a request to have some resources listed + * in ``resource_names`` and others in ``resource_locators``. + */ + 'resource_locators'?: (_envoy_service_discovery_v3_ResourceLocator)[]; } /** * A DiscoveryRequest requests a set of versioned resources of the same type for * a given Envoy node on some API. - * [#next-free-field: 7] + * [#next-free-field: 8] */ export interface DiscoveryRequest__Output { /** @@ -102,9 +113,19 @@ export interface DiscoveryRequest__Output { 'response_nonce': (string); /** * This is populated when the previous :ref:`DiscoveryResponse ` - * failed to update configuration. The *message* field in *error_details* provides the Envoy + * failed to update configuration. The ``message`` field in ``error_details`` provides the Envoy * internal exception related to the failure. It is only intended for consumption during manual * debugging, the string provided is not guaranteed to be stable across Envoy versions. */ 'error_detail': (_google_rpc_Status__Output | null); + /** + * [#not-implemented-hide:] + * Alternative to ``resource_names`` field that allows specifying dynamic + * parameters along with each resource name. Clients that populate this + * field must be able to handle responses from the server where resources + * are wrapped in a Resource message. + * Note that it is legal for a request to have some resources listed + * in ``resource_names`` and others in ``resource_locators``. + */ + 'resource_locators': (_envoy_service_discovery_v3_ResourceLocator__Output)[]; } diff --git a/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/DynamicParameterConstraints.ts b/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/DynamicParameterConstraints.ts new file mode 100644 index 000000000..5bba10719 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/DynamicParameterConstraints.ts @@ -0,0 +1,119 @@ +// Original file: deps/envoy-api/envoy/service/discovery/v3/discovery.proto + +import type { DynamicParameterConstraints as _envoy_service_discovery_v3_DynamicParameterConstraints, DynamicParameterConstraints__Output as _envoy_service_discovery_v3_DynamicParameterConstraints__Output } from '../../../../envoy/service/discovery/v3/DynamicParameterConstraints'; + +export interface _envoy_service_discovery_v3_DynamicParameterConstraints_ConstraintList { + 'constraints'?: (_envoy_service_discovery_v3_DynamicParameterConstraints)[]; +} + +export interface _envoy_service_discovery_v3_DynamicParameterConstraints_ConstraintList__Output { + 'constraints': (_envoy_service_discovery_v3_DynamicParameterConstraints__Output)[]; +} + +export interface _envoy_service_discovery_v3_DynamicParameterConstraints_SingleConstraint_Exists { +} + +export interface _envoy_service_discovery_v3_DynamicParameterConstraints_SingleConstraint_Exists__Output { +} + +/** + * A single constraint for a given key. + */ +export interface _envoy_service_discovery_v3_DynamicParameterConstraints_SingleConstraint { + /** + * The key to match against. + */ + 'key'?: (string); + /** + * Matches this exact value. + */ + 'value'?: (string); + /** + * Key is present (matches any value except for the key being absent). + * This allows setting a default constraint for clients that do + * not send a key at all, while there may be other clients that need + * special configuration based on that key. + */ + 'exists'?: (_envoy_service_discovery_v3_DynamicParameterConstraints_SingleConstraint_Exists | null); + 'constraint_type'?: "value"|"exists"; +} + +/** + * A single constraint for a given key. + */ +export interface _envoy_service_discovery_v3_DynamicParameterConstraints_SingleConstraint__Output { + /** + * The key to match against. + */ + 'key': (string); + /** + * Matches this exact value. + */ + 'value'?: (string); + /** + * Key is present (matches any value except for the key being absent). + * This allows setting a default constraint for clients that do + * not send a key at all, while there may be other clients that need + * special configuration based on that key. + */ + 'exists'?: (_envoy_service_discovery_v3_DynamicParameterConstraints_SingleConstraint_Exists__Output | null); + 'constraint_type': "value"|"exists"; +} + +/** + * A set of dynamic parameter constraints associated with a variant of an individual xDS resource. + * These constraints determine whether the resource matches a subscription based on the set of + * dynamic parameters in the subscription, as specified in the + * :ref:`ResourceLocator.dynamic_parameters` + * field. This allows xDS implementations (clients, servers, and caching proxies) to determine + * which variant of a resource is appropriate for a given client. + */ +export interface DynamicParameterConstraints { + /** + * A single constraint to evaluate. + */ + 'constraint'?: (_envoy_service_discovery_v3_DynamicParameterConstraints_SingleConstraint | null); + /** + * A list of constraints that match if any one constraint in the list + * matches. + */ + 'or_constraints'?: (_envoy_service_discovery_v3_DynamicParameterConstraints_ConstraintList | null); + /** + * A list of constraints that must all match. + */ + 'and_constraints'?: (_envoy_service_discovery_v3_DynamicParameterConstraints_ConstraintList | null); + /** + * The inverse (NOT) of a set of constraints. + */ + 'not_constraints'?: (_envoy_service_discovery_v3_DynamicParameterConstraints | null); + 'type'?: "constraint"|"or_constraints"|"and_constraints"|"not_constraints"; +} + +/** + * A set of dynamic parameter constraints associated with a variant of an individual xDS resource. + * These constraints determine whether the resource matches a subscription based on the set of + * dynamic parameters in the subscription, as specified in the + * :ref:`ResourceLocator.dynamic_parameters` + * field. This allows xDS implementations (clients, servers, and caching proxies) to determine + * which variant of a resource is appropriate for a given client. + */ +export interface DynamicParameterConstraints__Output { + /** + * A single constraint to evaluate. + */ + 'constraint'?: (_envoy_service_discovery_v3_DynamicParameterConstraints_SingleConstraint__Output | null); + /** + * A list of constraints that match if any one constraint in the list + * matches. + */ + 'or_constraints'?: (_envoy_service_discovery_v3_DynamicParameterConstraints_ConstraintList__Output | null); + /** + * A list of constraints that must all match. + */ + 'and_constraints'?: (_envoy_service_discovery_v3_DynamicParameterConstraints_ConstraintList__Output | null); + /** + * The inverse (NOT) of a set of constraints. + */ + 'not_constraints'?: (_envoy_service_discovery_v3_DynamicParameterConstraints__Output | null); + 'type': "constraint"|"or_constraints"|"and_constraints"|"not_constraints"; +} diff --git a/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/Resource.ts b/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/Resource.ts index 0e5897ab4..6bef71ff8 100644 --- a/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/Resource.ts +++ b/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/Resource.ts @@ -2,6 +2,8 @@ import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../../google/protobuf/Any'; import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../../../google/protobuf/Duration'; +import type { ResourceName as _envoy_service_discovery_v3_ResourceName, ResourceName__Output as _envoy_service_discovery_v3_ResourceName__Output } from '../../../../envoy/service/discovery/v3/ResourceName'; +import type { Metadata as _envoy_config_core_v3_Metadata, Metadata__Output as _envoy_config_core_v3_Metadata__Output } from '../../../../envoy/config/core/v3/Metadata'; /** * Cache control properties for the resource. @@ -30,7 +32,7 @@ export interface _envoy_service_discovery_v3_Resource_CacheControl__Output { } /** - * [#next-free-field: 8] + * [#next-free-field: 10] */ export interface Resource { /** @@ -44,6 +46,7 @@ export interface Resource { 'resource'?: (_google_protobuf_Any | null); /** * The resource's name, to distinguish it from others of the same type of resource. + * Only one of ``name`` or ``resource_name`` may be set. */ 'name'?: (string); /** @@ -71,10 +74,22 @@ export interface Resource { * [#not-implemented-hide:] */ 'cache_control'?: (_envoy_service_discovery_v3_Resource_CacheControl | null); + /** + * Alternative to the ``name`` field, to be used when the server supports + * multiple variants of the named resource that are differentiated by + * dynamic parameter constraints. + * Only one of ``name`` or ``resource_name`` may be set. + */ + 'resource_name'?: (_envoy_service_discovery_v3_ResourceName | null); + /** + * The Metadata field can be used to provide additional information for the resource. + * E.g. the trace data for debugging. + */ + 'metadata'?: (_envoy_config_core_v3_Metadata | null); } /** - * [#next-free-field: 8] + * [#next-free-field: 10] */ export interface Resource__Output { /** @@ -88,6 +103,7 @@ export interface Resource__Output { 'resource': (_google_protobuf_Any__Output | null); /** * The resource's name, to distinguish it from others of the same type of resource. + * Only one of ``name`` or ``resource_name`` may be set. */ 'name': (string); /** @@ -115,4 +131,16 @@ export interface Resource__Output { * [#not-implemented-hide:] */ 'cache_control': (_envoy_service_discovery_v3_Resource_CacheControl__Output | null); + /** + * Alternative to the ``name`` field, to be used when the server supports + * multiple variants of the named resource that are differentiated by + * dynamic parameter constraints. + * Only one of ``name`` or ``resource_name`` may be set. + */ + 'resource_name': (_envoy_service_discovery_v3_ResourceName__Output | null); + /** + * The Metadata field can be used to provide additional information for the resource. + * E.g. the trace data for debugging. + */ + 'metadata': (_envoy_config_core_v3_Metadata__Output | null); } diff --git a/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/ResourceLocator.ts b/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/ResourceLocator.ts new file mode 100644 index 000000000..c37dc68d3 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/ResourceLocator.ts @@ -0,0 +1,34 @@ +// Original file: deps/envoy-api/envoy/service/discovery/v3/discovery.proto + + +/** + * Specifies a resource to be subscribed to. + */ +export interface ResourceLocator { + /** + * The resource name to subscribe to. + */ + 'name'?: (string); + /** + * A set of dynamic parameters used to match against the dynamic parameter + * constraints on the resource. This allows clients to select between + * multiple variants of the same resource. + */ + 'dynamic_parameters'?: ({[key: string]: string}); +} + +/** + * Specifies a resource to be subscribed to. + */ +export interface ResourceLocator__Output { + /** + * The resource name to subscribe to. + */ + 'name': (string); + /** + * A set of dynamic parameters used to match against the dynamic parameter + * constraints on the resource. This allows clients to select between + * multiple variants of the same resource. + */ + 'dynamic_parameters': ({[key: string]: string}); +} diff --git a/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/ResourceName.ts b/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/ResourceName.ts new file mode 100644 index 000000000..da7f4fd8a --- /dev/null +++ b/packages/grpc-js-xds/src/generated/envoy/service/discovery/v3/ResourceName.ts @@ -0,0 +1,33 @@ +// Original file: deps/envoy-api/envoy/service/discovery/v3/discovery.proto + +import type { DynamicParameterConstraints as _envoy_service_discovery_v3_DynamicParameterConstraints, DynamicParameterConstraints__Output as _envoy_service_discovery_v3_DynamicParameterConstraints__Output } from '../../../../envoy/service/discovery/v3/DynamicParameterConstraints'; + +/** + * Specifies a concrete resource name. + */ +export interface ResourceName { + /** + * The name of the resource. + */ + 'name'?: (string); + /** + * Dynamic parameter constraints associated with this resource. To be used by client-side caches + * (including xDS proxies) when matching subscribed resource locators. + */ + 'dynamic_parameter_constraints'?: (_envoy_service_discovery_v3_DynamicParameterConstraints | null); +} + +/** + * Specifies a concrete resource name. + */ +export interface ResourceName__Output { + /** + * The name of the resource. + */ + 'name': (string); + /** + * Dynamic parameter constraints associated with this resource. To be used by client-side caches + * (including xDS proxies) when matching subscribed resource locators. + */ + 'dynamic_parameter_constraints': (_envoy_service_discovery_v3_DynamicParameterConstraints__Output | null); +} diff --git a/packages/grpc-js-xds/src/generated/envoy/service/load_stats/v3/LoadStatsResponse.ts b/packages/grpc-js-xds/src/generated/envoy/service/load_stats/v3/LoadStatsResponse.ts index 40f561870..6429d18c8 100644 --- a/packages/grpc-js-xds/src/generated/envoy/service/load_stats/v3/LoadStatsResponse.ts +++ b/packages/grpc-js-xds/src/generated/envoy/service/load_stats/v3/LoadStatsResponse.ts @@ -9,22 +9,22 @@ import type { Duration as _google_protobuf_Duration, Duration__Output as _google export interface LoadStatsResponse { /** * Clusters to report stats for. - * Not populated if *send_all_clusters* is true. + * Not populated if ``send_all_clusters`` is true. */ 'clusters'?: (string)[]; /** * The minimum interval of time to collect stats over. This is only a minimum for two reasons: * * 1. There may be some delay from when the timer fires until stats sampling occurs. - * 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic - * that is observed in between the corresponding previous *LoadStatsRequest* and this - * *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period + * 2. For clusters that were already feature in the previous ``LoadStatsResponse``, any traffic + * that is observed in between the corresponding previous ``LoadStatsRequest`` and this + * ``LoadStatsResponse`` will also be accumulated and billed to the cluster. This avoids a period * of inobservability that might otherwise exists between the messages. New clusters are not * subject to this consideration. */ 'load_reporting_interval'?: (_google_protobuf_Duration | null); /** - * Set to *true* if the management server supports endpoint granularity + * Set to ``true`` if the management server supports endpoint granularity * report. */ 'report_endpoint_granularity'?: (boolean); @@ -43,22 +43,22 @@ export interface LoadStatsResponse { export interface LoadStatsResponse__Output { /** * Clusters to report stats for. - * Not populated if *send_all_clusters* is true. + * Not populated if ``send_all_clusters`` is true. */ 'clusters': (string)[]; /** * The minimum interval of time to collect stats over. This is only a minimum for two reasons: * * 1. There may be some delay from when the timer fires until stats sampling occurs. - * 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic - * that is observed in between the corresponding previous *LoadStatsRequest* and this - * *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period + * 2. For clusters that were already feature in the previous ``LoadStatsResponse``, any traffic + * that is observed in between the corresponding previous ``LoadStatsRequest`` and this + * ``LoadStatsResponse`` will also be accumulated and billed to the cluster. This avoids a period * of inobservability that might otherwise exists between the messages. New clusters are not * subject to this consideration. */ 'load_reporting_interval': (_google_protobuf_Duration__Output | null); /** - * Set to *true* if the management server supports endpoint granularity + * Set to ``true`` if the management server supports endpoint granularity * report. */ 'report_endpoint_granularity': (boolean); diff --git a/packages/grpc-js-xds/src/generated/envoy/type/http/v3/PathTransformation.ts b/packages/grpc-js-xds/src/generated/envoy/type/http/v3/PathTransformation.ts index 4dc10efcb..c8aca7e3f 100644 --- a/packages/grpc-js-xds/src/generated/envoy/type/http/v3/PathTransformation.ts +++ b/packages/grpc-js-xds/src/generated/envoy/type/http/v3/PathTransformation.ts @@ -3,10 +3,10 @@ /** * Determines if adjacent slashes are merged into one. A common use case is for a request path - * header. Using this option in `:ref: PathNormalizationOptions - * ` - * will allow incoming requests with path `//dir///file` to match against route with `prefix` - * match set to `/dir`. When using for header transformations, note that slash merging is not + * header. Using this option in ``:ref: PathNormalizationOptions + * `` + * will allow incoming requests with path ``//dir///file`` to match against route with ``prefix`` + * match set to ``/dir``. When using for header transformations, note that slash merging is not * part of `HTTP spec `_ and is provided for convenience. */ export interface _envoy_type_http_v3_PathTransformation_Operation_MergeSlashes { @@ -14,10 +14,10 @@ export interface _envoy_type_http_v3_PathTransformation_Operation_MergeSlashes { /** * Determines if adjacent slashes are merged into one. A common use case is for a request path - * header. Using this option in `:ref: PathNormalizationOptions - * ` - * will allow incoming requests with path `//dir///file` to match against route with `prefix` - * match set to `/dir`. When using for header transformations, note that slash merging is not + * header. Using this option in ``:ref: PathNormalizationOptions + * `` + * will allow incoming requests with path ``//dir///file`` to match against route with ``prefix`` + * match set to ``/dir``. When using for header transformations, note that slash merging is not * part of `HTTP spec `_ and is provided for convenience. */ export interface _envoy_type_http_v3_PathTransformation_Operation_MergeSlashes__Output { diff --git a/packages/grpc-js-xds/src/generated/envoy/type/matcher/v3/RegexMatcher.ts b/packages/grpc-js-xds/src/generated/envoy/type/matcher/v3/RegexMatcher.ts index 1addb1730..c83f8b473 100644 --- a/packages/grpc-js-xds/src/generated/envoy/type/matcher/v3/RegexMatcher.ts +++ b/packages/grpc-js-xds/src/generated/envoy/type/matcher/v3/RegexMatcher.ts @@ -7,14 +7,14 @@ import type { UInt32Value as _google_protobuf_UInt32Value, UInt32Value__Output a * the documented `syntax `_. The engine is designed * to complete execution in linear time as well as limit the amount of memory used. * - * Envoy supports program size checking via runtime. The runtime keys `re2.max_program_size.error_level` - * and `re2.max_program_size.warn_level` can be set to integers as the maximum program size or + * Envoy supports program size checking via runtime. The runtime keys ``re2.max_program_size.error_level`` + * and ``re2.max_program_size.warn_level`` can be set to integers as the maximum program size or * complexity that a compiled regex can have before an exception is thrown or a warning is - * logged, respectively. `re2.max_program_size.error_level` defaults to 100, and - * `re2.max_program_size.warn_level` has no default if unset (will not check/log a warning). + * logged, respectively. ``re2.max_program_size.error_level`` defaults to 100, and + * ``re2.max_program_size.warn_level`` has no default if unset (will not check/log a warning). * - * Envoy emits two stats for tracking the program size of regexes: the histogram `re2.program_size`, - * which records the program size, and the counter `re2.exceeded_warn_level`, which is incremented + * Envoy emits two stats for tracking the program size of regexes: the histogram ``re2.program_size``, + * which records the program size, and the counter ``re2.exceeded_warn_level``, which is incremented * each time the program size exceeds the warn level threshold. */ export interface _envoy_type_matcher_v3_RegexMatcher_GoogleRE2 { @@ -26,6 +26,11 @@ export interface _envoy_type_matcher_v3_RegexMatcher_GoogleRE2 { * * This field is deprecated; regexp validation should be performed on the management server * instead of being done by each individual client. + * + * .. note:: + * + * Although this field is deprecated, the program size will still be checked against the + * global ``re2.max_program_size.error_level`` runtime value. */ 'max_program_size'?: (_google_protobuf_UInt32Value | null); } @@ -35,14 +40,14 @@ export interface _envoy_type_matcher_v3_RegexMatcher_GoogleRE2 { * the documented `syntax `_. The engine is designed * to complete execution in linear time as well as limit the amount of memory used. * - * Envoy supports program size checking via runtime. The runtime keys `re2.max_program_size.error_level` - * and `re2.max_program_size.warn_level` can be set to integers as the maximum program size or + * Envoy supports program size checking via runtime. The runtime keys ``re2.max_program_size.error_level`` + * and ``re2.max_program_size.warn_level`` can be set to integers as the maximum program size or * complexity that a compiled regex can have before an exception is thrown or a warning is - * logged, respectively. `re2.max_program_size.error_level` defaults to 100, and - * `re2.max_program_size.warn_level` has no default if unset (will not check/log a warning). + * logged, respectively. ``re2.max_program_size.error_level`` defaults to 100, and + * ``re2.max_program_size.warn_level`` has no default if unset (will not check/log a warning). * - * Envoy emits two stats for tracking the program size of regexes: the histogram `re2.program_size`, - * which records the program size, and the counter `re2.exceeded_warn_level`, which is incremented + * Envoy emits two stats for tracking the program size of regexes: the histogram ``re2.program_size``, + * which records the program size, and the counter ``re2.exceeded_warn_level``, which is incremented * each time the program size exceeds the warn level threshold. */ export interface _envoy_type_matcher_v3_RegexMatcher_GoogleRE2__Output { @@ -54,6 +59,11 @@ export interface _envoy_type_matcher_v3_RegexMatcher_GoogleRE2__Output { * * This field is deprecated; regexp validation should be performed on the management server * instead of being done by each individual client. + * + * .. note:: + * + * Although this field is deprecated, the program size will still be checked against the + * global ``re2.max_program_size.error_level`` runtime value. */ 'max_program_size': (_google_protobuf_UInt32Value__Output | null); } @@ -67,7 +77,8 @@ export interface RegexMatcher { */ 'google_re2'?: (_envoy_type_matcher_v3_RegexMatcher_GoogleRE2 | null); /** - * The regex match string. The string must be supported by the configured engine. + * The regex match string. The string must be supported by the configured engine. The regex is matched + * against the full string, not as a partial match. */ 'regex'?: (string); 'engine_type'?: "google_re2"; @@ -82,7 +93,8 @@ export interface RegexMatcher__Output { */ 'google_re2'?: (_envoy_type_matcher_v3_RegexMatcher_GoogleRE2__Output | null); /** - * The regex match string. The string must be supported by the configured engine. + * The regex match string. The string must be supported by the configured engine. The regex is matched + * against the full string, not as a partial match. */ 'regex': (string); 'engine_type': "google_re2"; diff --git a/packages/grpc-js-xds/src/generated/envoy/type/matcher/v3/StringMatcher.ts b/packages/grpc-js-xds/src/generated/envoy/type/matcher/v3/StringMatcher.ts index 7440746f1..181d59d54 100644 --- a/packages/grpc-js-xds/src/generated/envoy/type/matcher/v3/StringMatcher.ts +++ b/packages/grpc-js-xds/src/generated/envoy/type/matcher/v3/StringMatcher.ts @@ -12,7 +12,7 @@ export interface StringMatcher { * * Examples: * - * * *abc* only matches the value *abc*. + * * ``abc`` only matches the value ``abc``. */ 'exact'?: (string); /** @@ -21,7 +21,7 @@ export interface StringMatcher { * * Examples: * - * * *abc* matches the value *abc.xyz* + * * ``abc`` matches the value ``abc.xyz`` */ 'prefix'?: (string); /** @@ -30,7 +30,7 @@ export interface StringMatcher { * * Examples: * - * * *abc* matches the value *xyz.abc* + * * ``abc`` matches the value ``xyz.abc`` */ 'suffix'?: (string); /** @@ -40,7 +40,7 @@ export interface StringMatcher { /** * If true, indicates the exact/prefix/suffix/contains matching should be case insensitive. This * has no effect for the safe_regex match. - * For example, the matcher *data* will match both input string *Data* and *data* if set to true. + * For example, the matcher ``data`` will match both input string ``Data`` and ``data`` if set to true. */ 'ignore_case'?: (boolean); /** @@ -49,7 +49,7 @@ export interface StringMatcher { * * Examples: * - * * *abc* matches the value *xyz.abc.def* + * * ``abc`` matches the value ``xyz.abc.def`` */ 'contains'?: (string); 'match_pattern'?: "exact"|"prefix"|"suffix"|"safe_regex"|"contains"; @@ -65,7 +65,7 @@ export interface StringMatcher__Output { * * Examples: * - * * *abc* only matches the value *abc*. + * * ``abc`` only matches the value ``abc``. */ 'exact'?: (string); /** @@ -74,7 +74,7 @@ export interface StringMatcher__Output { * * Examples: * - * * *abc* matches the value *abc.xyz* + * * ``abc`` matches the value ``abc.xyz`` */ 'prefix'?: (string); /** @@ -83,7 +83,7 @@ export interface StringMatcher__Output { * * Examples: * - * * *abc* matches the value *xyz.abc* + * * ``abc`` matches the value ``xyz.abc`` */ 'suffix'?: (string); /** @@ -93,7 +93,7 @@ export interface StringMatcher__Output { /** * If true, indicates the exact/prefix/suffix/contains matching should be case insensitive. This * has no effect for the safe_regex match. - * For example, the matcher *data* will match both input string *Data* and *data* if set to true. + * For example, the matcher ``data`` will match both input string ``Data`` and ``data`` if set to true. */ 'ignore_case': (boolean); /** @@ -102,7 +102,7 @@ export interface StringMatcher__Output { * * Examples: * - * * *abc* matches the value *xyz.abc.def* + * * ``abc`` matches the value ``xyz.abc.def`` */ 'contains'?: (string); 'match_pattern': "exact"|"prefix"|"suffix"|"safe_regex"|"contains"; diff --git a/packages/grpc-js-xds/src/generated/envoy/type/matcher/v3/StructMatcher.ts b/packages/grpc-js-xds/src/generated/envoy/type/matcher/v3/StructMatcher.ts index 141806489..22afe24a9 100644 --- a/packages/grpc-js-xds/src/generated/envoy/type/matcher/v3/StructMatcher.ts +++ b/packages/grpc-js-xds/src/generated/envoy/type/matcher/v3/StructMatcher.ts @@ -26,7 +26,7 @@ export interface _envoy_type_matcher_v3_StructMatcher_PathSegment__Output { /** * StructMatcher provides a general interface to check if a given value is matched in - * google.protobuf.Struct. It uses `path` to retrieve the value + * google.protobuf.Struct. It uses ``path`` to retrieve the value * from the struct and then check if it's matched to the specified value. * * For example, for the following Struct: @@ -90,7 +90,7 @@ export interface StructMatcher { /** * StructMatcher provides a general interface to check if a given value is matched in - * google.protobuf.Struct. It uses `path` to retrieve the value + * google.protobuf.Struct. It uses ``path`` to retrieve the value * from the struct and then check if it's matched to the specified value. * * For example, for the following Struct: diff --git a/packages/grpc-js-xds/src/generated/envoy/type/metadata/v3/MetadataKey.ts b/packages/grpc-js-xds/src/generated/envoy/type/metadata/v3/MetadataKey.ts index 50b6690d3..bc81233fc 100644 --- a/packages/grpc-js-xds/src/generated/envoy/type/metadata/v3/MetadataKey.ts +++ b/packages/grpc-js-xds/src/generated/envoy/type/metadata/v3/MetadataKey.ts @@ -26,7 +26,7 @@ export interface _envoy_type_metadata_v3_MetadataKey_PathSegment__Output { } /** - * MetadataKey provides a general interface using `key` and `path` to retrieve value from + * MetadataKey provides a general interface using ``key`` and ``path`` to retrieve value from * :ref:`Metadata `. * * For example, for the following Metadata: @@ -67,7 +67,7 @@ export interface MetadataKey { } /** - * MetadataKey provides a general interface using `key` and `path` to retrieve value from + * MetadataKey provides a general interface using ``key`` and ``path`` to retrieve value from * :ref:`Metadata `. * * For example, for the following Metadata: diff --git a/packages/grpc-js-xds/src/generated/fault.ts b/packages/grpc-js-xds/src/generated/fault.ts index 896382e50..4ec7ed078 100644 --- a/packages/grpc-js-xds/src/generated/fault.ts +++ b/packages/grpc-js-xds/src/generated/fault.ts @@ -14,21 +14,16 @@ export interface ProtoGrpcType { core: { v3: { Address: MessageTypeDefinition - AggregatedConfigSource: MessageTypeDefinition - ApiConfigSource: MessageTypeDefinition - ApiVersion: EnumTypeDefinition AsyncDataSource: MessageTypeDefinition BackoffStrategy: MessageTypeDefinition BindConfig: MessageTypeDefinition BuildVersion: MessageTypeDefinition CidrRange: MessageTypeDefinition - ConfigSource: MessageTypeDefinition ControlPlane: MessageTypeDefinition DataSource: MessageTypeDefinition EnvoyInternalAddress: MessageTypeDefinition Extension: MessageTypeDefinition - ExtensionConfigSource: MessageTypeDefinition - GrpcService: MessageTypeDefinition + ExtraSourceAddress: MessageTypeDefinition HeaderMap: MessageTypeDefinition HeaderValue: MessageTypeDefinition HeaderValueOption: MessageTypeDefinition @@ -38,8 +33,8 @@ export interface ProtoGrpcType { Node: MessageTypeDefinition Pipe: MessageTypeDefinition ProxyProtocolConfig: MessageTypeDefinition + ProxyProtocolPassThroughTLVs: MessageTypeDefinition QueryParameter: MessageTypeDefinition - RateLimitSettings: MessageTypeDefinition RemoteDataSource: MessageTypeDefinition RequestMethod: EnumTypeDefinition RetryPolicy: MessageTypeDefinition @@ -49,9 +44,9 @@ export interface ProtoGrpcType { RuntimeFractionalPercent: MessageTypeDefinition RuntimePercent: MessageTypeDefinition RuntimeUInt32: MessageTypeDefinition - SelfConfigSource: MessageTypeDefinition SocketAddress: MessageTypeDefinition SocketOption: MessageTypeDefinition + SocketOptionsOverride: MessageTypeDefinition TcpKeepalive: MessageTypeDefinition TrafficDirection: EnumTypeDefinition TransportSocket: MessageTypeDefinition @@ -61,6 +56,7 @@ export interface ProtoGrpcType { } route: { v3: { + ClusterSpecifierPlugin: MessageTypeDefinition CorsPolicy: MessageTypeDefinition Decorator: MessageTypeDefinition DirectResponseAction: MessageTypeDefinition @@ -76,6 +72,7 @@ export interface ProtoGrpcType { RetryPolicy: MessageTypeDefinition Route: MessageTypeDefinition RouteAction: MessageTypeDefinition + RouteList: MessageTypeDefinition RouteMatch: MessageTypeDefinition Tracing: MessageTypeDefinition VirtualCluster: MessageTypeDefinition @@ -146,7 +143,6 @@ export interface ProtoGrpcType { DescriptorProto: MessageTypeDefinition DoubleValue: MessageTypeDefinition Duration: MessageTypeDefinition - Empty: MessageTypeDefinition EnumDescriptorProto: MessageTypeDefinition EnumOptions: MessageTypeDefinition EnumValueDescriptorProto: MessageTypeDefinition @@ -227,8 +223,18 @@ export interface ProtoGrpcType { } core: { v3: { - Authority: MessageTypeDefinition ContextParams: MessageTypeDefinition + TypedExtensionConfig: MessageTypeDefinition + } + } + type: { + matcher: { + v3: { + ListStringMatcher: MessageTypeDefinition + Matcher: MessageTypeDefinition + RegexMatcher: MessageTypeDefinition + StringMatcher: MessageTypeDefinition + } } } } diff --git a/packages/grpc-js-xds/src/generated/google/protobuf/MethodOptions.ts b/packages/grpc-js-xds/src/generated/google/protobuf/MethodOptions.ts index 5f81f0dd9..e47fd756c 100644 --- a/packages/grpc-js-xds/src/generated/google/protobuf/MethodOptions.ts +++ b/packages/grpc-js-xds/src/generated/google/protobuf/MethodOptions.ts @@ -1,16 +1,13 @@ // Original file: null import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; -import type { HttpRule as _google_api_HttpRule, HttpRule__Output as _google_api_HttpRule__Output } from '../../google/api/HttpRule'; export interface MethodOptions { 'deprecated'?: (boolean); 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; - '.google.api.http'?: (_google_api_HttpRule | null); } export interface MethodOptions__Output { 'deprecated': (boolean); 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; - '.google.api.http': (_google_api_HttpRule__Output | null); } diff --git a/packages/grpc-js-xds/src/generated/http_connection_manager.ts b/packages/grpc-js-xds/src/generated/http_connection_manager.ts index 137dcd45a..e0e06f904 100644 --- a/packages/grpc-js-xds/src/generated/http_connection_manager.ts +++ b/packages/grpc-js-xds/src/generated/http_connection_manager.ts @@ -21,6 +21,7 @@ export interface ProtoGrpcType { ExtensionFilter: MessageTypeDefinition GrpcStatusFilter: MessageTypeDefinition HeaderFilter: MessageTypeDefinition + LogTypeFilter: MessageTypeDefinition MetadataFilter: MessageTypeDefinition NotHealthCheckFilter: MessageTypeDefinition OrFilter: MessageTypeDefinition @@ -48,6 +49,7 @@ export interface ProtoGrpcType { EnvoyInternalAddress: MessageTypeDefinition Extension: MessageTypeDefinition ExtensionConfigSource: MessageTypeDefinition + ExtraSourceAddress: MessageTypeDefinition GrpcProtocolOptions: MessageTypeDefinition GrpcService: MessageTypeDefinition HeaderMap: MessageTypeDefinition @@ -62,9 +64,12 @@ export interface ProtoGrpcType { Locality: MessageTypeDefinition Metadata: MessageTypeDefinition Node: MessageTypeDefinition + PathConfigSource: MessageTypeDefinition Pipe: MessageTypeDefinition ProxyProtocolConfig: MessageTypeDefinition + ProxyProtocolPassThroughTLVs: MessageTypeDefinition QueryParameter: MessageTypeDefinition + QuicKeepAliveSettings: MessageTypeDefinition QuicProtocolOptions: MessageTypeDefinition RateLimitSettings: MessageTypeDefinition RemoteDataSource: MessageTypeDefinition @@ -80,6 +85,7 @@ export interface ProtoGrpcType { SelfConfigSource: MessageTypeDefinition SocketAddress: MessageTypeDefinition SocketOption: MessageTypeDefinition + SocketOptionsOverride: MessageTypeDefinition SubstitutionFormatString: MessageTypeDefinition TcpKeepalive: MessageTypeDefinition TcpProtocolOptions: MessageTypeDefinition @@ -109,6 +115,7 @@ export interface ProtoGrpcType { Route: MessageTypeDefinition RouteAction: MessageTypeDefinition RouteConfiguration: MessageTypeDefinition + RouteList: MessageTypeDefinition RouteMatch: MessageTypeDefinition ScopedRouteConfiguration: MessageTypeDefinition Tracing: MessageTypeDefinition @@ -124,6 +131,21 @@ export interface ProtoGrpcType { } } } + data: { + accesslog: { + v3: { + AccessLogCommon: MessageTypeDefinition + AccessLogType: EnumTypeDefinition + ConnectionProperties: MessageTypeDefinition + HTTPAccessLogEntry: MessageTypeDefinition + HTTPRequestProperties: MessageTypeDefinition + HTTPResponseProperties: MessageTypeDefinition + ResponseFlags: MessageTypeDefinition + TCPAccessLogEntry: MessageTypeDefinition + TLSProperties: MessageTypeDefinition + } + } + } extensions: { filters: { network: { @@ -275,6 +297,17 @@ export interface ProtoGrpcType { v3: { Authority: MessageTypeDefinition ContextParams: MessageTypeDefinition + TypedExtensionConfig: MessageTypeDefinition + } + } + type: { + matcher: { + v3: { + ListStringMatcher: MessageTypeDefinition + Matcher: MessageTypeDefinition + RegexMatcher: MessageTypeDefinition + StringMatcher: MessageTypeDefinition + } } } } diff --git a/packages/grpc-js-xds/src/generated/listener.ts b/packages/grpc-js-xds/src/generated/listener.ts index b92353ab1..4ffc4712d 100644 --- a/packages/grpc-js-xds/src/generated/listener.ts +++ b/packages/grpc-js-xds/src/generated/listener.ts @@ -21,6 +21,7 @@ export interface ProtoGrpcType { ExtensionFilter: MessageTypeDefinition GrpcStatusFilter: MessageTypeDefinition HeaderFilter: MessageTypeDefinition + LogTypeFilter: MessageTypeDefinition MetadataFilter: MessageTypeDefinition NotHealthCheckFilter: MessageTypeDefinition OrFilter: MessageTypeDefinition @@ -48,6 +49,7 @@ export interface ProtoGrpcType { EnvoyInternalAddress: MessageTypeDefinition Extension: MessageTypeDefinition ExtensionConfigSource: MessageTypeDefinition + ExtraSourceAddress: MessageTypeDefinition GrpcProtocolOptions: MessageTypeDefinition GrpcService: MessageTypeDefinition HeaderMap: MessageTypeDefinition @@ -62,9 +64,12 @@ export interface ProtoGrpcType { Locality: MessageTypeDefinition Metadata: MessageTypeDefinition Node: MessageTypeDefinition + PathConfigSource: MessageTypeDefinition Pipe: MessageTypeDefinition ProxyProtocolConfig: MessageTypeDefinition + ProxyProtocolPassThroughTLVs: MessageTypeDefinition QueryParameter: MessageTypeDefinition + QuicKeepAliveSettings: MessageTypeDefinition QuicProtocolOptions: MessageTypeDefinition RateLimitSettings: MessageTypeDefinition RemoteDataSource: MessageTypeDefinition @@ -80,6 +85,7 @@ export interface ProtoGrpcType { SelfConfigSource: MessageTypeDefinition SocketAddress: MessageTypeDefinition SocketOption: MessageTypeDefinition + SocketOptionsOverride: MessageTypeDefinition TcpKeepalive: MessageTypeDefinition TcpProtocolOptions: MessageTypeDefinition TrafficDirection: EnumTypeDefinition @@ -93,7 +99,9 @@ export interface ProtoGrpcType { listener: { v3: { ActiveRawUdpListenerConfig: MessageTypeDefinition + AdditionalAddress: MessageTypeDefinition ApiListener: MessageTypeDefinition + ApiListenerManager: MessageTypeDefinition Filter: MessageTypeDefinition FilterChain: MessageTypeDefinition FilterChainMatch: MessageTypeDefinition @@ -101,12 +109,15 @@ export interface ProtoGrpcType { ListenerCollection: MessageTypeDefinition ListenerFilter: MessageTypeDefinition ListenerFilterChainMatchPredicate: MessageTypeDefinition + ListenerManager: MessageTypeDefinition QuicProtocolOptions: MessageTypeDefinition UdpListenerConfig: MessageTypeDefinition + ValidationListenerManager: MessageTypeDefinition } } route: { v3: { + ClusterSpecifierPlugin: MessageTypeDefinition CorsPolicy: MessageTypeDefinition Decorator: MessageTypeDefinition DirectResponseAction: MessageTypeDefinition @@ -122,6 +133,7 @@ export interface ProtoGrpcType { RetryPolicy: MessageTypeDefinition Route: MessageTypeDefinition RouteAction: MessageTypeDefinition + RouteList: MessageTypeDefinition RouteMatch: MessageTypeDefinition Tracing: MessageTypeDefinition VirtualCluster: MessageTypeDefinition @@ -130,6 +142,21 @@ export interface ProtoGrpcType { } } } + data: { + accesslog: { + v3: { + AccessLogCommon: MessageTypeDefinition + AccessLogType: EnumTypeDefinition + ConnectionProperties: MessageTypeDefinition + HTTPAccessLogEntry: MessageTypeDefinition + HTTPRequestProperties: MessageTypeDefinition + HTTPResponseProperties: MessageTypeDefinition + ResponseFlags: MessageTypeDefinition + TCPAccessLogEntry: MessageTypeDefinition + TLSProperties: MessageTypeDefinition + } + } + } type: { matcher: { v3: { @@ -258,6 +285,17 @@ export interface ProtoGrpcType { CollectionEntry: MessageTypeDefinition ContextParams: MessageTypeDefinition ResourceLocator: MessageTypeDefinition + TypedExtensionConfig: MessageTypeDefinition + } + } + type: { + matcher: { + v3: { + ListStringMatcher: MessageTypeDefinition + Matcher: MessageTypeDefinition + RegexMatcher: MessageTypeDefinition + StringMatcher: MessageTypeDefinition + } } } } diff --git a/packages/grpc-js-xds/src/generated/lrs.ts b/packages/grpc-js-xds/src/generated/lrs.ts index e57d6c249..d49f1123c 100644 --- a/packages/grpc-js-xds/src/generated/lrs.ts +++ b/packages/grpc-js-xds/src/generated/lrs.ts @@ -24,6 +24,7 @@ export interface ProtoGrpcType { DataSource: MessageTypeDefinition EnvoyInternalAddress: MessageTypeDefinition Extension: MessageTypeDefinition + ExtraSourceAddress: MessageTypeDefinition HeaderMap: MessageTypeDefinition HeaderValue: MessageTypeDefinition HeaderValueOption: MessageTypeDefinition @@ -44,6 +45,7 @@ export interface ProtoGrpcType { RuntimeUInt32: MessageTypeDefinition SocketAddress: MessageTypeDefinition SocketOption: MessageTypeDefinition + SocketOptionsOverride: MessageTypeDefinition TcpKeepalive: MessageTypeDefinition TrafficDirection: EnumTypeDefinition TransportSocket: MessageTypeDefinition diff --git a/packages/grpc-js-xds/src/generated/route.ts b/packages/grpc-js-xds/src/generated/route.ts index d6485bcd7..25552e612 100644 --- a/packages/grpc-js-xds/src/generated/route.ts +++ b/packages/grpc-js-xds/src/generated/route.ts @@ -28,6 +28,7 @@ export interface ProtoGrpcType { EnvoyInternalAddress: MessageTypeDefinition Extension: MessageTypeDefinition ExtensionConfigSource: MessageTypeDefinition + ExtraSourceAddress: MessageTypeDefinition GrpcService: MessageTypeDefinition HeaderMap: MessageTypeDefinition HeaderValue: MessageTypeDefinition @@ -36,8 +37,10 @@ export interface ProtoGrpcType { Locality: MessageTypeDefinition Metadata: MessageTypeDefinition Node: MessageTypeDefinition + PathConfigSource: MessageTypeDefinition Pipe: MessageTypeDefinition ProxyProtocolConfig: MessageTypeDefinition + ProxyProtocolPassThroughTLVs: MessageTypeDefinition QueryParameter: MessageTypeDefinition RateLimitSettings: MessageTypeDefinition RemoteDataSource: MessageTypeDefinition @@ -52,6 +55,7 @@ export interface ProtoGrpcType { SelfConfigSource: MessageTypeDefinition SocketAddress: MessageTypeDefinition SocketOption: MessageTypeDefinition + SocketOptionsOverride: MessageTypeDefinition TcpKeepalive: MessageTypeDefinition TrafficDirection: EnumTypeDefinition TransportSocket: MessageTypeDefinition @@ -78,6 +82,7 @@ export interface ProtoGrpcType { Route: MessageTypeDefinition RouteAction: MessageTypeDefinition RouteConfiguration: MessageTypeDefinition + RouteList: MessageTypeDefinition RouteMatch: MessageTypeDefinition Tracing: MessageTypeDefinition Vhds: MessageTypeDefinition @@ -212,6 +217,17 @@ export interface ProtoGrpcType { v3: { Authority: MessageTypeDefinition ContextParams: MessageTypeDefinition + TypedExtensionConfig: MessageTypeDefinition + } + } + type: { + matcher: { + v3: { + ListStringMatcher: MessageTypeDefinition + Matcher: MessageTypeDefinition + RegexMatcher: MessageTypeDefinition + StringMatcher: MessageTypeDefinition + } } } } diff --git a/packages/grpc-js-xds/src/generated/wrr_locality.ts b/packages/grpc-js-xds/src/generated/wrr_locality.ts new file mode 100644 index 000000000..e0275ef9a --- /dev/null +++ b/packages/grpc-js-xds/src/generated/wrr_locality.ts @@ -0,0 +1,231 @@ +import type * as grpc from '@grpc/grpc-js'; +import type { EnumTypeDefinition, MessageTypeDefinition } from '@grpc/proto-loader'; + + +type SubtypeConstructor any, Subtype> = { + new(...args: ConstructorParameters): Subtype; +}; + +export interface ProtoGrpcType { + envoy: { + annotations: { + } + config: { + cluster: { + v3: { + CircuitBreakers: MessageTypeDefinition + Cluster: MessageTypeDefinition + ClusterCollection: MessageTypeDefinition + Filter: MessageTypeDefinition + LoadBalancingPolicy: MessageTypeDefinition + OutlierDetection: MessageTypeDefinition + TrackClusterStats: MessageTypeDefinition + UpstreamConnectionOptions: MessageTypeDefinition + } + } + core: { + v3: { + Address: MessageTypeDefinition + AggregatedConfigSource: MessageTypeDefinition + AlternateProtocolsCacheOptions: MessageTypeDefinition + ApiConfigSource: MessageTypeDefinition + ApiVersion: EnumTypeDefinition + AsyncDataSource: MessageTypeDefinition + BackoffStrategy: MessageTypeDefinition + BindConfig: MessageTypeDefinition + BuildVersion: MessageTypeDefinition + CidrRange: MessageTypeDefinition + ConfigSource: MessageTypeDefinition + ControlPlane: MessageTypeDefinition + DataSource: MessageTypeDefinition + DnsResolutionConfig: MessageTypeDefinition + DnsResolverOptions: MessageTypeDefinition + EnvoyInternalAddress: MessageTypeDefinition + EventServiceConfig: MessageTypeDefinition + Extension: MessageTypeDefinition + ExtensionConfigSource: MessageTypeDefinition + ExtraSourceAddress: MessageTypeDefinition + GrpcProtocolOptions: MessageTypeDefinition + GrpcService: MessageTypeDefinition + HeaderMap: MessageTypeDefinition + HeaderValue: MessageTypeDefinition + HeaderValueOption: MessageTypeDefinition + HealthCheck: MessageTypeDefinition + HealthStatus: EnumTypeDefinition + HealthStatusSet: MessageTypeDefinition + Http1ProtocolOptions: MessageTypeDefinition + Http2ProtocolOptions: MessageTypeDefinition + Http3ProtocolOptions: MessageTypeDefinition + HttpProtocolOptions: MessageTypeDefinition + HttpUri: MessageTypeDefinition + KeepaliveSettings: MessageTypeDefinition + Locality: MessageTypeDefinition + Metadata: MessageTypeDefinition + Node: MessageTypeDefinition + PathConfigSource: MessageTypeDefinition + Pipe: MessageTypeDefinition + QueryParameter: MessageTypeDefinition + QuicKeepAliveSettings: MessageTypeDefinition + QuicProtocolOptions: MessageTypeDefinition + RateLimitSettings: MessageTypeDefinition + RemoteDataSource: MessageTypeDefinition + RequestMethod: EnumTypeDefinition + RetryPolicy: MessageTypeDefinition + RoutingPriority: EnumTypeDefinition + RuntimeDouble: MessageTypeDefinition + RuntimeFeatureFlag: MessageTypeDefinition + RuntimeFractionalPercent: MessageTypeDefinition + RuntimePercent: MessageTypeDefinition + RuntimeUInt32: MessageTypeDefinition + SchemeHeaderTransformation: MessageTypeDefinition + SelfConfigSource: MessageTypeDefinition + SocketAddress: MessageTypeDefinition + SocketOption: MessageTypeDefinition + SocketOptionsOverride: MessageTypeDefinition + TcpKeepalive: MessageTypeDefinition + TcpProtocolOptions: MessageTypeDefinition + TrafficDirection: EnumTypeDefinition + TransportSocket: MessageTypeDefinition + TypedExtensionConfig: MessageTypeDefinition + UpstreamHttpProtocolOptions: MessageTypeDefinition + WatchedDirectory: MessageTypeDefinition + } + } + endpoint: { + v3: { + ClusterLoadAssignment: MessageTypeDefinition + Endpoint: MessageTypeDefinition + LbEndpoint: MessageTypeDefinition + LedsClusterLocalityConfig: MessageTypeDefinition + LocalityLbEndpoints: MessageTypeDefinition + } + } + } + extensions: { + load_balancing_policies: { + wrr_locality: { + v3: { + WrrLocality: MessageTypeDefinition + } + } + } + } + type: { + matcher: { + v3: { + ListStringMatcher: MessageTypeDefinition + RegexMatchAndSubstitute: MessageTypeDefinition + RegexMatcher: MessageTypeDefinition + StringMatcher: MessageTypeDefinition + } + } + v3: { + CodecClientType: EnumTypeDefinition + DoubleRange: MessageTypeDefinition + FractionalPercent: MessageTypeDefinition + Int32Range: MessageTypeDefinition + Int64Range: MessageTypeDefinition + Percent: MessageTypeDefinition + SemanticVersion: MessageTypeDefinition + } + } + } + google: { + protobuf: { + Any: MessageTypeDefinition + BoolValue: MessageTypeDefinition + BytesValue: MessageTypeDefinition + DescriptorProto: MessageTypeDefinition + DoubleValue: MessageTypeDefinition + Duration: MessageTypeDefinition + Empty: MessageTypeDefinition + EnumDescriptorProto: MessageTypeDefinition + EnumOptions: MessageTypeDefinition + EnumValueDescriptorProto: MessageTypeDefinition + EnumValueOptions: MessageTypeDefinition + FieldDescriptorProto: MessageTypeDefinition + FieldOptions: MessageTypeDefinition + FileDescriptorProto: MessageTypeDefinition + FileDescriptorSet: MessageTypeDefinition + FileOptions: MessageTypeDefinition + FloatValue: MessageTypeDefinition + GeneratedCodeInfo: MessageTypeDefinition + Int32Value: MessageTypeDefinition + Int64Value: MessageTypeDefinition + ListValue: MessageTypeDefinition + MessageOptions: MessageTypeDefinition + MethodDescriptorProto: MessageTypeDefinition + MethodOptions: MessageTypeDefinition + NullValue: EnumTypeDefinition + OneofDescriptorProto: MessageTypeDefinition + OneofOptions: MessageTypeDefinition + ServiceDescriptorProto: MessageTypeDefinition + ServiceOptions: MessageTypeDefinition + SourceCodeInfo: MessageTypeDefinition + StringValue: MessageTypeDefinition + Struct: MessageTypeDefinition + Timestamp: MessageTypeDefinition + UInt32Value: MessageTypeDefinition + UInt64Value: MessageTypeDefinition + UninterpretedOption: MessageTypeDefinition + Value: MessageTypeDefinition + } + } + udpa: { + annotations: { + FieldMigrateAnnotation: MessageTypeDefinition + FieldSecurityAnnotation: MessageTypeDefinition + FileMigrateAnnotation: MessageTypeDefinition + MigrateAnnotation: MessageTypeDefinition + PackageVersionStatus: EnumTypeDefinition + StatusAnnotation: MessageTypeDefinition + VersioningAnnotation: MessageTypeDefinition + } + } + validate: { + AnyRules: MessageTypeDefinition + BoolRules: MessageTypeDefinition + BytesRules: MessageTypeDefinition + DoubleRules: MessageTypeDefinition + DurationRules: MessageTypeDefinition + EnumRules: MessageTypeDefinition + FieldRules: MessageTypeDefinition + Fixed32Rules: MessageTypeDefinition + Fixed64Rules: MessageTypeDefinition + FloatRules: MessageTypeDefinition + Int32Rules: MessageTypeDefinition + Int64Rules: MessageTypeDefinition + KnownRegex: EnumTypeDefinition + MapRules: MessageTypeDefinition + MessageRules: MessageTypeDefinition + RepeatedRules: MessageTypeDefinition + SFixed32Rules: MessageTypeDefinition + SFixed64Rules: MessageTypeDefinition + SInt32Rules: MessageTypeDefinition + SInt64Rules: MessageTypeDefinition + StringRules: MessageTypeDefinition + TimestampRules: MessageTypeDefinition + UInt32Rules: MessageTypeDefinition + UInt64Rules: MessageTypeDefinition + } + xds: { + annotations: { + v3: { + FieldStatusAnnotation: MessageTypeDefinition + FileStatusAnnotation: MessageTypeDefinition + MessageStatusAnnotation: MessageTypeDefinition + PackageVersionStatus: EnumTypeDefinition + StatusAnnotation: MessageTypeDefinition + } + } + core: { + v3: { + Authority: MessageTypeDefinition + CollectionEntry: MessageTypeDefinition + ContextParams: MessageTypeDefinition + ResourceLocator: MessageTypeDefinition + } + } + } +} + diff --git a/packages/grpc-js-xds/src/generated/xds/core/v3/TypedExtensionConfig.ts b/packages/grpc-js-xds/src/generated/xds/core/v3/TypedExtensionConfig.ts new file mode 100644 index 000000000..b6ce18c0a --- /dev/null +++ b/packages/grpc-js-xds/src/generated/xds/core/v3/TypedExtensionConfig.ts @@ -0,0 +1,43 @@ +// Original file: deps/xds/xds/core/v3/extension.proto + +import type { Any as _google_protobuf_Any, Any__Output as _google_protobuf_Any__Output } from '../../../google/protobuf/Any'; + +/** + * Message type for extension configuration. + */ +export interface TypedExtensionConfig { + /** + * The name of an extension. This is not used to select the extension, instead + * it serves the role of an opaque identifier. + */ + 'name'?: (string); + /** + * The typed config for the extension. The type URL will be used to identify + * the extension. In the case that the type URL is *xds.type.v3.TypedStruct* + * (or, for historical reasons, *udpa.type.v1.TypedStruct*), the inner type + * URL of *TypedStruct* will be utilized. See the + * :ref:`extension configuration overview + * ` for further details. + */ + 'typed_config'?: (_google_protobuf_Any | null); +} + +/** + * Message type for extension configuration. + */ +export interface TypedExtensionConfig__Output { + /** + * The name of an extension. This is not used to select the extension, instead + * it serves the role of an opaque identifier. + */ + 'name': (string); + /** + * The typed config for the extension. The type URL will be used to identify + * the extension. In the case that the type URL is *xds.type.v3.TypedStruct* + * (or, for historical reasons, *udpa.type.v1.TypedStruct*), the inner type + * URL of *TypedStruct* will be utilized. See the + * :ref:`extension configuration overview + * ` for further details. + */ + 'typed_config': (_google_protobuf_Any__Output | null); +} diff --git a/packages/grpc-js-xds/src/generated/xds/type/matcher/v3/ListStringMatcher.ts b/packages/grpc-js-xds/src/generated/xds/type/matcher/v3/ListStringMatcher.ts new file mode 100644 index 000000000..e839f292b --- /dev/null +++ b/packages/grpc-js-xds/src/generated/xds/type/matcher/v3/ListStringMatcher.ts @@ -0,0 +1,17 @@ +// Original file: deps/xds/xds/type/matcher/v3/string.proto + +import type { StringMatcher as _xds_type_matcher_v3_StringMatcher, StringMatcher__Output as _xds_type_matcher_v3_StringMatcher__Output } from '../../../../xds/type/matcher/v3/StringMatcher'; + +/** + * Specifies a list of ways to match a string. + */ +export interface ListStringMatcher { + 'patterns'?: (_xds_type_matcher_v3_StringMatcher)[]; +} + +/** + * Specifies a list of ways to match a string. + */ +export interface ListStringMatcher__Output { + 'patterns': (_xds_type_matcher_v3_StringMatcher__Output)[]; +} diff --git a/packages/grpc-js-xds/src/generated/xds/type/matcher/v3/Matcher.ts b/packages/grpc-js-xds/src/generated/xds/type/matcher/v3/Matcher.ts new file mode 100644 index 000000000..be93c0f16 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/xds/type/matcher/v3/Matcher.ts @@ -0,0 +1,307 @@ +// Original file: deps/xds/xds/type/matcher/v3/matcher.proto + +import type { Matcher as _xds_type_matcher_v3_Matcher, Matcher__Output as _xds_type_matcher_v3_Matcher__Output } from '../../../../xds/type/matcher/v3/Matcher'; +import type { TypedExtensionConfig as _xds_core_v3_TypedExtensionConfig, TypedExtensionConfig__Output as _xds_core_v3_TypedExtensionConfig__Output } from '../../../../xds/core/v3/TypedExtensionConfig'; +import type { StringMatcher as _xds_type_matcher_v3_StringMatcher, StringMatcher__Output as _xds_type_matcher_v3_StringMatcher__Output } from '../../../../xds/type/matcher/v3/StringMatcher'; + +/** + * An individual matcher. + */ +export interface _xds_type_matcher_v3_Matcher_MatcherList_FieldMatcher { + /** + * Determines if the match succeeds. + */ + 'predicate'?: (_xds_type_matcher_v3_Matcher_MatcherList_Predicate | null); + /** + * What to do if the match succeeds. + */ + 'on_match'?: (_xds_type_matcher_v3_Matcher_OnMatch | null); +} + +/** + * An individual matcher. + */ +export interface _xds_type_matcher_v3_Matcher_MatcherList_FieldMatcher__Output { + /** + * Determines if the match succeeds. + */ + 'predicate': (_xds_type_matcher_v3_Matcher_MatcherList_Predicate__Output | null); + /** + * What to do if the match succeeds. + */ + 'on_match': (_xds_type_matcher_v3_Matcher_OnMatch__Output | null); +} + +/** + * A map of configured matchers. Used to allow using a map within a oneof. + */ +export interface _xds_type_matcher_v3_Matcher_MatcherTree_MatchMap { + 'map'?: ({[key: string]: _xds_type_matcher_v3_Matcher_OnMatch}); +} + +/** + * A map of configured matchers. Used to allow using a map within a oneof. + */ +export interface _xds_type_matcher_v3_Matcher_MatcherTree_MatchMap__Output { + 'map': ({[key: string]: _xds_type_matcher_v3_Matcher_OnMatch__Output}); +} + +/** + * A linear list of field matchers. + * The field matchers are evaluated in order, and the first match + * wins. + */ +export interface _xds_type_matcher_v3_Matcher_MatcherList { + /** + * A list of matchers. First match wins. + */ + 'matchers'?: (_xds_type_matcher_v3_Matcher_MatcherList_FieldMatcher)[]; +} + +/** + * A linear list of field matchers. + * The field matchers are evaluated in order, and the first match + * wins. + */ +export interface _xds_type_matcher_v3_Matcher_MatcherList__Output { + /** + * A list of matchers. First match wins. + */ + 'matchers': (_xds_type_matcher_v3_Matcher_MatcherList_FieldMatcher__Output)[]; +} + +export interface _xds_type_matcher_v3_Matcher_MatcherTree { + /** + * Protocol-specific specification of input field to match on. + */ + 'input'?: (_xds_core_v3_TypedExtensionConfig | null); + 'exact_match_map'?: (_xds_type_matcher_v3_Matcher_MatcherTree_MatchMap | null); + /** + * Longest matching prefix wins. + */ + 'prefix_match_map'?: (_xds_type_matcher_v3_Matcher_MatcherTree_MatchMap | null); + /** + * Extension for custom matching logic. + */ + 'custom_match'?: (_xds_core_v3_TypedExtensionConfig | null); + /** + * Exact or prefix match maps in which to look up the input value. + * If the lookup succeeds, the match is considered successful, and + * the corresponding OnMatch is used. + */ + 'tree_type'?: "exact_match_map"|"prefix_match_map"|"custom_match"; +} + +export interface _xds_type_matcher_v3_Matcher_MatcherTree__Output { + /** + * Protocol-specific specification of input field to match on. + */ + 'input': (_xds_core_v3_TypedExtensionConfig__Output | null); + 'exact_match_map'?: (_xds_type_matcher_v3_Matcher_MatcherTree_MatchMap__Output | null); + /** + * Longest matching prefix wins. + */ + 'prefix_match_map'?: (_xds_type_matcher_v3_Matcher_MatcherTree_MatchMap__Output | null); + /** + * Extension for custom matching logic. + */ + 'custom_match'?: (_xds_core_v3_TypedExtensionConfig__Output | null); + /** + * Exact or prefix match maps in which to look up the input value. + * If the lookup succeeds, the match is considered successful, and + * the corresponding OnMatch is used. + */ + 'tree_type': "exact_match_map"|"prefix_match_map"|"custom_match"; +} + +/** + * What to do if a match is successful. + */ +export interface _xds_type_matcher_v3_Matcher_OnMatch { + /** + * Nested matcher to evaluate. + * If the nested matcher does not match and does not specify + * on_no_match, then this matcher is considered not to have + * matched, even if a predicate at this level or above returned + * true. + */ + 'matcher'?: (_xds_type_matcher_v3_Matcher | null); + /** + * Protocol-specific action to take. + */ + 'action'?: (_xds_core_v3_TypedExtensionConfig | null); + 'on_match'?: "matcher"|"action"; +} + +/** + * What to do if a match is successful. + */ +export interface _xds_type_matcher_v3_Matcher_OnMatch__Output { + /** + * Nested matcher to evaluate. + * If the nested matcher does not match and does not specify + * on_no_match, then this matcher is considered not to have + * matched, even if a predicate at this level or above returned + * true. + */ + 'matcher'?: (_xds_type_matcher_v3_Matcher__Output | null); + /** + * Protocol-specific action to take. + */ + 'action'?: (_xds_core_v3_TypedExtensionConfig__Output | null); + 'on_match': "matcher"|"action"; +} + +/** + * Predicate to determine if a match is successful. + */ +export interface _xds_type_matcher_v3_Matcher_MatcherList_Predicate { + /** + * A single predicate to evaluate. + */ + 'single_predicate'?: (_xds_type_matcher_v3_Matcher_MatcherList_Predicate_SinglePredicate | null); + /** + * A list of predicates to be OR-ed together. + */ + 'or_matcher'?: (_xds_type_matcher_v3_Matcher_MatcherList_Predicate_PredicateList | null); + /** + * A list of predicates to be AND-ed together. + */ + 'and_matcher'?: (_xds_type_matcher_v3_Matcher_MatcherList_Predicate_PredicateList | null); + /** + * The invert of a predicate + */ + 'not_matcher'?: (_xds_type_matcher_v3_Matcher_MatcherList_Predicate | null); + 'match_type'?: "single_predicate"|"or_matcher"|"and_matcher"|"not_matcher"; +} + +/** + * Predicate to determine if a match is successful. + */ +export interface _xds_type_matcher_v3_Matcher_MatcherList_Predicate__Output { + /** + * A single predicate to evaluate. + */ + 'single_predicate'?: (_xds_type_matcher_v3_Matcher_MatcherList_Predicate_SinglePredicate__Output | null); + /** + * A list of predicates to be OR-ed together. + */ + 'or_matcher'?: (_xds_type_matcher_v3_Matcher_MatcherList_Predicate_PredicateList__Output | null); + /** + * A list of predicates to be AND-ed together. + */ + 'and_matcher'?: (_xds_type_matcher_v3_Matcher_MatcherList_Predicate_PredicateList__Output | null); + /** + * The invert of a predicate + */ + 'not_matcher'?: (_xds_type_matcher_v3_Matcher_MatcherList_Predicate__Output | null); + 'match_type': "single_predicate"|"or_matcher"|"and_matcher"|"not_matcher"; +} + +/** + * A list of two or more matchers. Used to allow using a list within a oneof. + */ +export interface _xds_type_matcher_v3_Matcher_MatcherList_Predicate_PredicateList { + 'predicate'?: (_xds_type_matcher_v3_Matcher_MatcherList_Predicate)[]; +} + +/** + * A list of two or more matchers. Used to allow using a list within a oneof. + */ +export interface _xds_type_matcher_v3_Matcher_MatcherList_Predicate_PredicateList__Output { + 'predicate': (_xds_type_matcher_v3_Matcher_MatcherList_Predicate__Output)[]; +} + +/** + * Predicate for a single input field. + */ +export interface _xds_type_matcher_v3_Matcher_MatcherList_Predicate_SinglePredicate { + /** + * Protocol-specific specification of input field to match on. + * [#extension-category: envoy.matching.common_inputs] + */ + 'input'?: (_xds_core_v3_TypedExtensionConfig | null); + /** + * Built-in string matcher. + */ + 'value_match'?: (_xds_type_matcher_v3_StringMatcher | null); + /** + * Extension for custom matching logic. + * [#extension-category: envoy.matching.input_matchers] + */ + 'custom_match'?: (_xds_core_v3_TypedExtensionConfig | null); + 'matcher'?: "value_match"|"custom_match"; +} + +/** + * Predicate for a single input field. + */ +export interface _xds_type_matcher_v3_Matcher_MatcherList_Predicate_SinglePredicate__Output { + /** + * Protocol-specific specification of input field to match on. + * [#extension-category: envoy.matching.common_inputs] + */ + 'input': (_xds_core_v3_TypedExtensionConfig__Output | null); + /** + * Built-in string matcher. + */ + 'value_match'?: (_xds_type_matcher_v3_StringMatcher__Output | null); + /** + * Extension for custom matching logic. + * [#extension-category: envoy.matching.input_matchers] + */ + 'custom_match'?: (_xds_core_v3_TypedExtensionConfig__Output | null); + 'matcher': "value_match"|"custom_match"; +} + +/** + * A matcher, which may traverse a matching tree in order to result in a match action. + * During matching, the tree will be traversed until a match is found, or if no match + * is found the action specified by the most specific on_no_match will be evaluated. + * As an on_no_match might result in another matching tree being evaluated, this process + * might repeat several times until the final OnMatch (or no match) is decided. + */ +export interface Matcher { + /** + * A linear list of matchers to evaluate. + */ + 'matcher_list'?: (_xds_type_matcher_v3_Matcher_MatcherList | null); + /** + * A match tree to evaluate. + */ + 'matcher_tree'?: (_xds_type_matcher_v3_Matcher_MatcherTree | null); + /** + * Optional OnMatch to use if the matcher failed. + * If specified, the OnMatch is used, and the matcher is considered + * to have matched. + * If not specified, the matcher is considered not to have matched. + */ + 'on_no_match'?: (_xds_type_matcher_v3_Matcher_OnMatch | null); + 'matcher_type'?: "matcher_list"|"matcher_tree"; +} + +/** + * A matcher, which may traverse a matching tree in order to result in a match action. + * During matching, the tree will be traversed until a match is found, or if no match + * is found the action specified by the most specific on_no_match will be evaluated. + * As an on_no_match might result in another matching tree being evaluated, this process + * might repeat several times until the final OnMatch (or no match) is decided. + */ +export interface Matcher__Output { + /** + * A linear list of matchers to evaluate. + */ + 'matcher_list'?: (_xds_type_matcher_v3_Matcher_MatcherList__Output | null); + /** + * A match tree to evaluate. + */ + 'matcher_tree'?: (_xds_type_matcher_v3_Matcher_MatcherTree__Output | null); + /** + * Optional OnMatch to use if the matcher failed. + * If specified, the OnMatch is used, and the matcher is considered + * to have matched. + * If not specified, the matcher is considered not to have matched. + */ + 'on_no_match': (_xds_type_matcher_v3_Matcher_OnMatch__Output | null); + 'matcher_type': "matcher_list"|"matcher_tree"; +} diff --git a/packages/grpc-js-xds/src/generated/xds/type/matcher/v3/RegexMatcher.ts b/packages/grpc-js-xds/src/generated/xds/type/matcher/v3/RegexMatcher.ts new file mode 100644 index 000000000..575051041 --- /dev/null +++ b/packages/grpc-js-xds/src/generated/xds/type/matcher/v3/RegexMatcher.ts @@ -0,0 +1,80 @@ +// Original file: deps/xds/xds/type/matcher/v3/regex.proto + + +/** + * Google's `RE2 `_ regex engine. The regex + * string must adhere to the documented `syntax + * `_. The engine is designed to + * complete execution in linear time as well as limit the amount of memory + * used. + * + * Envoy supports program size checking via runtime. The runtime keys + * `re2.max_program_size.error_level` and `re2.max_program_size.warn_level` + * can be set to integers as the maximum program size or complexity that a + * compiled regex can have before an exception is thrown or a warning is + * logged, respectively. `re2.max_program_size.error_level` defaults to 100, + * and `re2.max_program_size.warn_level` has no default if unset (will not + * check/log a warning). + * + * Envoy emits two stats for tracking the program size of regexes: the + * histogram `re2.program_size`, which records the program size, and the + * counter `re2.exceeded_warn_level`, which is incremented each time the + * program size exceeds the warn level threshold. + */ +export interface _xds_type_matcher_v3_RegexMatcher_GoogleRE2 { +} + +/** + * Google's `RE2 `_ regex engine. The regex + * string must adhere to the documented `syntax + * `_. The engine is designed to + * complete execution in linear time as well as limit the amount of memory + * used. + * + * Envoy supports program size checking via runtime. The runtime keys + * `re2.max_program_size.error_level` and `re2.max_program_size.warn_level` + * can be set to integers as the maximum program size or complexity that a + * compiled regex can have before an exception is thrown or a warning is + * logged, respectively. `re2.max_program_size.error_level` defaults to 100, + * and `re2.max_program_size.warn_level` has no default if unset (will not + * check/log a warning). + * + * Envoy emits two stats for tracking the program size of regexes: the + * histogram `re2.program_size`, which records the program size, and the + * counter `re2.exceeded_warn_level`, which is incremented each time the + * program size exceeds the warn level threshold. + */ +export interface _xds_type_matcher_v3_RegexMatcher_GoogleRE2__Output { +} + +/** + * A regex matcher designed for safety when used with untrusted input. + */ +export interface RegexMatcher { + /** + * Google's RE2 regex engine. + */ + 'google_re2'?: (_xds_type_matcher_v3_RegexMatcher_GoogleRE2 | null); + /** + * The regex match string. The string must be supported by the configured + * engine. + */ + 'regex'?: (string); + 'engine_type'?: "google_re2"; +} + +/** + * A regex matcher designed for safety when used with untrusted input. + */ +export interface RegexMatcher__Output { + /** + * Google's RE2 regex engine. + */ + 'google_re2'?: (_xds_type_matcher_v3_RegexMatcher_GoogleRE2__Output | null); + /** + * The regex match string. The string must be supported by the configured + * engine. + */ + 'regex': (string); + 'engine_type': "google_re2"; +} diff --git a/packages/grpc-js-xds/src/generated/xds/type/matcher/v3/StringMatcher.ts b/packages/grpc-js-xds/src/generated/xds/type/matcher/v3/StringMatcher.ts new file mode 100644 index 000000000..af2f2f56f --- /dev/null +++ b/packages/grpc-js-xds/src/generated/xds/type/matcher/v3/StringMatcher.ts @@ -0,0 +1,109 @@ +// Original file: deps/xds/xds/type/matcher/v3/string.proto + +import type { RegexMatcher as _xds_type_matcher_v3_RegexMatcher, RegexMatcher__Output as _xds_type_matcher_v3_RegexMatcher__Output } from '../../../../xds/type/matcher/v3/RegexMatcher'; + +/** + * Specifies the way to match a string. + * [#next-free-field: 8] + */ +export interface StringMatcher { + /** + * The input string must match exactly the string specified here. + * + * Examples: + * + * * *abc* only matches the value *abc*. + */ + 'exact'?: (string); + /** + * The input string must have the prefix specified here. + * Note: empty prefix is not allowed, please use regex instead. + * + * Examples: + * + * * *abc* matches the value *abc.xyz* + */ + 'prefix'?: (string); + /** + * The input string must have the suffix specified here. + * Note: empty prefix is not allowed, please use regex instead. + * + * Examples: + * + * * *abc* matches the value *xyz.abc* + */ + 'suffix'?: (string); + /** + * The input string must match the regular expression specified here. + */ + 'safe_regex'?: (_xds_type_matcher_v3_RegexMatcher | null); + /** + * If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no + * effect for the safe_regex match. + * For example, the matcher *data* will match both input string *Data* and *data* if set to true. + */ + 'ignore_case'?: (boolean); + /** + * The input string must have the substring specified here. + * Note: empty contains match is not allowed, please use regex instead. + * + * Examples: + * + * * *abc* matches the value *xyz.abc.def* + */ + 'contains'?: (string); + 'match_pattern'?: "exact"|"prefix"|"suffix"|"safe_regex"|"contains"; +} + +/** + * Specifies the way to match a string. + * [#next-free-field: 8] + */ +export interface StringMatcher__Output { + /** + * The input string must match exactly the string specified here. + * + * Examples: + * + * * *abc* only matches the value *abc*. + */ + 'exact'?: (string); + /** + * The input string must have the prefix specified here. + * Note: empty prefix is not allowed, please use regex instead. + * + * Examples: + * + * * *abc* matches the value *abc.xyz* + */ + 'prefix'?: (string); + /** + * The input string must have the suffix specified here. + * Note: empty prefix is not allowed, please use regex instead. + * + * Examples: + * + * * *abc* matches the value *xyz.abc* + */ + 'suffix'?: (string); + /** + * The input string must match the regular expression specified here. + */ + 'safe_regex'?: (_xds_type_matcher_v3_RegexMatcher__Output | null); + /** + * If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no + * effect for the safe_regex match. + * For example, the matcher *data* will match both input string *Data* and *data* if set to true. + */ + 'ignore_case': (boolean); + /** + * The input string must have the substring specified here. + * Note: empty contains match is not allowed, please use regex instead. + * + * Examples: + * + * * *abc* matches the value *xyz.abc.def* + */ + 'contains'?: (string); + 'match_pattern': "exact"|"prefix"|"suffix"|"safe_regex"|"contains"; +} diff --git a/packages/grpc-js-xds/src/load-balancer-lrs.ts b/packages/grpc-js-xds/src/load-balancer-lrs.ts deleted file mode 100644 index 40c653a03..000000000 --- a/packages/grpc-js-xds/src/load-balancer-lrs.ts +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright 2020 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { connectivityState as ConnectivityState, StatusObject, status as Status, experimental } from '@grpc/grpc-js'; -import { Locality__Output } from './generated/envoy/config/core/v3/Locality'; -import { validateXdsServerConfig, XdsServerConfig } from './xds-bootstrap'; -import { XdsClusterLocalityStats, XdsClient, getSingletonXdsClient } from './xds-client'; -import LoadBalancer = experimental.LoadBalancer; -import ChannelControlHelper = experimental.ChannelControlHelper; -import registerLoadBalancerType = experimental.registerLoadBalancerType; -import SubchannelAddress = experimental.SubchannelAddress; -import ChildLoadBalancerHandler = experimental.ChildLoadBalancerHandler; -import Picker = experimental.Picker; -import PickArgs = experimental.PickArgs; -import PickResultType = experimental.PickResultType; -import PickResult = experimental.PickResult; -import Filter = experimental.Filter; -import BaseFilter = experimental.BaseFilter; -import FilterFactory = experimental.FilterFactory; -import Call = experimental.CallStream; -import TypedLoadBalancingConfig = experimental.TypedLoadBalancingConfig; -import selectLbConfigFromList = experimental.selectLbConfigFromList; - -const TYPE_NAME = 'lrs'; - -class LrsLoadBalancingConfig implements TypedLoadBalancingConfig { - getLoadBalancerName(): string { - return TYPE_NAME; - } - toJsonObject(): object { - return { - [TYPE_NAME]: { - cluster_name: this.clusterName, - eds_service_name: this.edsServiceName, - lrs_load_reporting_server: this.lrsLoadReportingServer, - locality: this.locality, - child_policy: [this.childPolicy.toJsonObject()] - } - } - } - - constructor(private clusterName: string, private edsServiceName: string, private lrsLoadReportingServer: XdsServerConfig, private locality: Locality__Output, private childPolicy: TypedLoadBalancingConfig) {} - - getClusterName() { - return this.clusterName; - } - - getEdsServiceName() { - return this.edsServiceName; - } - - getLrsLoadReportingServer() { - return this.lrsLoadReportingServer; - } - - getLocality() { - return this.locality; - } - - getChildPolicy() { - return this.childPolicy; - } - - static createFromJson(obj: any): LrsLoadBalancingConfig { - if (!('cluster_name' in obj && typeof obj.cluster_name === 'string')) { - throw new Error('lrs config must have a string field cluster_name'); - } - if (!('eds_service_name' in obj && typeof obj.eds_service_name === 'string')) { - throw new Error('lrs config must have a string field eds_service_name'); - } - if (!('locality' in obj && obj.locality !== null && typeof obj.locality === 'object')) { - throw new Error('lrs config must have an object field locality'); - } - if ('region' in obj.locality && typeof obj.locality.region !== 'string') { - throw new Error('lrs config locality.region field must be a string if provided'); - } - if ('zone' in obj.locality && typeof obj.locality.zone !== 'string') { - throw new Error('lrs config locality.zone field must be a string if provided'); - } - if ('sub_zone' in obj.locality && typeof obj.locality.sub_zone !== 'string') { - throw new Error('lrs config locality.sub_zone field must be a string if provided'); - } - if (!('child_policy' in obj && Array.isArray(obj.child_policy))) { - throw new Error('lrs config must have a child_policy array'); - } - if (!('lrs_load_reporting_server' in obj && obj.lrs_load_reporting_server !== null && typeof obj.lrs_load_reporting_server === 'object')) { - throw new Error('lrs config must have an object field lrs_load_reporting_server'); - } - const childConfig = selectLbConfigFromList(obj.child_policy); - if (!childConfig) { - throw new Error('lrs config child_policy parsing failed'); - } - return new LrsLoadBalancingConfig(obj.cluster_name, obj.eds_service_name, validateXdsServerConfig(obj.lrs_load_reporting_server), { - region: obj.locality.region ?? '', - zone: obj.locality.zone ?? '', - sub_zone: obj.locality.sub_zone ?? '' - }, childConfig); - } -} - -/** - * Picker that delegates picking to another picker, and reports when calls - * created using those picks start and end. - */ -class LoadReportingPicker implements Picker { - constructor( - private wrappedPicker: Picker, - private localityStatsReporter: XdsClusterLocalityStats - ) {} - - pick(pickArgs: PickArgs): PickResult { - const wrappedPick = this.wrappedPicker.pick(pickArgs); - if (wrappedPick.pickResultType === PickResultType.COMPLETE) { - return { - pickResultType: PickResultType.COMPLETE, - subchannel: wrappedPick.subchannel, - status: null, - onCallStarted: () => { - wrappedPick.onCallStarted?.(); - this.localityStatsReporter.addCallStarted(); - }, - onCallEnded: status => { - wrappedPick.onCallEnded?.(status); - this.localityStatsReporter.addCallFinished(status !== Status.OK); - } - }; - } else { - return wrappedPick; - } - } -} - -/** - * "Load balancer" that delegates the actual load balancing logic to another - * LoadBalancer class and adds hooks to track when calls started using that - * LoadBalancer start and end, and uses the XdsClient to report that - * information back to the xDS server. - */ -export class LrsLoadBalancer implements LoadBalancer { - private childBalancer: ChildLoadBalancerHandler; - private localityStatsReporter: XdsClusterLocalityStats | null = null; - - constructor(private channelControlHelper: ChannelControlHelper) { - this.childBalancer = new ChildLoadBalancerHandler(experimental.createChildChannelControlHelper(channelControlHelper, { - updateState: (connectivityState: ConnectivityState, picker: Picker) => { - if (this.localityStatsReporter !== null) { - picker = new LoadReportingPicker(picker, this.localityStatsReporter); - } - channelControlHelper.updateState(connectivityState, picker); - }, - })); - } - - updateAddressList( - addressList: SubchannelAddress[], - lbConfig: TypedLoadBalancingConfig, - attributes: { [key: string]: unknown } - ): void { - if (!(lbConfig instanceof LrsLoadBalancingConfig)) { - return; - } - this.localityStatsReporter = (attributes.xdsClient as XdsClient).addClusterLocalityStats( - lbConfig.getLrsLoadReportingServer(), - lbConfig.getClusterName(), - lbConfig.getEdsServiceName(), - lbConfig.getLocality() - ); - this.childBalancer.updateAddressList(addressList, lbConfig.getChildPolicy(), attributes); - } - exitIdle(): void { - this.childBalancer.exitIdle(); - } - resetBackoff(): void { - this.childBalancer.resetBackoff(); - } - destroy(): void { - this.childBalancer.destroy(); - } - getTypeName(): string { - return TYPE_NAME; - } -} - -export function setup() { - registerLoadBalancerType(TYPE_NAME, LrsLoadBalancer, LrsLoadBalancingConfig); -} From c6797262460207c82cd74496a06b11642879c06e Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Tue, 22 Aug 2023 09:53:19 -0700 Subject: [PATCH 3/8] Add custom LB interop test support --- .../grpc-js-xds/interop/xds-interop-client.ts | 100 +++++++++++++++++- .../src/load-balancer-xds-wrr-locality.ts | 54 ++++++++++ packages/grpc-js/src/load-balancing-call.ts | 4 +- 3 files changed, 151 insertions(+), 7 deletions(-) diff --git a/packages/grpc-js-xds/interop/xds-interop-client.ts b/packages/grpc-js-xds/interop/xds-interop-client.ts index 3055b5b5d..c28e9cc28 100644 --- a/packages/grpc-js-xds/interop/xds-interop-client.ts +++ b/packages/grpc-js-xds/interop/xds-interop-client.ts @@ -30,8 +30,98 @@ import { XdsUpdateClientConfigureServiceHandlers } from './generated/grpc/testin import { Empty__Output } from './generated/grpc/testing/Empty'; import { LoadBalancerAccumulatedStatsResponse } from './generated/grpc/testing/LoadBalancerAccumulatedStatsResponse'; +import TypedLoadBalancingConfig = grpc.experimental.TypedLoadBalancingConfig; +import LoadBalancer = grpc.experimental.LoadBalancer; +import ChannelControlHelper = grpc.experimental.ChannelControlHelper; +import ChildLoadBalancerHandler = grpc.experimental.ChildLoadBalancerHandler; +import SubchannelAddress = grpc.experimental.SubchannelAddress; +import Picker = grpc.experimental.Picker; +import PickArgs = grpc.experimental.PickArgs; +import PickResult = grpc.experimental.PickResult; +import PickResultType = grpc.experimental.PickResultType; +import createChildChannelControlHelper = grpc.experimental.createChildChannelControlHelper; +import parseLoadBalancingConfig = grpc.experimental.parseLoadBalancingConfig; + grpc_xds.register(); +const LB_POLICY_NAME = 'RpcBehaviorLoadBalancer'; + +class RpcBehaviorLoadBalancingConfig implements TypedLoadBalancingConfig { + constructor(private rpcBehavior: string) {} + getLoadBalancerName(): string { + return LB_POLICY_NAME; + } + toJsonObject(): object { + return { + [LB_POLICY_NAME]: { + 'rpcBehavior': this.rpcBehavior + } + }; + } + getRpcBehavior() { + return this.rpcBehavior; + } + static createFromJson(obj: any): RpcBehaviorLoadBalancingConfig { + if (!('rpcBehavior' in obj && typeof obj.rpcBehavior === 'string')) { + throw new Error(`${LB_POLICY_NAME} parsing error: expected string field rpcBehavior`); + } + return new RpcBehaviorLoadBalancingConfig(obj.rpcBehavior); + } +} + +class RpcBehaviorPicker implements Picker { + constructor(private wrappedPicker: Picker, private rpcBehavior: string) {} + pick(pickArgs: PickArgs): PickResult { + const wrappedPick = this.wrappedPicker.pick(pickArgs); + if (wrappedPick.pickResultType === PickResultType.COMPLETE) { + pickArgs.metadata.add('rpc-behavior', this.rpcBehavior); + } + return wrappedPick; + } +} + +const RPC_BEHAVIOR_CHILD_CONFIG = parseLoadBalancingConfig({round_robin: {}}); + +/** + * Load balancer implementation for Custom LB policy test + */ +class RpcBehaviorLoadBalancer implements LoadBalancer { + private child: ChildLoadBalancerHandler; + private latestConfig: RpcBehaviorLoadBalancingConfig | null = null; + constructor(channelControlHelper: ChannelControlHelper) { + const childChannelControlHelper = createChildChannelControlHelper(channelControlHelper, { + updateState: (connectivityState, picker) => { + if (connectivityState === grpc.connectivityState.READY && this.latestConfig) { + picker = new RpcBehaviorPicker(picker, this.latestConfig.getLoadBalancerName()); + } + channelControlHelper.updateState(connectivityState, picker); + } + }); + this.child = new ChildLoadBalancerHandler(childChannelControlHelper); + } + updateAddressList(addressList: SubchannelAddress[], lbConfig: TypedLoadBalancingConfig, attributes: { [key: string]: unknown; }): void { + if (!(lbConfig instanceof RpcBehaviorLoadBalancingConfig)) { + return; + } + this.latestConfig = lbConfig; + this.child.updateAddressList(addressList, RPC_BEHAVIOR_CHILD_CONFIG, attributes); + } + exitIdle(): void { + this.child.exitIdle(); + } + resetBackoff(): void { + this.child.resetBackoff(); + } + destroy(): void { + this.child.destroy(); + } + getTypeName(): string { + return LB_POLICY_NAME; + } +} + +grpc.experimental.registerLoadBalancerType(LB_POLICY_NAME, RpcBehaviorLoadBalancer, RpcBehaviorLoadBalancingConfig); + const packageDefinition = protoLoader.loadSync('grpc/testing/test.proto', { keepCase: true, defaults: true, @@ -91,7 +181,7 @@ class CallSubscriber { } if (peerName in this.callsSucceededByPeer) { this.callsSucceededByPeer[peerName] += 1; - } else { + } else { this.callsSucceededByPeer[peerName] = 1; } this.callsSucceeded += 1; @@ -426,9 +516,9 @@ function main() { * channels do not share any subchannels. It does not have any * inherent function. */ console.log(`Interop client channel ${i} starting sending ${argv.qps} QPS to ${argv.server}`); - sendConstantQps(new loadedProto.grpc.testing.TestService(argv.server, grpc.credentials.createInsecure(), {'unique': i}), - argv.qps, - argv.fail_on_failed_rpcs === 'true', + sendConstantQps(new loadedProto.grpc.testing.TestService(argv.server, grpc.credentials.createInsecure(), {'unique': i}), + argv.qps, + argv.fail_on_failed_rpcs === 'true', callStatsTracker); } @@ -486,4 +576,4 @@ function main() { if (require.main === module) { main(); -} \ No newline at end of file +} diff --git a/packages/grpc-js-xds/src/load-balancer-xds-wrr-locality.ts b/packages/grpc-js-xds/src/load-balancer-xds-wrr-locality.ts index 757f9b93b..2a7d677b1 100644 --- a/packages/grpc-js-xds/src/load-balancer-xds-wrr-locality.ts +++ b/packages/grpc-js-xds/src/load-balancer-xds-wrr-locality.ts @@ -16,6 +16,7 @@ */ import { LoadBalancingConfig, experimental, logVerbosity } from "@grpc/grpc-js"; +import { loadProtosWithOptionsSync } from "@grpc/proto-loader/build/src/util"; import { WeightedTargetRaw } from "./load-balancer-weighted-target"; import { isLocalitySubchannelAddress } from "./load-balancer-priority"; import { localityToName } from "./load-balancer-xds-cluster-resolver"; @@ -26,6 +27,11 @@ import ChildLoadBalancerHandler = experimental.ChildLoadBalancerHandler; import SubchannelAddress = experimental.SubchannelAddress; import parseLoadBalancingConfig = experimental.parseLoadBalancingConfig; import registerLoadBalancerType = experimental.registerLoadBalancerType; +import { Any__Output } from "./generated/google/protobuf/Any"; +import { WrrLocality__Output } from "./generated/envoy/extensions/load_balancing_policies/wrr_locality/v3/WrrLocality"; +import { TypedExtensionConfig__Output } from "./generated/envoy/config/core/v3/TypedExtensionConfig"; +import { LoadBalancingPolicy__Output } from "./generated/envoy/config/cluster/v3/LoadBalancingPolicy"; +import { registerLbPolicy } from "./lb-policy-registry"; const TRACER_NAME = 'xds_wrr_locality'; @@ -107,6 +113,54 @@ class XdsWrrLocalityLoadBalancer implements LoadBalancer { } } +const WRR_LOCALITY_TYPE_URL = 'envoy.extensions.load_balancing_policies.wrr_locality.v3.WrrLocality'; + +const resourceRoot = loadProtosWithOptionsSync([ + 'xds/type/v3/typed_struct.proto', + 'udpa/type/v1/typed_struct.proto'], { + keepCase: true, + includeDirs: [ + // Paths are relative to src/build + __dirname + '/../../deps/xds/', + __dirname + '/../../deps/protoc-gen-validate' + ], + } +); + +const toObjectOptions = { + longs: String, + enums: String, + defaults: true, + oneofs: true +} + +function decodeWrrLocality(message: Any__Output): WrrLocality__Output { + const name = message.type_url.substring(message.type_url.lastIndexOf('/') + 1); + const type = resourceRoot.lookup(name); + if (type) { + const decodedMessage = (type as any).decode(message.value); + return decodedMessage.$type.toObject(decodedMessage, toObjectOptions) as WrrLocality__Output; + } else { + throw new Error(`TypedStruct parsing error: unexpected type URL ${message.type_url}`); + } +} + +function convertToLoadBalancingPolicy(protoPolicy: TypedExtensionConfig__Output, selectChildPolicy: (childPolicy: LoadBalancingPolicy__Output) => LoadBalancingConfig): LoadBalancingConfig { + if (protoPolicy.typed_config?.type_url !== WRR_LOCALITY_TYPE_URL) { + throw new Error(`WRR Locality LB policy parsing error: unexpected type URL ${protoPolicy.typed_config?.type_url}`); + } + const wrrLocalityMessage = decodeWrrLocality(protoPolicy.typed_config); + if (!wrrLocalityMessage.endpoint_picking_policy) { + throw new Error('WRR Locality LB parsing error: no endpoint_picking_policy specified'); + } + return { + [TYPE_NAME]: { + child_policy: selectChildPolicy(wrrLocalityMessage.endpoint_picking_policy) + } + }; +} + export function setup() { registerLoadBalancerType(TYPE_NAME, XdsWrrLocalityLoadBalancer, XdsWrrLocalityLoadBalancingConfig); + registerLbPolicy(WRR_LOCALITY_TYPE_URL, convertToLoadBalancingPolicy); } diff --git a/packages/grpc-js/src/load-balancing-call.ts b/packages/grpc-js/src/load-balancing-call.ts index 6e9718a7a..69dc518f8 100644 --- a/packages/grpc-js/src/load-balancing-call.ts +++ b/packages/grpc-js/src/load-balancing-call.ts @@ -114,8 +114,9 @@ export class LoadBalancingCall implements Call { throw new Error('doPick called before start'); } this.trace('Pick called'); + const finalMetadata = this.metadata.clone(); const pickResult = this.channel.doPick( - this.metadata, + finalMetadata, this.callConfig.pickInformation ); const subchannelString = pickResult.subchannel @@ -140,7 +141,6 @@ export class LoadBalancingCall implements Call { .generateMetadata({ service_url: this.serviceUrl }) .then( credsMetadata => { - const finalMetadata = this.metadata!.clone(); finalMetadata.merge(credsMetadata); if (finalMetadata.get('authorization').length > 1) { this.outputStatus( From 73260353637c422a41c229d58116aaeb2c1dbcb8 Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Wed, 23 Aug 2023 09:37:47 -0700 Subject: [PATCH 4/8] Fix tests --- .../src/load-balancer-xds-cluster-impl.ts | 10 +- .../grpc-js-xds/test/test-confg-parsing.ts | 126 +++++++----------- 2 files changed, 50 insertions(+), 86 deletions(-) diff --git a/packages/grpc-js-xds/src/load-balancer-xds-cluster-impl.ts b/packages/grpc-js-xds/src/load-balancer-xds-cluster-impl.ts index eb3df8c38..4050a3cf8 100644 --- a/packages/grpc-js-xds/src/load-balancer-xds-cluster-impl.ts +++ b/packages/grpc-js-xds/src/load-balancer-xds-cluster-impl.ts @@ -70,14 +70,10 @@ class XdsClusterImplLoadBalancingConfig implements TypedLoadBalancingConfig { cluster: this.cluster, drop_categories: this.dropCategories, child_policy: [this.childPolicy.toJsonObject()], - max_concurrent_requests: this.maxConcurrentRequests + max_concurrent_requests: this.maxConcurrentRequests, + eds_service_name: this.edsServiceName, + lrs_load_reporting_server: this.lrsLoadReportingServer, }; - if (this.edsServiceName !== undefined) { - jsonObj.eds_service_name = this.edsServiceName; - } - if (this.lrsLoadReportingServer !== undefined) { - jsonObj.lrs_load_reporting_server_name = this.lrsLoadReportingServer; - } return { [TYPE_NAME]: jsonObj }; diff --git a/packages/grpc-js-xds/test/test-confg-parsing.ts b/packages/grpc-js-xds/test/test-confg-parsing.ts index ba91bb2e1..740934ba1 100644 --- a/packages/grpc-js-xds/test/test-confg-parsing.ts +++ b/packages/grpc-js-xds/test/test-confg-parsing.ts @@ -69,33 +69,22 @@ const allTestCases: {[lbPolicyName: string]: TestCase[]} = { name: 'empty fields', input: { discovery_mechanisms: [], - locality_picking_policy: [], - endpoint_picking_policy: [] + xds_lb_policy: [] } }, { name: 'missing discovery_mechanisms', input: { - locality_picking_policy: [], - endpoint_picking_policy: [] + xds_lb_policy: [] }, error: /discovery_mechanisms/ }, { - name: 'missing locality_picking_policy', + name: 'missing xds_lb_policy', input: { - discovery_mechanisms: [], - endpoint_picking_policy: [] - }, - error: /locality_picking_policy/ - }, - { - name: 'missing endpoint_picking_policy', - input: { - discovery_mechanisms: [], - locality_picking_policy: [] + discovery_mechanisms: [] }, - error: /endpoint_picking_policy/ + error: /xds_lb_policy/ }, { name: 'discovery_mechanism: EDS', @@ -104,8 +93,7 @@ const allTestCases: {[lbPolicyName: string]: TestCase[]} = { cluster: 'abc', type: 'EDS' }], - locality_picking_policy: [], - endpoint_picking_policy: [] + xds_lb_policy: [] }, output: { discovery_mechanisms: [{ @@ -113,8 +101,7 @@ const allTestCases: {[lbPolicyName: string]: TestCase[]} = { type: 'EDS', lrs_load_reporting_server: undefined }], - locality_picking_policy: [], - endpoint_picking_policy: [] + xds_lb_policy: [] } }, { @@ -124,8 +111,7 @@ const allTestCases: {[lbPolicyName: string]: TestCase[]} = { cluster: 'abc', type: 'LOGICAL_DNS' }], - locality_picking_policy: [], - endpoint_picking_policy: [] + xds_lb_policy: [] }, output: { discovery_mechanisms: [{ @@ -133,8 +119,7 @@ const allTestCases: {[lbPolicyName: string]: TestCase[]} = { type: 'LOGICAL_DNS', lrs_load_reporting_server: undefined }], - locality_picking_policy: [], - endpoint_picking_policy: [] + xds_lb_policy: [] } }, { @@ -148,8 +133,7 @@ const allTestCases: {[lbPolicyName: string]: TestCase[]} = { dns_hostname: undefined, lrs_load_reporting_server: undefined }], - locality_picking_policy: [], - endpoint_picking_policy: [] + xds_lb_policy: [] } }, { @@ -170,8 +154,7 @@ const allTestCases: {[lbPolicyName: string]: TestCase[]} = { server_features: ['test'] } }], - locality_picking_policy: [], - endpoint_picking_policy: [] + xds_lb_policy: [] } } ], @@ -180,12 +163,30 @@ const allTestCases: {[lbPolicyName: string]: TestCase[]} = { name: 'only required fields', input: { cluster: 'abc', + eds_service_name: 'def', drop_categories: [], + lrs_load_reporting_server: { + server_uri: 'localhost:12345', + channel_creds: [{ + type: 'google_default', + config: {} + }], + server_features: ['test'] + }, child_policy: [{round_robin: {}}] }, output: { cluster: 'abc', + eds_service_name: 'def', drop_categories: [], + lrs_load_reporting_server: { + server_uri: 'localhost:12345', + channel_creds: [{ + type: 'google_default', + config: {} + }], + server_features: ['test'] + }, child_policy: [{round_robin: {}}], max_concurrent_requests: 1024 } @@ -194,40 +195,8 @@ const allTestCases: {[lbPolicyName: string]: TestCase[]} = { name: 'undefined optional fields', input: { cluster: 'abc', - drop_categories: [], - child_policy: [{round_robin: {}}], - eds_service_name: undefined, - max_concurrent_requests: undefined - }, - output: { - cluster: 'abc', - drop_categories: [], - child_policy: [{round_robin: {}}], - max_concurrent_requests: 1024 - } - }, - { - name: 'populated optional fields', - input: { - cluster: 'abc', - drop_categories: [{ - category: 'test', - requests_per_million: 100 - }], - child_policy: [{round_robin: {}}], - eds_service_name: 'def', - max_concurrent_requests: 123 - }, - } - ], - lrs: [ - { - name: 'only required fields', - input: { - cluster_name: 'abc', eds_service_name: 'def', - locality: {}, - child_policy: [{round_robin: {}}], + drop_categories: [], lrs_load_reporting_server: { server_uri: 'localhost:12345', channel_creds: [{ @@ -235,17 +204,14 @@ const allTestCases: {[lbPolicyName: string]: TestCase[]} = { config: {} }], server_features: ['test'] - } + }, + child_policy: [{round_robin: {}}], + max_concurrent_requests: undefined }, output: { - cluster_name: 'abc', + cluster: 'abc', eds_service_name: 'def', - locality: { - region: '', - zone: '', - sub_zone: '' - }, - child_policy: [{round_robin: {}}], + drop_categories: [], lrs_load_reporting_server: { server_uri: 'localhost:12345', channel_creds: [{ @@ -253,20 +219,20 @@ const allTestCases: {[lbPolicyName: string]: TestCase[]} = { config: {} }], server_features: ['test'] - } + }, + child_policy: [{round_robin: {}}], + max_concurrent_requests: 1024 } }, { name: 'populated optional fields', input: { - cluster_name: 'abc', + cluster: 'abc', eds_service_name: 'def', - locality: { - region: 'a', - zone: 'b', - sub_zone: 'c' - }, - child_policy: [{round_robin: {}}], + drop_categories: [{ + category: 'test', + requests_per_million: 100 + }], lrs_load_reporting_server: { server_uri: 'localhost:12345', channel_creds: [{ @@ -274,8 +240,10 @@ const allTestCases: {[lbPolicyName: string]: TestCase[]} = { config: {} }], server_features: ['test'] - } - } + }, + child_policy: [{round_robin: {}}], + max_concurrent_requests: 123 + }, } ], priority: [ From 9ca8302725373249ef774da502e70d5c303ffab4 Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Wed, 23 Aug 2023 14:32:15 -0700 Subject: [PATCH 5/8] Add tests and fix bugs --- packages/grpc-js-xds/gulpfile.ts | 1 + .../grpc-js-xds/interop/xds-interop-client.ts | 2 +- packages/grpc-js-xds/src/index.ts | 4 + .../grpc-js-xds/src/lb-policy-registry.ts | 20 ++- .../src/lb-policy-registry/round-robin.ts | 2 +- .../src/lb-policy-registry/typed-struct.ts | 15 +- .../src/load-balancer-xds-wrr-locality.ts | 8 +- .../cluster-resource-type.ts | 11 +- packages/grpc-js-xds/test/framework.ts | 21 ++- .../test/test-custom-lb-policies.ts | 166 ++++++++++++++++++ packages/grpc-js-xds/test/xds-server.ts | 9 +- packages/grpc-js/src/experimental.ts | 3 +- 12 files changed, 239 insertions(+), 23 deletions(-) create mode 100644 packages/grpc-js-xds/test/test-custom-lb-policies.ts diff --git a/packages/grpc-js-xds/gulpfile.ts b/packages/grpc-js-xds/gulpfile.ts index f2e77b8bd..6f17a4020 100644 --- a/packages/grpc-js-xds/gulpfile.ts +++ b/packages/grpc-js-xds/gulpfile.ts @@ -62,6 +62,7 @@ const compile = checkTask(() => execNpmCommand('compile')); const runTests = checkTask(() => { process.env.GRPC_EXPERIMENTAL_XDS_FEDERATION = 'true'; + process.env.GRPC_EXPERIMENTAL_XDS_CUSTOM_LB_CONFIG = 'true'; return gulp.src(`${outDir}/test/**/*.js`) .pipe(mocha({reporter: 'mocha-jenkins-reporter', require: ['ts-node/register']})); diff --git a/packages/grpc-js-xds/interop/xds-interop-client.ts b/packages/grpc-js-xds/interop/xds-interop-client.ts index c28e9cc28..2893acad9 100644 --- a/packages/grpc-js-xds/interop/xds-interop-client.ts +++ b/packages/grpc-js-xds/interop/xds-interop-client.ts @@ -44,7 +44,7 @@ import parseLoadBalancingConfig = grpc.experimental.parseLoadBalancingConfig; grpc_xds.register(); -const LB_POLICY_NAME = 'RpcBehaviorLoadBalancer'; +const LB_POLICY_NAME = 'test.RpcBehaviorLoadBalancer'; class RpcBehaviorLoadBalancingConfig implements TypedLoadBalancingConfig { constructor(private rpcBehavior: string) {} diff --git a/packages/grpc-js-xds/src/index.ts b/packages/grpc-js-xds/src/index.ts index 319719bde..95c26a20a 100644 --- a/packages/grpc-js-xds/src/index.ts +++ b/packages/grpc-js-xds/src/index.ts @@ -26,6 +26,8 @@ import * as xds_wrr_locality from './load-balancer-xds-wrr-locality'; import * as router_filter from './http-filter/router-filter'; import * as fault_injection_filter from './http-filter/fault-injection-filter'; import * as csds from './csds'; +import * as round_robin_lb from './lb-policy-registry/round-robin'; +import * as typed_struct_lb from './lb-policy-registry/typed-struct'; /** * Register the "xds:" name scheme with the @grpc/grpc-js library. @@ -42,4 +44,6 @@ export function register() { router_filter.setup(); fault_injection_filter.setup(); csds.setup(); + round_robin_lb.setup(); + typed_struct_lb.setup(); } diff --git a/packages/grpc-js-xds/src/lb-policy-registry.ts b/packages/grpc-js-xds/src/lb-policy-registry.ts index 18d86655e..80a06323e 100644 --- a/packages/grpc-js-xds/src/lb-policy-registry.ts +++ b/packages/grpc-js-xds/src/lb-policy-registry.ts @@ -26,8 +26,13 @@ function trace(text: string) { const MAX_RECURSION_DEPTH = 16; +/** + * Parse a protoPolicy to a LoadBalancingConfig. A null return value indicates + * that parsing failed, but that it should not be treated as an error, and + * instead the next policy should be used. + */ interface ProtoLbPolicyConverter { - (protoPolicy: TypedExtensionConfig__Output, selectChildPolicy: (childPolicy: LoadBalancingPolicy__Output) => LoadBalancingConfig): LoadBalancingConfig + (protoPolicy: TypedExtensionConfig__Output, selectChildPolicy: (childPolicy: LoadBalancingPolicy__Output) => LoadBalancingConfig): LoadBalancingConfig | null; } interface RegisteredLbPolicy { @@ -41,20 +46,29 @@ export function registerLbPolicy(typeUrl: string, converter: ProtoLbPolicyConver } export function convertToLoadBalancingConfig(protoPolicy: LoadBalancingPolicy__Output, recursionDepth = 0): LoadBalancingConfig { + trace('Registry entries: [' + Object.keys(registry) + ']'); if (recursionDepth > MAX_RECURSION_DEPTH) { throw new Error(`convertToLoadBalancingConfig: Max recursion depth ${MAX_RECURSION_DEPTH} reached`); } for (const policyCandidate of protoPolicy.policies) { + trace('Attempting to parse config ' + JSON.stringify(policyCandidate)); const extensionConfig = policyCandidate.typed_extension_config; if (!extensionConfig?.typed_config) { continue; } const typeUrl = extensionConfig.typed_config.type_url; + trace('Attempting to parse config with type_url=' + typeUrl); + let parseResult: LoadBalancingConfig | null; if (typeUrl in registry) { try { - return registry[typeUrl].convertToLoadBalancingPolicy(extensionConfig, childPolicy => convertToLoadBalancingConfig(childPolicy, recursionDepth + 1)); + parseResult = registry[typeUrl].convertToLoadBalancingPolicy(extensionConfig, childPolicy => convertToLoadBalancingConfig(childPolicy, recursionDepth + 1)); } catch (e) { - throw new Error(`Error parsing ${typeUrl} LoadBalancingPolicy: ${(e as Error).message}`); + throw new Error(`Error parsing ${typeUrl} LoadBalancingPolicy named ${extensionConfig.name}: ${(e as Error).message}`); + } + if (parseResult) { + return parseResult; + } else { + continue; } } } diff --git a/packages/grpc-js-xds/src/lb-policy-registry/round-robin.ts b/packages/grpc-js-xds/src/lb-policy-registry/round-robin.ts index 9585bfde2..311c8c38c 100644 --- a/packages/grpc-js-xds/src/lb-policy-registry/round-robin.ts +++ b/packages/grpc-js-xds/src/lb-policy-registry/round-robin.ts @@ -20,7 +20,7 @@ import { LoadBalancingPolicy__Output } from "../generated/envoy/config/cluster/v import { TypedExtensionConfig__Output } from "../generated/envoy/config/core/v3/TypedExtensionConfig"; import { registerLbPolicy } from "../lb-policy-registry"; -const ROUND_ROBIN_TYPE_URL = 'envoy.extensions.load_balancing_policies.round_robin.v3.RoundRobin'; +const ROUND_ROBIN_TYPE_URL = 'type.googleapis.com/envoy.extensions.load_balancing_policies.round_robin.v3.RoundRobin'; function convertToLoadBalancingPolicy(protoPolicy: TypedExtensionConfig__Output, selectChildPolicy: (childPolicy: LoadBalancingPolicy__Output) => LoadBalancingConfig): LoadBalancingConfig { if (protoPolicy.typed_config?.type_url !== ROUND_ROBIN_TYPE_URL) { diff --git a/packages/grpc-js-xds/src/lb-policy-registry/typed-struct.ts b/packages/grpc-js-xds/src/lb-policy-registry/typed-struct.ts index 70a6c02b3..6b50d9e83 100644 --- a/packages/grpc-js-xds/src/lb-policy-registry/typed-struct.ts +++ b/packages/grpc-js-xds/src/lb-policy-registry/typed-struct.ts @@ -15,7 +15,7 @@ * */ -import { LoadBalancingConfig } from "@grpc/grpc-js"; +import { LoadBalancingConfig, experimental } from "@grpc/grpc-js"; import { LoadBalancingPolicy__Output } from "../generated/envoy/config/cluster/v3/LoadBalancingPolicy"; import { TypedExtensionConfig__Output } from "../generated/envoy/config/core/v3/TypedExtensionConfig"; import { registerLbPolicy } from "../lb-policy-registry"; @@ -25,16 +25,16 @@ import { Struct__Output } from "../generated/google/protobuf/Struct"; import { Value__Output } from "../generated/google/protobuf/Value"; import { TypedStruct__Output } from "../generated/xds/type/v3/TypedStruct"; -const XDS_TYPED_STRUCT_TYPE_URL = 'xds.type.v3.TypedStruct'; -const UDPA_TYPED_STRUCT_TYPE_URL = 'udpa.type.v1.TypedStruct'; +const XDS_TYPED_STRUCT_TYPE_URL = 'type.googleapis.com/xds.type.v3.TypedStruct'; +const UDPA_TYPED_STRUCT_TYPE_URL = 'type.googleapis.com/udpa.type.v1.TypedStruct'; const resourceRoot = loadProtosWithOptionsSync([ 'xds/type/v3/typed_struct.proto', 'udpa/type/v1/typed_struct.proto'], { keepCase: true, includeDirs: [ - // Paths are relative to src/build - __dirname + '/../../deps/xds/', + // Paths are relative to src/build/lb-policy-registry + __dirname + '/../../../deps/xds/', ], } ); @@ -90,7 +90,7 @@ function flattenStruct(struct: Struct__Output): FlatStruct { return result; } -function convertToLoadBalancingPolicy(protoPolicy: TypedExtensionConfig__Output, selectChildPolicy: (childPolicy: LoadBalancingPolicy__Output) => LoadBalancingConfig): LoadBalancingConfig { +function convertToLoadBalancingPolicy(protoPolicy: TypedExtensionConfig__Output, selectChildPolicy: (childPolicy: LoadBalancingPolicy__Output) => LoadBalancingConfig): LoadBalancingConfig | null { if (protoPolicy.typed_config?.type_url !== XDS_TYPED_STRUCT_TYPE_URL && protoPolicy.typed_config?.type_url !== UDPA_TYPED_STRUCT_TYPE_URL) { throw new Error(`Typed struct LB policy parsing error: unexpected type URL ${protoPolicy.typed_config?.type_url}`); } @@ -99,6 +99,9 @@ function convertToLoadBalancingPolicy(protoPolicy: TypedExtensionConfig__Output, throw new Error(`Typed struct LB parsing error: unexpected value ${typedStruct.value}`); } const policyName = typedStruct.type_url.substring(typedStruct.type_url.lastIndexOf('/') + 1); + if (!experimental.isLoadBalancerNameRegistered(policyName)) { + return null; + } return { [policyName]: flattenStruct(typedStruct.value) }; diff --git a/packages/grpc-js-xds/src/load-balancer-xds-wrr-locality.ts b/packages/grpc-js-xds/src/load-balancer-xds-wrr-locality.ts index 2a7d677b1..5faf8b8e5 100644 --- a/packages/grpc-js-xds/src/load-balancer-xds-wrr-locality.ts +++ b/packages/grpc-js-xds/src/load-balancer-xds-wrr-locality.ts @@ -113,14 +113,14 @@ class XdsWrrLocalityLoadBalancer implements LoadBalancer { } } -const WRR_LOCALITY_TYPE_URL = 'envoy.extensions.load_balancing_policies.wrr_locality.v3.WrrLocality'; +const WRR_LOCALITY_TYPE_URL = 'type.googleapis.com/envoy.extensions.load_balancing_policies.wrr_locality.v3.WrrLocality'; const resourceRoot = loadProtosWithOptionsSync([ - 'xds/type/v3/typed_struct.proto', - 'udpa/type/v1/typed_struct.proto'], { + 'envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto'], { keepCase: true, includeDirs: [ // Paths are relative to src/build + __dirname + '/../../deps/envoy-api/', __dirname + '/../../deps/xds/', __dirname + '/../../deps/protoc-gen-validate' ], @@ -155,7 +155,7 @@ function convertToLoadBalancingPolicy(protoPolicy: TypedExtensionConfig__Output, } return { [TYPE_NAME]: { - child_policy: selectChildPolicy(wrrLocalityMessage.endpoint_picking_policy) + child_policy: [selectChildPolicy(wrrLocalityMessage.endpoint_picking_policy)] } }; } diff --git a/packages/grpc-js-xds/src/xds-resource-type/cluster-resource-type.ts b/packages/grpc-js-xds/src/xds-resource-type/cluster-resource-type.ts index 726a5d2d2..1e8ea41f8 100644 --- a/packages/grpc-js-xds/src/xds-resource-type/cluster-resource-type.ts +++ b/packages/grpc-js-xds/src/xds-resource-type/cluster-resource-type.ts @@ -17,7 +17,7 @@ import { CDS_TYPE_URL, CLUSTER_CONFIG_TYPE_URL, decodeSingleResource } from "../resources"; import { XdsDecodeContext, XdsDecodeResult, XdsResourceType } from "./xds-resource-type"; -import { LoadBalancingConfig, experimental } from "@grpc/grpc-js"; +import { LoadBalancingConfig, experimental, logVerbosity } from "@grpc/grpc-js"; import { XdsServerConfig } from "../xds-bootstrap"; import { Duration__Output } from "../generated/google/protobuf/Duration"; import { OutlierDetection__Output } from "../generated/envoy/config/cluster/v3/OutlierDetection"; @@ -32,6 +32,13 @@ import SuccessRateEjectionConfig = experimental.SuccessRateEjectionConfig; import FailurePercentageEjectionConfig = experimental.FailurePercentageEjectionConfig; import parseLoadBalancingConfig = experimental.parseLoadBalancingConfig; +const TRACER_NAME = 'xds_client'; + +function trace(text: string): void { + experimental.trace(logVerbosity.DEBUG, TRACER_NAME, text); +} + + export interface CdsUpdate { type: 'AGGREGATE' | 'EDS' | 'LOGICAL_DNS'; name: string; @@ -128,11 +135,13 @@ export class ClusterResourceType extends XdsResourceType { try { lbPolicyConfig = convertToLoadBalancingConfig(message.load_balancing_policy); } catch (e) { + trace('LB policy config parsing failed with error ' + e); return null; } try { parseLoadBalancingConfig(lbPolicyConfig); } catch (e) { + trace('LB policy config parsing failed with error ' + e); return null; } } else if (message.lb_policy === 'ROUND_ROBIN') { diff --git a/packages/grpc-js-xds/test/framework.ts b/packages/grpc-js-xds/test/framework.ts index f5e7bc1de..f89a4680f 100644 --- a/packages/grpc-js-xds/test/framework.ts +++ b/packages/grpc-js-xds/test/framework.ts @@ -28,6 +28,7 @@ import { CLUSTER_CONFIG_TYPE_URL, HTTP_CONNECTION_MANGER_TYPE_URL } from "../src import { LocalityLbEndpoints } from "../src/generated/envoy/config/endpoint/v3/LocalityLbEndpoints"; import { LbEndpoint } from "../src/generated/envoy/config/endpoint/v3/LbEndpoint"; import { ClusterConfig } from "../src/generated/envoy/extensions/clusters/aggregate/v3/ClusterConfig"; +import { Any } from "../src/generated/google/protobuf/Any"; interface Endpoint { locality: Locality; @@ -69,7 +70,7 @@ export interface FakeCluster { } export class FakeEdsCluster implements FakeCluster { - constructor(private clusterName: string, private endpointName: string, private endpoints: Endpoint[]) {} + constructor(private clusterName: string, private endpointName: string, private endpoints: Endpoint[], private loadBalancingPolicyOverride?: Any) {} getEndpointConfig(): ClusterLoadAssignment { return { @@ -79,11 +80,10 @@ export class FakeEdsCluster implements FakeCluster { } getClusterConfig(): Cluster { - return { + const result: Cluster = { name: this.clusterName, type: 'EDS', eds_cluster_config: {eds_config: {ads: {}}, service_name: this.endpointName}, - lb_policy: 'ROUND_ROBIN', lrs_server: {self: {}}, circuit_breakers: { thresholds: [ @@ -93,7 +93,22 @@ export class FakeEdsCluster implements FakeCluster { } ] } + }; + if (this.loadBalancingPolicyOverride) { + result.load_balancing_policy = { + policies: [ + { + typed_extension_config: { + 'name': 'test', + typed_config: this.loadBalancingPolicyOverride + } + } + ] + } + } else { + result.lb_policy = 'ROUND_ROBIN'; } + return result; } getAllClusterConfigs(): Cluster[] { diff --git a/packages/grpc-js-xds/test/test-custom-lb-policies.ts b/packages/grpc-js-xds/test/test-custom-lb-policies.ts new file mode 100644 index 000000000..7493a23f0 --- /dev/null +++ b/packages/grpc-js-xds/test/test-custom-lb-policies.ts @@ -0,0 +1,166 @@ +/* + * Copyright 2023 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import { AnyExtension } from "@grpc/proto-loader"; +import { Any } from "../src/generated/google/protobuf/Any"; +import { Backend } from "./backend"; +import { XdsTestClient } from "./client"; +import { FakeEdsCluster, FakeRouteGroup } from "./framework"; +import { XdsServer } from "./xds-server"; +import * as assert from 'assert'; +import { WrrLocality } from "../src/generated/envoy/extensions/load_balancing_policies/wrr_locality/v3/WrrLocality"; +import { TypedStruct } from "../src/generated/xds/type/v3/TypedStruct"; + +describe('Custom LB policies', () => { + let xdsServer: XdsServer; + let client: XdsTestClient; + beforeEach(done => { + xdsServer = new XdsServer(); + xdsServer.startServer(error => { + done(error); + }); + }); + afterEach(() => { + client?.close(); + xdsServer?.shutdownServer(); + }); + it('Should handle round_robin', done => { + const lbPolicy: Any = { + '@type': 'type.googleapis.com/envoy.extensions.load_balancing_policies.round_robin.v3.RoundRobin' + }; + const cluster = new FakeEdsCluster('cluster1', 'endpoint1', [{backends: [new Backend()], locality:{region: 'region1'}}], lbPolicy); + const routeGroup = new FakeRouteGroup('listener1', 'route1', [{cluster: cluster}]); + routeGroup.startAllBackends().then(() => { + xdsServer.setEdsResource(cluster.getEndpointConfig()); + xdsServer.setCdsResource(cluster.getClusterConfig()); + xdsServer.setRdsResource(routeGroup.getRouteConfiguration()); + xdsServer.setLdsResource(routeGroup.getListener()); + xdsServer.addResponseListener((typeUrl, responseState) => { + if (responseState.state === 'NACKED') { + client.stopCalls(); + assert.fail(`Client NACKED ${typeUrl} resource with message ${responseState.errorMessage}`); + } + }) + client = XdsTestClient.createFromServer('listener1', xdsServer); + client.sendOneCall(done); + }, reason => done(reason)); + }); + it('Should handle xds_wrr_locality with round_robin child', done => { + const lbPolicy: WrrLocality & AnyExtension = { + '@type': 'type.googleapis.com/envoy.extensions.load_balancing_policies.wrr_locality.v3.WrrLocality', + endpoint_picking_policy: { + policies: [ + { + typed_extension_config: { + name: 'child', + typed_config: { + '@type': 'type.googleapis.com/envoy.extensions.load_balancing_policies.round_robin.v3.RoundRobin' + } + } + } + ] + } + }; + const cluster = new FakeEdsCluster('cluster1', 'endpoint1', [{backends: [new Backend()], locality:{region: 'region1'}}], lbPolicy); + const routeGroup = new FakeRouteGroup('listener1', 'route1', [{cluster: cluster}]); + routeGroup.startAllBackends().then(() => { + xdsServer.setEdsResource(cluster.getEndpointConfig()); + xdsServer.setCdsResource(cluster.getClusterConfig()); + xdsServer.setRdsResource(routeGroup.getRouteConfiguration()); + xdsServer.setLdsResource(routeGroup.getListener()); + xdsServer.addResponseListener((typeUrl, responseState) => { + if (responseState.state === 'NACKED') { + client.stopCalls(); + assert.fail(`Client NACKED ${typeUrl} resource with message ${responseState.errorMessage}`); + } + }) + client = XdsTestClient.createFromServer('listener1', xdsServer); + client.sendOneCall(done); + }, reason => done(reason)); + }); + it('Should handle a typed_struct policy', done => { + const lbPolicy: TypedStruct & AnyExtension = { + '@type': 'type.googleapis.com/xds.type.v3.TypedStruct', + type_url: 'round_robin', + value: { + fields: {} + } + }; + const cluster = new FakeEdsCluster('cluster1', 'endpoint1', [{backends: [new Backend()], locality:{region: 'region1'}}], lbPolicy); + const routeGroup = new FakeRouteGroup('listener1', 'route1', [{cluster: cluster}]); + routeGroup.startAllBackends().then(() => { + xdsServer.setEdsResource(cluster.getEndpointConfig()); + xdsServer.setCdsResource(cluster.getClusterConfig()); + xdsServer.setRdsResource(routeGroup.getRouteConfiguration()); + xdsServer.setLdsResource(routeGroup.getListener()); + xdsServer.addResponseListener((typeUrl, responseState) => { + if (responseState.state === 'NACKED') { + client.stopCalls(); + assert.fail(`Client NACKED ${typeUrl} resource with message ${responseState.errorMessage}`); + } + }) + client = XdsTestClient.createFromServer('listener1', xdsServer); + client.sendOneCall(done); + }, reason => done(reason)); + }); + it('Should handle xds_wrr_locality with an unrecognized first child', done => { + const invalidChildPolicy: TypedStruct & AnyExtension = { + '@type': 'type.googleapis.com/xds.type.v3.TypedStruct', + type_url: 'test.ThisLoadBalancerDoesNotExist', + value: { + fields: {} + } + } + const lbPolicy: WrrLocality & AnyExtension = { + '@type': 'type.googleapis.com/envoy.extensions.load_balancing_policies.wrr_locality.v3.WrrLocality', + endpoint_picking_policy: { + policies: [ + { + typed_extension_config: { + name: 'child', + typed_config: invalidChildPolicy + } + }, + { + typed_extension_config: { + name: 'child', + typed_config: { + '@type': 'type.googleapis.com/envoy.extensions.load_balancing_policies.round_robin.v3.RoundRobin' + } + } + } + ] + } + }; + const cluster = new FakeEdsCluster('cluster1', 'endpoint1', [{backends: [new Backend()], locality:{region: 'region1'}}], lbPolicy); + const routeGroup = new FakeRouteGroup('listener1', 'route1', [{cluster: cluster}]); + routeGroup.startAllBackends().then(() => { + xdsServer.setEdsResource(cluster.getEndpointConfig()); + xdsServer.setCdsResource(cluster.getClusterConfig()); + xdsServer.setRdsResource(routeGroup.getRouteConfiguration()); + xdsServer.setLdsResource(routeGroup.getListener()); + xdsServer.addResponseListener((typeUrl, responseState) => { + if (responseState.state === 'NACKED') { + client.stopCalls(); + assert.fail(`Client NACKED ${typeUrl} resource with message ${responseState.errorMessage}`); + } + }) + client = XdsTestClient.createFromServer('listener1', xdsServer); + client.sendOneCall(done); + }, reason => done(reason)); + }); +}); diff --git a/packages/grpc-js-xds/test/xds-server.ts b/packages/grpc-js-xds/test/xds-server.ts index c9b829642..6f021c176 100644 --- a/packages/grpc-js-xds/test/xds-server.ts +++ b/packages/grpc-js-xds/test/xds-server.ts @@ -36,12 +36,15 @@ const loadedProtos = loadPackageDefinition(loadSync( [ 'envoy/service/discovery/v3/ads.proto', 'envoy/service/load_stats/v3/lrs.proto', - 'envoy/config/listener/v3/listener.proto', + 'envoy/config/listener/v3/listener.proto', 'envoy/config/route/v3/route.proto', 'envoy/config/cluster/v3/cluster.proto', 'envoy/config/endpoint/v3/endpoint.proto', 'envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto', - 'envoy/extensions/clusters/aggregate/v3/cluster.proto' + 'envoy/extensions/clusters/aggregate/v3/cluster.proto', + 'envoy/extensions/load_balancing_policies/round_robin/v3/round_robin.proto', + 'envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto', + 'xds/type/v3/typed_struct.proto' ], { keepCase: true, @@ -319,7 +322,7 @@ export class XdsServer { callback(error, port); }); } - + shutdownServer() { this.server?.forceShutdown(); } diff --git a/packages/grpc-js/src/experimental.ts b/packages/grpc-js/src/experimental.ts index e4bd164ec..42fd577ca 100644 --- a/packages/grpc-js/src/experimental.ts +++ b/packages/grpc-js/src/experimental.ts @@ -16,7 +16,8 @@ export { createChildChannelControlHelper, registerLoadBalancerType, selectLbConfigFromList, - parseLoadBalancingConfig + parseLoadBalancingConfig, + isLoadBalancerNameRegistered } from './load-balancer'; export { SubchannelAddress, From fa26f4f70f80979661429d5a9e44d07ffe4b6890 Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Wed, 23 Aug 2023 14:36:49 -0700 Subject: [PATCH 6/8] Add spec links --- packages/grpc-js-xds/src/lb-policy-registry.ts | 2 ++ packages/grpc-js-xds/src/lb-policy-registry/round-robin.ts | 2 ++ packages/grpc-js-xds/src/lb-policy-registry/typed-struct.ts | 2 ++ packages/grpc-js-xds/src/load-balancer-xds-wrr-locality.ts | 2 ++ 4 files changed, 8 insertions(+) diff --git a/packages/grpc-js-xds/src/lb-policy-registry.ts b/packages/grpc-js-xds/src/lb-policy-registry.ts index 80a06323e..f7aa74254 100644 --- a/packages/grpc-js-xds/src/lb-policy-registry.ts +++ b/packages/grpc-js-xds/src/lb-policy-registry.ts @@ -15,6 +15,8 @@ * */ +// https://github.com/grpc/proposal/blob/master/A52-xds-custom-lb-policies.md + import { LoadBalancingConfig, experimental, logVerbosity } from "@grpc/grpc-js"; import { LoadBalancingPolicy__Output } from "./generated/envoy/config/cluster/v3/LoadBalancingPolicy"; import { TypedExtensionConfig__Output } from "./generated/envoy/config/core/v3/TypedExtensionConfig"; diff --git a/packages/grpc-js-xds/src/lb-policy-registry/round-robin.ts b/packages/grpc-js-xds/src/lb-policy-registry/round-robin.ts index 311c8c38c..b43b1c9e3 100644 --- a/packages/grpc-js-xds/src/lb-policy-registry/round-robin.ts +++ b/packages/grpc-js-xds/src/lb-policy-registry/round-robin.ts @@ -15,6 +15,8 @@ * */ +// https://github.com/grpc/proposal/blob/master/A52-xds-custom-lb-policies.md + import { LoadBalancingConfig } from "@grpc/grpc-js"; import { LoadBalancingPolicy__Output } from "../generated/envoy/config/cluster/v3/LoadBalancingPolicy"; import { TypedExtensionConfig__Output } from "../generated/envoy/config/core/v3/TypedExtensionConfig"; diff --git a/packages/grpc-js-xds/src/lb-policy-registry/typed-struct.ts b/packages/grpc-js-xds/src/lb-policy-registry/typed-struct.ts index 6b50d9e83..9ae0b32ee 100644 --- a/packages/grpc-js-xds/src/lb-policy-registry/typed-struct.ts +++ b/packages/grpc-js-xds/src/lb-policy-registry/typed-struct.ts @@ -15,6 +15,8 @@ * */ +// https://github.com/grpc/proposal/blob/master/A52-xds-custom-lb-policies.md + import { LoadBalancingConfig, experimental } from "@grpc/grpc-js"; import { LoadBalancingPolicy__Output } from "../generated/envoy/config/cluster/v3/LoadBalancingPolicy"; import { TypedExtensionConfig__Output } from "../generated/envoy/config/core/v3/TypedExtensionConfig"; diff --git a/packages/grpc-js-xds/src/load-balancer-xds-wrr-locality.ts b/packages/grpc-js-xds/src/load-balancer-xds-wrr-locality.ts index 5faf8b8e5..8636937fd 100644 --- a/packages/grpc-js-xds/src/load-balancer-xds-wrr-locality.ts +++ b/packages/grpc-js-xds/src/load-balancer-xds-wrr-locality.ts @@ -15,6 +15,8 @@ * */ +// https://github.com/grpc/proposal/blob/master/A52-xds-custom-lb-policies.md + import { LoadBalancingConfig, experimental, logVerbosity } from "@grpc/grpc-js"; import { loadProtosWithOptionsSync } from "@grpc/proto-loader/build/src/util"; import { WeightedTargetRaw } from "./load-balancer-weighted-target"; From c8b5d3119b87dc5e4b0d3468aac8fea98768bb37 Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Wed, 23 Aug 2023 16:13:00 -0700 Subject: [PATCH 7/8] Fix missing proto file references --- packages/grpc-js-xds/package.json | 2 ++ packages/grpc-js-xds/src/lb-policy-registry/typed-struct.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/packages/grpc-js-xds/package.json b/packages/grpc-js-xds/package.json index 3c61b7383..b43304cea 100644 --- a/packages/grpc-js-xds/package.json +++ b/packages/grpc-js-xds/package.json @@ -59,6 +59,7 @@ "build/src/**/*.{js,d.ts,js.map}", "deps/envoy-api/envoy/admin/v3/**/*.proto", "deps/envoy-api/envoy/config/**/*.proto", + "deps/envoy-api/envoy/data/**/*.proto", "deps/envoy-api/envoy/service/**/*.proto", "deps/envoy-api/envoy/type/**/*.proto", "deps/envoy-api/envoy/annotations/**/*.proto", @@ -66,6 +67,7 @@ "deps/googleapis/google/api/**/*.proto", "deps/googleapis/google/protobuf/**/*.proto", "deps/googleapis/google/rpc/**/*.proto", + "deps/protoc-gen-validate/**/*.proto", "deps/xds/udpa/annotations/**/*.proto", "deps/xds/udpa/type/**/*.proto", "deps/xds/xds/annotations/**/*.proto", diff --git a/packages/grpc-js-xds/src/lb-policy-registry/typed-struct.ts b/packages/grpc-js-xds/src/lb-policy-registry/typed-struct.ts index 9ae0b32ee..b310782d7 100644 --- a/packages/grpc-js-xds/src/lb-policy-registry/typed-struct.ts +++ b/packages/grpc-js-xds/src/lb-policy-registry/typed-struct.ts @@ -37,6 +37,7 @@ const resourceRoot = loadProtosWithOptionsSync([ includeDirs: [ // Paths are relative to src/build/lb-policy-registry __dirname + '/../../../deps/xds/', + __dirname + '/../../../deps/protoc-gen-validate' ], } ); From 91631ba11c8837c9dc01c889716da604ade3b104 Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Thu, 24 Aug 2023 10:02:30 -0700 Subject: [PATCH 8/8] Update XdsClusterImpl LB policy to accept unset LRS config --- .../src/load-balancer-xds-cluster-impl.ts | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/packages/grpc-js-xds/src/load-balancer-xds-cluster-impl.ts b/packages/grpc-js-xds/src/load-balancer-xds-cluster-impl.ts index 4050a3cf8..926c7a699 100644 --- a/packages/grpc-js-xds/src/load-balancer-xds-cluster-impl.ts +++ b/packages/grpc-js-xds/src/load-balancer-xds-cluster-impl.ts @@ -79,7 +79,7 @@ class XdsClusterImplLoadBalancingConfig implements TypedLoadBalancingConfig { }; } - constructor(private cluster: string, private dropCategories: DropCategory[], private childPolicy: TypedLoadBalancingConfig, private edsServiceName: string, private lrsLoadReportingServer: XdsServerConfig, maxConcurrentRequests?: number) { + constructor(private cluster: string, private dropCategories: DropCategory[], private childPolicy: TypedLoadBalancingConfig, private edsServiceName: string, private lrsLoadReportingServer?: XdsServerConfig, maxConcurrentRequests?: number) { this.maxConcurrentRequests = maxConcurrentRequests ?? DEFAULT_MAX_CONCURRENT_REQUESTS; } @@ -127,7 +127,11 @@ class XdsClusterImplLoadBalancingConfig implements TypedLoadBalancingConfig { if (!childConfig) { throw new Error('xds_cluster_impl config child_policy parsing failed'); } - return new XdsClusterImplLoadBalancingConfig(obj.cluster, obj.drop_categories.map(validateDropCategory), childConfig, obj.eds_service_name, validateXdsServerConfig(obj.lrs_load_reporting_server), obj.max_concurrent_requests); + let lrsServer: XdsServerConfig | undefined = undefined; + if (obj.lrs_load_reporting_server) { + lrsServer = validateXdsServerConfig(obj.lrs_load_reporting_server) + } + return new XdsClusterImplLoadBalancingConfig(obj.cluster, obj.drop_categories.map(validateDropCategory), childConfig, obj.eds_service_name, lrsServer, obj.max_concurrent_requests); } } @@ -156,7 +160,7 @@ class CallCounterMap { const callCounterMap = new CallCounterMap(); class LocalitySubchannelWrapper extends BaseSubchannelWrapper implements SubchannelInterface { - constructor(child: SubchannelInterface, private statsObject: XdsClusterLocalityStats) { + constructor(child: SubchannelInterface, private statsObject: XdsClusterLocalityStats | null) { super(child); } @@ -210,12 +214,12 @@ class XdsClusterImplPicker implements Picker { subchannel: pickSubchannel?.getWrappedSubchannel() ?? null, onCallStarted: () => { originalPick.onCallStarted?.(); - pickSubchannel?.getStatsObject().addCallStarted(); + pickSubchannel?.getStatsObject()?.addCallStarted(); callCounterMap.startCall(this.callCounterMapKey); }, onCallEnded: status => { originalPick.onCallEnded?.(status); - pickSubchannel?.getStatsObject().addCallFinished(status !== Status.OK) + pickSubchannel?.getStatsObject()?.addCallFinished(status !== Status.OK) callCounterMap.endCall(this.callCounterMapKey); } }; @@ -253,12 +257,16 @@ class XdsClusterImplBalancer implements LoadBalancer { } const locality = (subchannelAddress as LocalitySubchannelAddress).locality ?? ''; const wrapperChild = channelControlHelper.createSubchannel(subchannelAddress, subchannelArgs); - const statsObj = this.xdsClient.addClusterLocalityStats( - this.latestConfig.getLrsLoadReportingServer(), - this.latestConfig.getCluster(), - this.latestConfig.getEdsServiceName(), - locality - ); + const lrsServer = this.latestConfig.getLrsLoadReportingServer(); + let statsObj: XdsClusterLocalityStats | null = null; + if (lrsServer) { + statsObj = this.xdsClient.addClusterLocalityStats( + lrsServer, + this.latestConfig.getCluster(), + this.latestConfig.getEdsServiceName(), + locality + ); + } return new LocalitySubchannelWrapper(wrapperChild, statsObj); }, updateState: (connectivityState, originalPicker) => {