8000 feat(hatchery/swarm): enable ipv6 (#3703) · ovh/cds@e0e7819 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit e0e7819

Browse files
yesnaultbnjjj
authored andcommitted
feat(hatchery/swarm): enable ipv6 (#3703)
It's an option, as it's not enable per default on docker engine. Signed-off-by: Yvonnick Esnault <yvonnick@esnau.lt>
1 parent 33facdd commit e0e7819

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

engine/hatchery/swarm/swarm_util_create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func (h *HatcherySwarm) createNetwork(ctx context.Context, dockerClient *dockerC
2828
Driver: "bridge",
2929
Internal: false,
3030
CheckDuplicate: true,
31-
EnableIPv6: false,
31+
EnableIPv6: h.Config.NetworkEnableIPv6,
3232
IPAM: &network.IPAM{
3333
Driver: "default",
3434
},

engine/hatchery/swarm/types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ type HatcheryConfiguration struct {
2727
// DockerOpts Docker options
2828
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"`
2929

30+
// NetworkEnableIPv6 if true: set ipv6 to true
31+
NetworkEnableIPv6 bool `mapstructure:"networkEnableIPv6" toml:"networkEnableIPv6" default:"false" commented:"false" comment:"if true: hatchery creates private network between services with ipv6 enabled" json:"networkEnableIPv6"`
32+
3033
DockerEngines map[string]DockerEngineConfiguration `mapstructure:"dockerEngines" toml:"dockerEngines" comment:"List of Docker Engines" json:"dockerEngines,omitempty"`
3134
}
3235

0 commit comments

Comments
 (0)
0