Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find a way to allow xds_cluster to be defined as a DNS name, not an IP address #228

Closed
davecheney opened this issue Feb 8, 2018 · 1 comment · Fixed by #238 or #2368
Closed

Find a way to allow xds_cluster to be defined as a DNS name, not an IP address #228

davecheney opened this issue Feb 8, 2018 · 1 comment · Fixed by #238 or #2368
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@davecheney
Copy link
Contributor

Using contour bootstrap --xds-address=contour.heptio-contour.svc.cluster.local causes the following bootstrap config to be written.

dynamic_resources:
  lds_config:
    api_config_source:
      api_type: GRPC
      cluster_names: [xds_cluster]
      grpc_services:
      - envoy_grpc:
          cluster_name: xds_cluster
  cds_config:
    api_config_source:
      api_type: GRPC
      cluster_names: [xds_cluster]
      grpc_services:
      - envoy_grpc:
          cluster_name: xds_cluster
static_resources:
  clusters:
  - name: xds_cluster
    connect_timeout: { seconds: 5 }
    type: STATIC
    hosts:
    - socket_address:
        address: contour.heptio-contour.svc.cluster.local
        port_value: 8001
    lb_policy: ROUND_ROBIN
    http2_protocol_options: {}
admin:
  access_log_path: /dev/null
  address:
    socket_address:
      address: 127.0.0.1
      port_value: 9001

Which envoy rejects

[2018-02-08 00:47:01.269][1][info][main] source/server/server.cc:184] initializing epoch 0 (hot restart version=9.200.16384.127.options=capacity=16384, num_slots=8209 hash=228984379728933363)
[2018-02-08 00:47:01.292][1][critical][main] source/server/server.cc:71] error initializing configuration '/config/contour.yaml': malformed IP address: contour.heptio-contour.svc.cluster.local

Figure out if it is possible to use a DNS name for the xds_cluster static resource.

@davecheney davecheney added kind/feature Categorizes issue or PR as related to a new feature. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Feb 8, 2018
@sevein
Copy link
Contributor

sevein commented Feb 8, 2018

It seems that STATIC clusters use IpResolver, that explains the error malformed IP address.

SocketAddress has a resolver_name field that we could use.

// The name of the resolver. This must have been registered with Envoy. If this is
// empty, a context dependent default applies. If address is a hostname this
// should be set for resolution other than DNS. If the address is a concrete
// IP address, no resolution will occur.
string resolver_name = 5;

What do you think they mean by registering it with Envoy?

sevein added a commit to sevein/contour that referenced this issue Feb 12, 2018
Fixes projectcontour#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 projectcontour#158 and projectcontour#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>
sevein added a commit to sevein/contour that referenced this issue Feb 12, 2018
Fixes projectcontour#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 projectcontour#158 and projectcontour#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>
vukg pushed a commit to vukg/contour that referenced this issue Feb 24, 2020
Fixes projectcontour#228

site: fix secret name in cert-manager documentation

Signed-off-by: vukg <vuk.gojnic@gmail.com>
vukg added a commit to vukg/contour that referenced this issue Mar 2, 2020
Fixes projectcontour#228

site: fix secret name in cert-manager documentation

Signed-off-by: vukg <vuk.gojnic@gmail.com>
stevesloka pushed a commit to stevesloka/contour that referenced this issue Mar 20, 2020
Fixes projectcontour#228

site: fix secret name in cert-manager documentation

Signed-off-by: vukg <vuk.gojnic@gmail.com>
stevesloka pushed a commit to stevesloka/contour that referenced this issue Mar 20, 2020
Fixes projectcontour#228

site: fix secret name in cert-manager documentation

Signed-off-by: vukg <vuk.gojnic@gmail.com>
Signed-off-by: Steve Sloka <slokas@vmware.com>
stevesloka pushed a commit that referenced this issue Mar 20, 2020
Fixes #228

site: fix secret name in cert-manager documentation

Signed-off-by: vukg <vuk.gojnic@gmail.com>
Signed-off-by: Steve Sloka <slokas@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
2 participants