[proxy] Add support for WEAVE_CIDR=none

Tells the proxy not to do anything with this container. We set it when
running weaveexec/weave/etc containers, so that the weave script works
through the proxy.
This commit is contained in:
Paul Bellamy committed 2015-06-17 14:51:12 +01:00
1 parent ff838a14d9
commit ca681bce13
8 files changed
+44 -15

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@ func (i *createContainerInterceptor) InterceptRequest(r *http.Request) error {
return err
}
if cidrs, ok := weaveCIDRsFromConfig(container.Config); ok || !i.proxy.NoDefaultIPAM {
if cidrs, ok := weaveCIDRsFromConfig(container.Config, i.proxy.NoDefaultIPAM); ok {
Info.Printf("Creating container with WEAVE_CIDR \"%s\"", strings.Join(cidrs, " "))
if container.HostConfig == nil {
container.HostConfig = &docker.HostConfig{}