global and cluster-local bind config (#150)

pull/151/head
alyssawilk 8 years ago committed by htuch
parent 60fb9eb2e5
commit 1a2b870f6d
  1. 42
      api/address.proto
  2. 4
      api/bootstrap.proto
  3. 4
      api/cds.proto

@ -10,23 +10,16 @@ message Pipe {
string path = 1; string path = 1;
} }
// Addresses specify either a logical or physical address and port, which are message SocketAddress {
// used to tell Envoy where to bind/listen, connect to upstream and find
// management servers. They may optionally name a resolver that will be used at
// runtime for further transformation. Resolution may also be performed in a
// context dependent manner, e.g. when an Address is used for an upstream
// logical DNS host.
message Address {
message SocketAddress {
enum Protocol { enum Protocol {
TCP = 0; TCP = 0;
} }
Protocol protocol = 1; Protocol protocol = 1;
// For listeners, an empty address implies a bind to 0.0.0.0 or ::. It's // The address for this socket. Listeners will bind to the address. An empty
// still possible to distinguish on address via the prefix/suffix matching // address implies a bind to 0.0.0.0 or ::. It's still possible to distinguish on
// in FilterChainMatch after connection. // address via the prefix/suffix matching in FilterChainMatch after connection.
// For clusters, an address may be either an IP or hostname to be resolved via // For clusters, an address may be either an IP or hostname to be resolved via
// DNS. // DNS. If it is a hostname, resolve_name should be set.
string address = 2; string address = 2;
oneof port_specifier { oneof port_specifier {
uint32 port_value = 3; uint32 port_value = 3;
@ -34,14 +27,23 @@ message Address {
// and the named resolver is capable of named port resolution. // and the named resolver is capable of named port resolution.
string named_port = 4; string named_port = 4;
} }
} // The name of the resolver. This must have been registered with Envoy. If this is
// 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
// empty, a context dependent default applies. If the address is expected to // should be set. If the address is a concrete IP address, no resolution will occur.
// be a hostname, it will be DNS resolution. If the address is expected to be string resolver_name = 5;
// a concrete IP address, no resolution will occur. }
string resolver_name = 1;
message BindConfig {
// The address to bind to when creating a socket.
SocketAddress source_address = 1;
}
// Addresses specify either a logical or physical address and port, which are
// used to tell Envoy where to bind/listen, connect to upstream and find
// management servers.
message Address {
oneof address { oneof address {
SocketAddress named_address = 2; SocketAddress named_address = 1;
Pipe pipe = 3; Pipe pipe = 2;
} }
} }

@ -6,6 +6,7 @@ syntax = "proto3";
package envoy.api.v2; package envoy.api.v2;
import "api/address.proto";
import "api/base.proto"; import "api/base.proto";
import "api/cds.proto"; import "api/cds.proto";
@ -25,5 +26,8 @@ message Bootstrap {
// to know how to speak to the management server. These cluster definitions // to know how to speak to the management server. These cluster definitions
// may not use EDS (i.e. they should be static IP or DNS-based). // may not use EDS (i.e. they should be static IP or DNS-based).
repeated Cluster bootstrap_clusters = 5; repeated Cluster bootstrap_clusters = 5;
// Optional configuration used to bind newly established upstream connections.
// This may be overridden on a per-cluster basis by upstream_bind_config in the cds_config.
BindConfig upstream_bind_config = 6;
// TODO(htuch): Add support for HDS. // TODO(htuch): Add support for HDS.
} }

@ -226,5 +226,7 @@ message Cluster {
google.protobuf.Duration cleanup_interval = 20; google.protobuf.Duration cleanup_interval = 20;
// Optional configuration used to bind newly established upstream connections. // Optional configuration used to bind newly established upstream connections.
UpstreamBindConfig upstream_bind_config = 21; // This overrides any bind_config specified in the bootstrap proto.
// If the addres and port are empty, no bind will be performed.
BindConfig upstream_bind_config = 21;
} }

Loading…
Cancel
Save