Skip to content

Commit

Permalink
internal/envoy: don't create service_stats cluster if stats disabled
Browse files Browse the repository at this point in the history
Updates projectcontour#420

If stats are not enabled, there is no point in creating a static stats
cluster as it will not be used and generates log spam.

Signed-off-by: Dave Cheney <dave@cheney.net>
  • Loading branch information
davecheney committed Jul 6, 2018
1 parent cad3ade commit 182e145
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
4 changes: 2 additions & 2 deletions internal/envoy/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static_resources:
max_pending_requests: 100000
max_requests: 60000000
max_retries: 50
- name: service_stats
{{ if .StatsdEnabled }} - name: service_stats
connect_timeout: 0.250s
type: LOGICAL_DNS
lb_policy: ROUND_ROBIN
Expand All @@ -117,7 +117,7 @@ static_resources:
protocol: TCP
address: 127.0.0.1
port_value: {{ if .AdminPort }}{{ .AdminPort }}{{ else }}9001{{ end }}
{{ if .StatsdEnabled }} listeners:
listeners:
- address:
socket_address:
protocol: TCP
Expand Down
9 changes: 0 additions & 9 deletions internal/envoy/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,6 @@ static_resources:
max_pending_requests: 100000
max_requests: 60000000
max_retries: 50
- name: service_stats
connect_timeout: 0.250s
type: LOGICAL_DNS
lb_policy: ROUND_ROBIN
hosts:
- socket_address:
protocol: TCP
address: 127.0.0.1
port_value: 9001
admin:
access_log_path: /dev/null
address:
Expand Down

0 comments on commit 182e145

Please sign in to comment.