[proxy] --with-ipam -> --no-default-ipam

This commit is contained in:
Paul Bellamy committed 2015-06-17 11:31:33 +01:00
1 parent cf5d8874b6
commit 220c80c3ed
10 files changed
+56 -46

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.WithIPAM {
if cidrs, ok := weaveCIDRsFromConfig(container.Config); ok || !i.proxy.NoDefaultIPAM {
Info.Printf("Creating container with WEAVE_CIDR \"%s\"", strings.Join(cidrs, " "))
if container.HostConfig == nil {
container.HostConfig = &docker.HostConfig{}
+1 -1
View File
@@ -29,7 +29,7 @@ func (i *createExecInterceptor) InterceptRequest(r *http.Request) error {
return err
}
if cidrs, ok := weaveCIDRsFromConfig(container.Config); ok || i.proxy.WithIPAM {
if cidrs, ok := weaveCIDRsFromConfig(container.Config); ok || !i.proxy.NoDefaultIPAM {
Info.Printf("Exec in container %s with WEAVE_CIDR \"%s\"", container.ID, strings.Join(cidrs, " "))
cmd := append(weaveWaitEntrypoint, "-s")
options.Cmd = append(cmd, options.Cmd...)
+7 -7
View File
@@ -32,13 +32,13 @@ type Proxy struct {
}
type Config struct {
DockerAddr string
ListenAddr string
TLSConfig TLSConfig
Version string
WithDNS bool
WithoutDNS bool
WithIPAM bool
DockerAddr string
ListenAddr string
NoDefaultIPAM bool
TLSConfig TLSConfig
Version string
WithDNS bool
WithoutDNS bool
}
func NewProxy(c Config) (*Proxy, error) {
+1 -1
View File
@@ -22,7 +22,7 @@ func (i *startContainerInterceptor) InterceptResponse(r *http.Response) error {
}
cidrs, ok := weaveCIDRsFromConfig(container.Config)
if !ok && !i.proxy.WithIPAM {
if !ok && i.proxy.NoDefaultIPAM {
Debug.Print("No Weave CIDR, ignoring")
return nil
}