Skip to content

Commit

Permalink
WIP: enable ipv6 in doxker via sysctl
Browse files Browse the repository at this point in the history
Signed-off-by: Natanael Copa <[email protected]>
  • Loading branch information
ncopa committed Jun 6, 2024
1 parent 7741caa commit 8158e58
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ require (

// Replacements duplicated from upstream Kubernetes
replace (
github.com/k0sproject/bootloose => github.com/ncopa/bootloose v0.0.0-20240606210213-617cd2da8e14
// https://github.com/kubernetes/kubernetes/blob/v1.30.1/go.mod#L239-L270
k8s.io/api => k8s.io/api v0.30.1
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.30.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,6 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/k0sproject/bootloose v0.7.2 h1:K3IRlP8WSBWuNqT7SN/L6nw3rYY+aMpfqylOQ2tksf4=
github.com/k0sproject/bootloose v0.7.2/go.mod h1:BwIRhmv1ioCQsOeTa6qeSlBFzu5OTpINP9BIjVAXjEc=
github.com/k0sproject/dig v0.2.0 h1:cNxEIl96g9kqSMfPSZLhpnZ0P8bWXKv08nxvsMHop5w=
github.com/k0sproject/dig v0.2.0/go.mod h1:rBcqaQlJpcKdt2x/OE/lPvhGU50u/e95CSm5g/r4s78=
github.com/k0sproject/version v0.6.0 h1:Wi8wu9j+H36+okIQA47o/YHbzNpKeIYj8IjGdJOdqsI=
Expand Down Expand Up @@ -479,6 +477,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
github.com/ncopa/bootloose v0.0.0-20240606210213-617cd2da8e14 h1:U5Hg+3r0XSObt9bz8DdS8ithf9ClxMZ6tmAGiapbbDs=
github.com/ncopa/bootloose v0.0.0-20240606210213-617cd2da8e14/go.mod h1:BwIRhmv1ioCQsOeTa6qeSlBFzu5OTpINP9BIjVAXjEc=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
Expand Down
9 changes: 9 additions & 0 deletions inttest/common/bootloosesuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ type BootlooseSuite struct {
WorkerCount int
K0smotronWorkerCount int
WithUpdateServer bool
WithIPv6 bool
BootLooseImage string

ctx context.Context
Expand Down Expand Up @@ -1161,6 +1162,10 @@ func (s *BootlooseSuite) initializeBootlooseClusterInDir(dir string) error {
},
}

extraArgs := []string{}
if s.WithIPv6 {
extraArgs = append(extraArgs, "--sysctl", "net.ipv6.conf.all.disable_ipv6=0")
}
cfg := config.Config{
Cluster: config.Cluster{
Name: s.T().Name(),
Expand All @@ -1175,6 +1180,7 @@ func (s *BootlooseSuite) initializeBootlooseClusterInDir(dir string) error {
Privileged: true,
Volumes: volumes,
PortMappings: portMaps,
ExtraArgs: extraArgs,
},
},
{
Expand All @@ -1185,6 +1191,7 @@ func (s *BootlooseSuite) initializeBootlooseClusterInDir(dir string) error {
Privileged: true,
Volumes: volumes,
PortMappings: portMaps,
ExtraArgs: extraArgs,
},
},
{
Expand All @@ -1195,6 +1202,7 @@ func (s *BootlooseSuite) initializeBootlooseClusterInDir(dir string) error {
Privileged: true,
Volumes: volumes,
PortMappings: portMaps,
ExtraArgs: extraArgs,
},
},
},
Expand All @@ -1208,6 +1216,7 @@ func (s *BootlooseSuite) initializeBootlooseClusterInDir(dir string) error {
Privileged: true,
Volumes: volumes,
PortMappings: portMaps,
ExtraArgs: extraArgs,
},
Count: 1,
})
Expand Down
1 change: 1 addition & 0 deletions inttest/dualstack/dualstack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ func TestDualStack(t *testing.T) {
common.BootlooseSuite{
ControllerCount: 1,
WorkerCount: 2,
WithIPv6: true,
},
nil,
}
Expand Down

0 comments on commit 8158e58

Please sign in to comment.