Skip to content

v2 tcp proxy filter config with deprecated_v1 field conflict #2441

@junr03

Description

@junr03

Description:
Currently, when the listener is creating network level filters, it uses the deprecated_v1 field as a boolean indicator to load a v1 config from an opaque value field.

if (filter_config->getBoolean("deprecated_v1", false)) {
callback = factory.createFilterFactory(*filter_config->getObject("value", true), context);
} else {
auto message = Config::Utility::translateToFactoryConfig(proto_config, factory);
callback = factory.createFilterFactoryFromProto(*message, context);
}
. However, this approach conflicts with the actual deprecated_v1 field in the tcp proxy config https://github.com/envoyproxy/data-plane-api/blob/master/api/filter/network/tcp_proxy.proto#L113. This means that it is not possible to use a v2 tcp filter config with a deprecated_v1 field in it.

So for example, this config will fail:

- address:
    socket_address: {address: 0.0.0.0, port_value: 9414, protocol: TCP}
  filter_chains:
  - filters:
    - name: envoy.tcp_proxy 
       config:
        deprecated_v1: {cluster: foo}
        stat_prefix: foo

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions