Repository navigation
Closed
Labels
area/configurationquestionQuestions that are neither investigations, bugs, nor enhancementsstalestalebot believes this issue/PR has not been touched recently
Description
Description:
I'm trying to use the postgres_proxy filter in a cluster and I get the error Didn't find a registered implementation for name: 'envoy.filters.network.postgres_proxy' It is listed as a supported filter here and I tried using it in a listener in a different configuration and it worked fine there.
Config:
static_resources:
listeners:
- name: postgres_listener
address:
socket_address:
address: 0.0.0.0
port_value: 10000
filter_chains:
- filters:
- name: envoy.filters.network.http_connection_manager
typed_config:
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
codec_type: AUTO
http_filters:
- name: envoy.filters.http.router
stat_prefix: ingress_http
route_config:
name: test_route
virtual_hosts:
- domains:
- milvus.milvus:19530
- milvus.milvus.svc:19530
- milvus.milvus.svc.cluster.local:19530
name: milvus.milvus:19530
routes:
- match:
prefix: /
route:
cluster: milvus.milvus:5432
- domains:
- postgres-postgresql.postgres:5432
- postgres-postgresql.postgres.svc:5432
- postgres-postgresql.postgres.svc.cluster.local:5432
name: postgres-postgresql.postgres:5432
routes:
- match:
prefix: /
route:
cluster: postgres-postgresql.postgres:5432
- domains:
- '*'
name: wildcard
routes:
- match:
prefix: /milvus.milvus:19530
route:
cluster: milvus.milvus:19530
prefix_rewrite: /
- match:
prefix: /milvus.milvus.svc:19530
route:
cluster: milvus.milvus:19530
prefix_rewrite: /
- match:
prefix: /milvus.milvus.svc.cluster.local:19530
route:
cluster: milvus.milvus:19530
prefix_rewrite: /
- match:
prefix: /postgres-postgresql.postgres:5432
route:
cluster: postgres-postgresql.postgres:5432
prefix_rewrite: /
- match:
prefix: /postgres-postgresql.postgres.svc:5432
route:
cluster: postgres-postgresql.postgres:5432
prefix_rewrite: /
- match:
prefix: /postgres-postgresql.postgres.svc.cluster.local:5432
route:
cluster: postgres-postgresql.postgres:5432
prefix_rewrite: /
listener_filters:
- name: envoy.filters.listener.original_dst
typed_config: {}
clusters:
- name: postgres-postgresql:5432
connect_timeout: 10s
type: STRICT_DNS
lb_policy: ROUND_ROBIN
filters:
- name: envoy.filters.network.postgres_proxy
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.postgres_proxy.v3alpha.PostgresProxy
stat_prefix: egress_postgres
load_assignment:
cluster_name: postgres-postgresql:5432
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: postgres-postgresql
port_value: 5432
- name: milvus.milvus:19530
connect_timeout: 10s
type: STRICT_DNS
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: milvus.milvus:19530
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: milvus.milvus
port_value: 19530
http2_protocol_options: {}
admin:
address:
socket_address:
address: 0.0.0.0
port_value: 8001Logs:
[2021-05-20 16:19:56.972][1][info][config] [source/server/configuration_impl.cc:94] loading 3 cluster(s)
[2021-05-20 16:19:56.973][1][critical][main] [source/server/server.cc:113] error initializing configuration '/etc/postgres-proxy.yaml': Didn't find a registered implementation for name: 'envoy.filters.network.postgres_proxy'
[2021-05-20 16:19:56.973][1][info][main] [source/server/server.cc:823] exiting
Metadata
Metadata
Assignees
Labels
area/configurationquestionQuestions that are neither investigations, bugs, nor enhancementsstalestalebot believes this issue/PR has not been touched recently
Activity
moderation commentedon May 20, 2021
This means that the Envoy binary you are using doesn't have the Postgres extension included / compiled. What version of Envoy are you using here? I think the Postgres filter was added in 1.15.0 - https://www.envoyproxy.io/docs/envoy/v1.18.3/version_history/v1.15.0#new-features
ajsalow commentedon May 20, 2021
@moderation I'm using the latest docker dev image, envoyproxy/envoy-dev. So I would be using 1.19+. Like I said, if I use the filter in a listener, it works fine. Are you able to use it in a cluster?
moderation commentedon May 20, 2021
Looking at the config a little closer I notice there isn't a
clusters:stanza and you have a misspelling for your filter withfitlersso there may be additional config issues. I'm not familiar with setting filter's on the cluster. The documentation is for a listener filter - https://www.envoyproxy.io/docs/envoy/latest/configuration/listeners/network_filters/postgres_proxy_filter#config-network-filters-postgres-proxy. The Postgres sandbox and config don't set filters on the cluster for exampleajsalow commentedon May 21, 2021
@moderation good catch on the misspelling.
clusters:actually was in my config, it just got lost in the copy & paste somehow. I've updated my config in the original post to match my exact config I am running. I'm still getting the original error oferror initializing configuration '/etc/postgres-proxy.yaml': Didn't find a registered implementation for name: 'envoy.filters.network.postgres_proxy'Can you try and reproduce? Is it true that all listener filters should also be supported by clusters? This page contains a link to supported filters but these filters under the listener section, I'm not sure if that matters.soulxu commentedon May 23, 2021
The upstream filter should be registered as
NamedUpstreamNetworkFilterConfigFactoryhttps://github.com/envoyproxy/envoy/blob/main/source/common/upstream/upstream_impl.cc#L872but I didn't find any filter registered as
NamedUpstreamNetworkFilterConfigFactory, included Postgres filter, https://github.com/envoyproxy/envoy/blob/main/source/extensions/filters/network/postgres_proxy/config.cc#L33ajsalow commentedon Jun 2, 2021
@moderation @alyssawilk https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/upstream_filters explains that there are no upstream filters available out of the box. It is confusing to then list all the network filters as "supported" upstream filters here. Additionally, I think more documentation and examples of how to use upstream filters is needed.
I'm curious how I can take send http traffic to a cluster and then give the cluster and upstream tcp filter so the upstream gets tcp bytes. I don't see how I would do this though because the tcp network filter requires exactly one cluster as an argument. Maybe I'm misunderstanding what cluster filters are meant to do though.
Specifically in the below configuration I would like to not have to send the http traffic back to my self on port 10002 before converting it to tcp and sending it to the postgres port. I would like to have the httpconnectionmanager send it to a cluster that has a tcp cluster filter and sends it straight to postgres.
downstream.yaml
upstream.yaml
I would like my upstream to look something like this.
docs: clarifying upstream filter docs (#16803)
github-actions commentedon Jul 2, 2021
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
github-actions commentedon Jul 9, 2021
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.
docs: clarifying upstream filter docs (envoyproxy#16803)