Skip to content

Commit 3d3bdca

Browse files
committed
chore(redis-cluster): update envoy proxy version
1 parent 0513bd3 commit 3d3bdca

11 files changed

Lines changed: 121 additions & 38 deletions

File tree

addons/redis-cluster/7.0/chart/redis-cluster/templates/configmap.yaml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,95 @@ metadata:
1111
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
1212
{{- end }}
1313
data:
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
#

addons/redis-cluster/7.0/chart/redis-cluster/templates/redis-statefulset.yaml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -318,17 +318,12 @@ spec:
318318
break
319319
fi
320320
done
321-
# Start redis cluster proxy
321+
# Start envoy redis proxy
322322
{{- if .Values.usePasswordFile }}
323323
export REDIS_PASSWORD="$(< "${REDIS_PASSWORD_FILE}")"
324324
{{- end }}
325-
redis-cluster-proxy \
326-
-startup-nodes=127.0.0.1:{{ .Values.redis.containerPorts.redis }} \
327-
-addr=0.0.0.0:{{ .Values.proxy.containerPorts.proxy }} \
328-
-password=$(REDIS_PASSWORD) \
329-
-max-procs={{ .Values.proxy.maxProcs }} \
330-
-backend-init-connections={{ .Values.proxy.backendInitConnections }} \
331-
-backend-idle-connections={{ .Values.proxy.backendIdleConnections }}
325+
sed s/{REDIS_PASSWORD}/${REDIS_PASSWORD}/g /opt/drycc/redis/etc/redis-proxy-default.yaml > /opt/drycc/redis/etc/redis-proxy.yaml
326+
supervisord
332327
{{- end }}
333328
env:
334329
{{- if and .Values.usePassword (not .Values.usePasswordFile) }}
@@ -389,8 +384,8 @@ spec:
389384
- name: scripts
390385
mountPath: /scripts
391386
- name: default-config
392-
mountPath: /opt/drycc/redis/etc/redis-proxy-default.toml
393-
subPath: redis-proxy-default.toml
387+
mountPath: /opt/drycc/redis/etc/redis-proxy-default.yaml
388+
subPath: redis-proxy-default.yaml
394389
{{- if .Values.usePasswordFile }}
395390
- name: redis-password
396391
mountPath: /opt/drycc/redis/secrets/

addons/redis-cluster/7.0/plans/standard-1024/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ proxy:
4848
##
4949
resources:
5050
limits:
51-
cpu: 2
52-
memory: 4Gi
53-
requests:
5451
cpu: 1
5552
memory: 2Gi
53+
requests:
54+
cpu: 500m
55+
memory: 1Gi

addons/redis-cluster/7.0/plans/standard-128/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ proxy:
4848
##
4949
resources:
5050
limits:
51-
cpu: 2
52-
memory: 4Gi
53-
requests:
5451
cpu: 1
5552
memory: 2Gi
53+
requests:
54+
cpu: 500m
55+
memory: 1Gi

addons/redis-cluster/7.0/plans/standard-16384/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ proxy:
4848
##
4949
resources:
5050
limits:
51-
cpu: 4
52-
memory: 8Gi
53-
requests:
5451
cpu: 2
5552
memory: 4Gi
53+
requests:
54+
cpu: 1
55+
memory: 2Gi

addons/redis-cluster/7.0/plans/standard-256/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ proxy:
4848
##
4949
resources:
5050
limits:
51-
cpu: 2
52-
memory: 4Gi
53-
requests:
5451
cpu: 1
5552
memory: 2Gi
53+
requests:
54+
cpu: 500m
55+
memory: 1Gi

addons/redis-cluster/7.0/plans/standard-32768/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ proxy:
4848
##
4949
resources:
5050
limits:
51-
cpu: 4
52-
memory: 8Gi
53-
requests:
5451
cpu: 2
5552
memory: 4Gi
53+
requests:
54+
cpu: 1
55+
memory: 2Gi

addons/redis-cluster/7.0/plans/standard-4096/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ proxy:
4848
##
4949
resources:
5050
limits:
51-
cpu: 4
52-
memory: 8Gi
53-
requests:
5451
cpu: 2
5552
memory: 4Gi
53+
requests:
54+
cpu: 1
55+
memory: 2Gi
5656

addons/redis-cluster/7.0/plans/standard-512/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ proxy:
4848
##
4949
resources:
5050
limits:
51-
cpu: 2
52-
memory: 4Gi
53-
requests:
5451
cpu: 1
5552
memory: 2Gi
53+
requests:
54+
cpu: 500m
55+
memory: 1Gi

addons/redis-cluster/7.0/plans/standard-65536/values.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ proxy:
5454
##
5555
resources:
5656
limits:
57-
cpu: 4
58-
memory: 8Gi
59-
requests:
6057
cpu: 2
6158
memory: 4Gi
59+
requests:
60+
cpu: 1
61+
memory: 2Gi

0 commit comments

Comments
 (0)