Merge pull request #10868 from afbjorklund/cni-mkdir
bridge cni: Make sure to create the directory for cni configpull/10811/head
commit
6496ab59be
|
@ -19,6 +19,7 @@ package cni
|
|||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"text/template"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
@ -84,6 +85,10 @@ func (c Bridge) Apply(r Runner) error {
|
|||
return fmt.Errorf("bridge CNI is incompatible with multi-node clusters")
|
||||
}
|
||||
|
||||
if _, err := r.RunCmd(exec.Command("sudo", "mkdir", "-p", "/etc/cni/net.d")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
f, err := c.netconf()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "netconf")
|
||||
|
|
Loading…
Reference in New Issue