My Envoyfilter yaml file looks like this:
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: rds-envoyfilter
namespace: istio-system
spec:
workloadSelector:
labels:
app: productpage
configPatches:
- applyTo: HTTP_FILTER
match:
context: SIDECAR_INBOUND
listener:
filterChain:
filter:
name: envoy.filters.network.http_connection_manager
patch:
operation: INSERT_BEFORE
value:
name: envoy.filters.http.local_ratelimit_test
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.local_ratelimit.v3.LocalRateLimit
stat_prefix: http_local_rate_limiter
- applyTo: NETWORK_FILTER
match:
context: SIDECAR_INBOUND
listener:
filterChain:
filter:
name: envoy.filters.network.http_connection_manager
patch:
operation: MERGE
value:
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
useRemoteAddress: true
rds:
routeConfigName: test_route
configSource:
resource_api_version: V3
apiConfigSource:
apiType: REST
transportApiVersion: V3
refreshDelay: 1s
clusterNames:
- rds_test
- applyTo: CLUSTER
match:
cluster:
service: rds.default.svc.cluster.local
patch:
operation: ADD
value: # cluster specification
name: rds_test
type: STRICT_DNS
connect_timeout: 10s
lb_policy: ROUND_ROBIN
http2_protocol_options: {}
load_assignment:
cluster_name: rds_test
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: rds.default.svc.cluster.local
port_value: 8080
When I apply it, Envoy-proxy logs show warning envoy config gRPC config for type.googleapis.com/envoy.config.listener.v3.Listener rejected: Error adding/updating listener(s) virtualInbound: envoy.config.core.v3.ApiConfigSource must have a statically defined non-EDS cluster: 'rds_test' does not exist, was added via api, or is an EDS cluster
. And I run istioctl pc cluster productpage-v1-6b746f74dc-kx4t6.default
SERVICE FQDN PORT SUBSET DIRECTION TYPE DESTINATION RULE
rds.default.svc.cluster.local 8080 - outbound EDS
rds_test - - - STRICT_DNS
You see, rds_test cluster exists and type is STRICT_DNS
, so I guess, the log information demonstrates that I cannot specify RDS because the rds_test
cluster is add by api ? And if so, how could I add an RDS?