Skip to content

Commit

Permalink
feat(hatchery/swarm): enable ipv6 (#3703)
Browse files Browse the repository at this point in the history
It's an option, as it's not enable per default on docker engine.

Signed-off-by: Yvonnick Esnault <[email protected]>
  • Loading branch information
yesnault authored and bnjjj committed Dec 10, 2018
1 parent 33facdd commit e0e7819
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion engine/hatchery/swarm/swarm_util_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (h *HatcherySwarm) createNetwork(ctx context.Context, dockerClient *dockerC
Driver: "bridge",
Internal: false,
CheckDuplicate: true,
EnableIPv6: false,
EnableIPv6: h.Config.NetworkEnableIPv6,
IPAM: &network.IPAM{
Driver: "default",
},
Expand Down
3 changes: 3 additions & 0 deletions engine/hatchery/swarm/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ type HatcheryConfiguration struct {
// DockerOpts Docker options
DockerOpts string `mapstructure:"dockerOpts" toml:"dockerOpts" default:"" commented:"true" comment:"Docker Options. --add-host and --privileged supported. Example: dockerOpts=\"--add-host=myhost:x.x.x.x,myhost2:y.y.y.y --privileged\"" json:"dockerOpts,omitempty"`

// NetworkEnableIPv6 if true: set ipv6 to true
NetworkEnableIPv6 bool `mapstructure:"networkEnableIPv6" toml:"networkEnableIPv6" default:"false" commented:"false" comment:"if true: hatchery creates private network between services with ipv6 enabled" json:"networkEnableIPv6"`

DockerEngines map[string]DockerEngineConfiguration `mapstructure:"dockerEngines" toml:"dockerEngines" comment:"List of Docker Engines" json:"dockerEngines,omitempty"`
}

Expand Down

0 comments on commit e0e7819

Please sign in to comment.