Skip to content

Commit f76a0db

Browse files
committed
values parameter to enable dynamic routing in envoy
1 parent 704084d commit f76a0db

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

helm/supersonic/templates/envoy/configmaps.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,19 @@ static_resources:
5757
routes:
5858
- match:
5959
prefix: "/"
60+
{{- if .envoy.dynamic_routing.enabled }}
6061
typed_per_filter_config:
6162
envoy.filters.http.dynamic_forward_proxy:
6263
"@type": type.googleapis.com/envoy.extensions.filters.http.dynamic_forward_proxy.v3.PerRouteConfig
6364
host_rewrite_header: "x-model-host"
6465
route:
6566
cluster: dynamic_forward_proxy_cluster
6667
timeout: {{ .envoy.grpc_route_timeout }}
68+
{{- else }}
69+
route:
70+
cluster: triton_grpc_service
71+
timeout: {{ .envoy.grpc_route_timeout }}
72+
{{- end }}
6773

6874
http_filters:
6975
{{- with .envoy.rate_limiter.prometheus_based }}
@@ -99,6 +105,7 @@ static_resources:
99105
provider_name: provider_icecube
100106
{{- end }}
101107
{{- end }}
108+
{{- if .envoy.dynamic_routing.enabled }}
102109
- name: envoy.filters.http.dynamic_forward_proxy
103110
typed_config:
104111
"@type": type.googleapis.com/envoy.extensions.filters.http.dynamic_forward_proxy.v3.FilterConfig
@@ -107,6 +114,7 @@ static_resources:
107114
dns_lookup_family: ALL
108115
dns_cache_circuit_breaker:
109116
max_pending_requests: 1024
117+
{{- end }}
110118
- name: envoy.filters.http.router
111119
typed_config:
112120
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
@@ -189,6 +197,7 @@ static_resources:
189197
socket_address:
190198
address: {{ .tritonName }}
191199
port_value: {{ .tritonGrpcPort }}
200+
{{- if .envoy.dynamic_routing.enabled }}
192201
- name: dynamic_forward_proxy_cluster
193202
connect_timeout: 2s
194203
lb_policy: CLUSTER_PROVIDED
@@ -203,6 +212,7 @@ static_resources:
203212
dns_lookup_family: ALL
204213
dns_cache_circuit_breaker:
205214
max_pending_requests: 1024
215+
{{- end }}
206216
{{- end }}
207217
{{- end }}
208218

helm/supersonic/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@ envoy:
162162
# Options: ROUND_ROBIN, LEAST_REQUEST, RING_HASH, RANDOM, MAGLEV
163163
loadBalancerPolicy: "LEAST_REQUEST"
164164

165+
# -- Enable dynamic routing in Envoy proxy.
166+
dynamic_routing:
167+
enabled: false
168+
165169
auth:
166170
# -- Enable authentication in Envoy proxy
167171
enabled: false

0 commit comments

Comments
 (0)