Address PR comments
This commit is contained in:
1 parent
4f82dc97fd
commit
ded3d6b40b
3 files changed
+9
-11
No files matched your search
+5
-7
@@ -15,13 +15,11 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
defaultCaFile = "ca.pem"
|
defaultCaFile = "ca.pem"
|
||||||
defaultKeyFile = "key.pem"
|
defaultKeyFile = "key.pem"
|
||||||
defaultCertFile = "cert.pem"
|
defaultCertFile = "cert.pem"
|
||||||
dockerSock = "/var/run/docker.sock"
|
dockerSock = "/var/run/docker.sock"
|
||||||
dockerSockUnix = "unix://" + dockerSock
|
dockerSockUnix = "unix://" + dockerSock
|
||||||
substitutionPatternName = "pattern"
|
|
||||||
substitutionReplacementName = "replacement"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
+3
-3
@@ -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
|
see the [weaveDNS usage](weavedns.html#usage) section for an in-depth
|
||||||
explanation of the behaviour and how to control it.
|
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
|
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
|
name is out of the user's control (e.g. when using Docker orchestrators which
|
||||||
append control/namespacing identifiers to the original container names).
|
append control/namespacing identifiers to the original container names).
|
||||||
|
|
||||||
For those situations, the proxy provides two flags: `--hostname-match <regexp>`
|
For those situations, the proxy provides two flags: `--hostname-match <regexp>`
|
||||||
and `--hostname-replacement <replacement>`. When launching a container, its name
|
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
|
`<replacement>` will be used to generate a hostname, which will ultimately be
|
||||||
handed over to weaveDNS for registration.
|
handed over to weaveDNS for registration.
|
||||||
|
|
||||||
For instance, if we launch the proxy using
|
For instance, if we launch the proxy using
|
||||||
`--hostname-match '^aws-[0-9]+-(.*)$'` and `--hostname-replacement 'my-app-$1'`
|
`--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)"
|
host1$ eval "$(weave env)"
|
||||||
|
|
||||||
then, running a container named `aws-12798186823-foo` will lead to weaveDNS registering
|
then, running a container named `aws-12798186823-foo` will lead to weaveDNS registering
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ weave launch-router [--password <password>] [--nickname <nickname>]
|
|||||||
weave launch-dns [<addr>]
|
weave launch-dns [<addr>]
|
||||||
weave launch-proxy [-H <endpoint>] [--with-dns | --without-dns]
|
weave launch-proxy [-H <endpoint>] [--with-dns | --without-dns]
|
||||||
[--no-default-ipalloc] [--no-rewrite-hosts]
|
[--no-default-ipalloc] [--no-rewrite-hosts]
|
||||||
[[--hostname-match <regexp>] [--hostname-replacement <replacement>]]
|
[--hostname-match <regexp>] [--hostname-replacement <replacement>]
|
||||||
weave connect [--replace] [<peer> ...]
|
weave connect [--replace] [<peer> ...]
|
||||||
weave forget <peer> ...
|
weave forget <peer> ...
|
||||||
weave run [--with-dns | --without-dns] [<addr> ...]
|
weave run [--with-dns | --without-dns] [<addr> ...]
|
||||||
|
|||||||
Reference in new issue
Block a user