Add support for dns port as a command line option

This commit is contained in:
sweeneyb 2016-08-05 19:36:01 +00:00
parent d6aa033793
commit 14ec3290fa
2 changed files with 6 additions and 0 deletions

View File

@ -91,6 +91,7 @@ func (c *Command) readConfig() *Config {
cmdFlags.StringVar(&cmdConfig.ClientAddr, "client", "", "address to bind client listeners to (DNS, HTTP, HTTPS, RPC)") cmdFlags.StringVar(&cmdConfig.ClientAddr, "client", "", "address to bind client listeners to (DNS, HTTP, HTTPS, RPC)")
cmdFlags.StringVar(&cmdConfig.BindAddr, "bind", "", "address to bind server listeners to") cmdFlags.StringVar(&cmdConfig.BindAddr, "bind", "", "address to bind server listeners to")
cmdFlags.IntVar(&cmdConfig.Ports.HTTP, "http-port", 0, "http port to use") cmdFlags.IntVar(&cmdConfig.Ports.HTTP, "http-port", 0, "http port to use")
cmdFlags.IntVar(&cmdConfig.Ports.DNS, "dns-port", 0, "DNS port to use")
cmdFlags.StringVar(&cmdConfig.AdvertiseAddr, "advertise", "", "address to advertise instead of bind addr") cmdFlags.StringVar(&cmdConfig.AdvertiseAddr, "advertise", "", "address to advertise instead of bind addr")
cmdFlags.StringVar(&cmdConfig.AdvertiseAddrWan, "advertise-wan", "", "address to advertise on wan instead of bind or advertise addr") cmdFlags.StringVar(&cmdConfig.AdvertiseAddrWan, "advertise-wan", "", "address to advertise on wan instead of bind or advertise addr")

View File

@ -141,6 +141,11 @@ The options below are all specified on the command-line.
it relies on proper configuration. Nodes in the same datacenter should be on a single it relies on proper configuration. Nodes in the same datacenter should be on a single
LAN. LAN.
* <a name="_dns_port"></a><a href="#_dns_port">`-dns-port`</a> - the DNS port to listen on.
This overrides the default port 8600. This option is very useful when deploying Consul
to an environment which communicates the DNS port through the environment e.g. PaaS like CloudFoundry, allowing
you to set the port directly via a Procfile.
* <a name="_domain"></a><a href="#_domain">`-domain`</a> - By default, Consul responds to DNS queries * <a name="_domain"></a><a href="#_domain">`-domain`</a> - By default, Consul responds to DNS queries
in the "consul." domain. This flag can be used to change that domain. All queries in this domain in the "consul." domain. This flag can be used to change that domain. All queries in this domain
are assumed to be handled by Consul and will not be recursively resolved. are assumed to be handled by Consul and will not be recursively resolved.