@@ -11,6 +11,95 @@ metadata:
1111 annotations : {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
1212 {{- end }}
1313data :
14+ {{- if .Values.proxy.enabled }}
15+ redis-proxy-default.yaml : |-
16+ overload_manager:
17+ resource_monitors:
18+ - name: "envoy.resource_monitors.global_downstream_max_connections"
19+ typed_config:
20+ "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig
21+ max_active_downstream_connections: 10000
22+ static_resources:
23+ listeners:
24+ - name: redis_listener
25+ address:
26+ socket_address:
27+ address: 0.0.0.0
28+ port_value: {{ .Values.proxy.containerPorts.proxy }}
29+ filter_chains:
30+ - filters:
31+ - name: envoy.filters.network.redis_proxy
32+ typed_config:
33+ "@type": type.googleapis.com/envoy.extensions.filters.network.redis_proxy.v3.RedisProxy
34+ stat_prefix: egress_redis
35+ settings:
36+ op_timeout: 5s
37+ prefix_routes:
38+ catch_all_route:
39+ cluster: redis_cluster
40+ downstream_auth_username:
41+ inline_string: "default"
42+ downstream_auth_passwords:
43+ - inline_string: {REDIS_PASSWORD}
44+ {{- if .Values.tls.enabled }}
45+ transport_socket:
46+ name: envoy.transport_sockets.tls
47+ typed_config:
48+ "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext
49+ require_client_certificate: true
50+ common_tls_context:
51+ tls_certificates:
52+ - certificate_chain:
53+ filename: {{ template "redis-cluster.tlsCert" . }}
54+ private_key:
55+ filename: {{ template "redis-cluster.tlsCertKey" . }}
56+ validation_context:
57+ trusted_ca:
58+ filename: {{ template "redis-cluster.tlsCACert" . }}
59+ {{- end }}
60+ clusters:
61+ - name: redis_cluster
62+ cluster_type:
63+ name: envoy.clusters.redis
64+ typed_config:
65+ "@type": type.googleapis.com/google.protobuf.Struct
66+ value:
67+ cluster_refresh_rate: 30s
68+ cluster_refresh_timeout: 10s
69+ connect_timeout: 4s
70+ dns_lookup_family: V4_ONLY
71+ lb_policy: CLUSTER_PROVIDED
72+ load_assignment:
73+ cluster_name: redis_cluster
74+ endpoints:
75+ lb_endpoints:
76+ endpoint:
77+ address:
78+ socket_address: { address: 127.0.0.1, port_value: {{ .Values.redis.containerPorts.redis | quote }} }
79+ typed_extension_protocol_options:
80+ envoy.filters.network.redis_proxy:
81+ "@type": type.googleapis.com/google.protobuf.Struct
82+ value:
83+ auth_username:
84+ inline_string: "default"
85+ auth_password:
86+ inline_string: {REDIS_PASSWORD}
87+ {{- if .Values.tls.enabled }}
88+ transport_socket:
89+ name: envoy.transport_sockets.tls
90+ typed_config:
91+ "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext
92+ common_tls_context:
93+ tls_certificates:
94+ certificate_chain:
95+ filename: {{ template "redis-cluster.tlsCert" . }}
96+ private_key:
97+ filename: {{ template "redis-cluster.tlsCertKey" . }}
98+ validation_context:
99+ trusted_ca:
100+ filename: {{ template "redis-cluster.tlsCACert" . }}
101+ {{- end }}
102+ {{- end }}
14103 redis-default.conf : |-
15104 # Redis configuration file example.
16105 #
0 commit comments