1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 23:04:41 +00:00

Add ability to configure docker-sys bridge subnet (#2217)

This commit is contained in:
niusmallnan
2018-01-10 16:44:59 +08:00
committed by GitHub
parent 480e45cd01
commit 44552d55d0
3 changed files with 36 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ import (
"github.com/docker/docker/pkg/mount"
"github.com/rancher/os/config"
"github.com/rancher/os/config/cmdline"
"github.com/rancher/os/dfs"
"github.com/rancher/os/log"
"github.com/rancher/os/util"
@@ -428,6 +429,12 @@ func RunInit() error {
log.FsReady()
log.Debugf("WARNING: switchroot and mount OEM2 phases not written to log file")
// update docker-sys bridge setting
if dockerSysSubnet := cmdline.GetCmdline(config.RKPDockerSysBridgeSubnet); dockerSysSubnet != "" {
val := dockerSysSubnet.(string)
config.SaveCNISubnet(val, config.CNIBridgeConfigFile)
}
return cfg, nil
}},
config.CfgFuncData{"b2d Env", func(cfg *config.CloudConfig) (*config.CloudConfig, error) {