2020-12-04 14:05:35 +00:00
|
|
|
{{- if index .Values "redis-cluster" "enabled" }}
|
|
|
|
apiVersion: networking.istio.io/v1alpha3
|
|
|
|
kind: EnvoyFilter
|
|
|
|
metadata:
|
|
|
|
name: {{ .Release.Namespace }}-{{ .Release.Name }}-redis-proxy
|
|
|
|
namespace: istio-ingress
|
|
|
|
spec:
|
|
|
|
workloadSelector:
|
|
|
|
labels:
|
|
|
|
istio: private-ingressgateway
|
|
|
|
configPatches:
|
|
|
|
- applyTo: NETWORK_FILTER
|
|
|
|
match:
|
|
|
|
context: GATEWAY
|
|
|
|
listener:
|
|
|
|
name: 0.0.0.0_{{ index .Values "redis-cluster" "redisPort" }}
|
|
|
|
filterChain:
|
|
|
|
filter:
|
|
|
|
name: "envoy.filters.network.tcp_proxy"
|
|
|
|
patch:
|
|
|
|
operation: REPLACE
|
|
|
|
value:
|
|
|
|
name: envoy.redis_proxy
|
|
|
|
typed_config:
|
2021-03-22 16:00:54 +00:00
|
|
|
"@type": type.googleapis.com/envoy.extensions.filters.network.redis_proxy.v3.RedisProxy
|
2020-12-04 14:05:35 +00:00
|
|
|
stat_prefix: redis_stats
|
|
|
|
prefix_routes:
|
|
|
|
catch_all_route:
|
|
|
|
cluster: {{ .Release.Namespace }}-{{ .Release.Name }}-redis-cluster
|
|
|
|
settings:
|
|
|
|
op_timeout: 5s
|
|
|
|
enable_redirection: true
|
|
|
|
enable_command_stats: true
|
|
|
|
read_policy: PREFER_REPLICA
|
|
|
|
{{- end }}
|