Browse Source

Merge pull request #1690 from ibuildthecloud/flannel

Only need to resolve the path of host-local if Flannel is enabled
pull/1752/head
Erik Wilson 5 years ago committed by GitHub
parent
commit
ed8cd9250b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      pkg/agent/config/config.go

10
pkg/agent/config/config.go

@ -305,11 +305,6 @@ func get(envInfo *cmds.Agent) (*config.Node, error) {
return nil, err
}
hostLocal, err := exec.LookPath("host-local")
if err != nil {
return nil, errors.Wrapf(err, "failed to find host-local")
}
var flannelIface *sysnet.Interface
if !envInfo.NoFlannel && len(envInfo.FlannelIface) > 0 {
flannelIface, err = sysnet.InterfaceByName(envInfo.FlannelIface)
@ -443,6 +438,11 @@ func get(envInfo *cmds.Agent) (*config.Node, error) {
}
if !nodeConfig.NoFlannel {
hostLocal, err := exec.LookPath("host-local")
if err != nil {
return nil, errors.Wrapf(err, "failed to find host-local")
}
if envInfo.FlannelConf == "" {
nodeConfig.FlannelConf = filepath.Join(envInfo.DataDir, "etc/flannel/net-conf.json")
} else {

Loading…
Cancel
Save