Skip to content

Commit

Permalink
internal/envoy: use strict DNS for resolving the cluster
Browse files Browse the repository at this point in the history
Fixes #228.

This enable us to define the contour cluster as a DNS name. I have confirmed
that `STRICT_DNS` also works when the address is an IP.

As mentioned by @davecheney before, with #158 and #228 fixed we should be able
to split Contour and Envoy into separate pods. Proof of concept:
https://gist.github.com/sevein/d30e1791fbc0db786884360486e70737.

Signed-off-by: Jesús García Crespo <jesus@sevein.com>
  • Loading branch information
sevein committed Feb 12, 2018
1 parent 87a3d72 commit f1b1bac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/envoy/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static_resources:
clusters:
- name: contour
connect_timeout: { seconds: 5 }
type: STATIC
type: STRICT_DNS
hosts:
- socket_address:
address: {{ if .XDSAddress }}{{ .XDSAddress }}{{ else }}127.0.0.1{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion internal/envoy/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static_resources:
clusters:
- name: contour
connect_timeout: { seconds: 5 }
type: STATIC
type: STRICT_DNS
hosts:
- socket_address:
address: 127.0.0.1
Expand Down

0 comments on commit f1b1bac

Please sign in to comment.