Address PR comments

This commit is contained in:
Alfonso Acosta committed 2015-07-14 15:31:44 +00:00
1 parent 4f82dc97fd
commit ded3d6b40b
3 files changed
+9 -11

No files matched your search

+5 -7
View File
@@ -15,13 +15,11 @@ import (
)
const (
defaultCaFile = "ca.pem"
defaultKeyFile = "key.pem"
defaultCertFile = "cert.pem"
dockerSock = "/var/run/docker.sock"
dockerSockUnix = "unix://" + dockerSock
substitutionPatternName = "pattern"
substitutionReplacementName = "replacement"
defaultCaFile = "ca.pem"
defaultKeyFile = "key.pem"
defaultCertFile = "cert.pem"
dockerSock = "/var/run/docker.sock"
dockerSockUnix = "unix://" + dockerSock
)
var (
+3 -3
View File
@@ -130,21 +130,21 @@ automatically if it is running at the point when they are started -
see the [weaveDNS usage](weavedns.html#usage) section for an in-depth
explanation of the behaviour and how to control it.
Typicaly, the proxy will pass on container names as-is to [weaveDNS](weavedns.html)
Typically, the proxy will pass on container names as-is to [weaveDNS](weavedns.html)
for registration. However, there are situations in which the final container
name is out of the user's control (e.g. when using Docker orchestrators which
append control/namespacing identifiers to the original container names).
For those situations, the proxy provides two flags: `--hostname-match <regexp>`
and `--hostname-replacement <replacement>`. When launching a container, its name
matched against regular expression `<regexp>`. Then, based on that match,
is matched against regular expression `<regexp>`. Then, based on that match,
`<replacement>` will be used to generate a hostname, which will ultimately be
handed over to weaveDNS for registration.
For instance, if we launch the proxy using
`--hostname-match '^aws-[0-9]+-(.*)$'` and `--hostname-replacement 'my-app-$1'`
host1$ weave launch-router && weave launch-dns && weave launch-proxy --hostname-match '^aws-[0-9]+-(.*)$' and --hostname-replacement 'my-app-$1'
host1$ weave launch-router && weave launch-dns && weave launch-proxy --hostname-match '^aws-[0-9]+-(.*)$' --hostname-replacement 'my-app-$1'
host1$ eval "$(weave env)"
then, running a container named `aws-12798186823-foo` will lead to weaveDNS registering
+1 -1
View File
@@ -37,7 +37,7 @@ weave launch-router [--password <password>] [--nickname <nickname>]
weave launch-dns [<addr>]
weave launch-proxy [-H <endpoint>] [--with-dns | --without-dns]
[--no-default-ipalloc] [--no-rewrite-hosts]
[[--hostname-match <regexp>] [--hostname-replacement <replacement>]]
[--hostname-match <regexp>] [--hostname-replacement <replacement>]
weave connect [--replace] [<peer> ...]
weave forget <peer> ...
weave run [--with-dns | --without-dns] [<addr> ...]