go.mod: github.com/containerd/go-cni v1.0.2
full diff: https://github.com/containerd/go-cni/compare/v1.0.1...v1.0.2 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -36,11 +36,11 @@ type cniNetConfSyncer struct {
|
||||
watcher *fsnotify.Watcher
|
||||
confDir string
|
||||
netPlugin cni.CNI
|
||||
loadOpts []cni.CNIOpt
|
||||
loadOpts []cni.Opt
|
||||
}
|
||||
|
||||
// newCNINetConfSyncer creates cni network conf syncer.
|
||||
func newCNINetConfSyncer(confDir string, netPlugin cni.CNI, loadOpts []cni.CNIOpt) (*cniNetConfSyncer, error) {
|
||||
func newCNINetConfSyncer(confDir string, netPlugin cni.CNI, loadOpts []cni.Opt) (*cniNetConfSyncer, error) {
|
||||
watcher, err := fsnotify.NewWatcher()
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to create fsnotify watcher")
|
||||
|
||||
@@ -544,7 +544,7 @@ func (c *criService) getSandboxRuntime(config *runtime.PodSandboxConfig, runtime
|
||||
return handler, nil
|
||||
}
|
||||
|
||||
func logDebugCNIResult(ctx context.Context, sandboxID string, result *cni.CNIResult) {
|
||||
func logDebugCNIResult(ctx context.Context, sandboxID string, result *cni.Result) {
|
||||
if logrus.GetLevel() < logrus.DebugLevel {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ type SandboxInfo struct {
|
||||
RuntimeOptions interface{} `json:"runtimeOptions"`
|
||||
Config *runtime.PodSandboxConfig `json:"config"`
|
||||
RuntimeSpec *runtimespec.Spec `json:"runtimeSpec"`
|
||||
CNIResult *cni.CNIResult `json:"cniResult"`
|
||||
CNIResult *cni.Result `json:"cniResult"`
|
||||
}
|
||||
|
||||
// toCRISandboxInfo converts internal container object information to CRI sandbox status response info map.
|
||||
|
||||
@@ -73,6 +73,6 @@ func (c *criService) initPlatform() error {
|
||||
}
|
||||
|
||||
// cniLoadOptions returns cni load options for the linux.
|
||||
func (c *criService) cniLoadOptions() []cni.CNIOpt {
|
||||
return []cni.CNIOpt{cni.WithLoNetwork, cni.WithDefaultConf}
|
||||
func (c *criService) cniLoadOptions() []cni.Opt {
|
||||
return []cni.Opt{cni.WithLoNetwork, cni.WithDefaultConf}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,6 @@ func (c *criService) initPlatform() error {
|
||||
}
|
||||
|
||||
// cniLoadOptions returns cni load options for the linux.
|
||||
func (c *criService) cniLoadOptions() []cni.CNIOpt {
|
||||
return []cni.CNIOpt{}
|
||||
func (c *criService) cniLoadOptions() []cni.Opt {
|
||||
return []cni.Opt{}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,6 @@ func (c *criService) initPlatform() error {
|
||||
}
|
||||
|
||||
// cniLoadOptions returns cni load options for the windows.
|
||||
func (c *criService) cniLoadOptions() []cni.CNIOpt {
|
||||
return []cni.CNIOpt{cni.WithDefaultConf}
|
||||
func (c *criService) cniLoadOptions() []cni.Opt {
|
||||
return []cni.Opt{cni.WithDefaultConf}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ func NewFakeCNIPlugin() *FakeCNIPlugin {
|
||||
}
|
||||
|
||||
// Setup setups the network of PodSandbox.
|
||||
func (f *FakeCNIPlugin) Setup(ctx context.Context, id, path string, opts ...cni.NamespaceOpts) (*cni.CNIResult, error) {
|
||||
func (f *FakeCNIPlugin) Setup(ctx context.Context, id, path string, opts ...cni.NamespaceOpts) (*cni.Result, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ func (f *FakeCNIPlugin) Status() error {
|
||||
}
|
||||
|
||||
// Load loads the network config.
|
||||
func (f *FakeCNIPlugin) Load(opts ...cni.CNIOpt) error {
|
||||
func (f *FakeCNIPlugin) Load(opts ...cni.Opt) error {
|
||||
return f.LoadErr
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ type Metadata struct {
|
||||
// RuntimeHandler is the runtime handler name of the pod.
|
||||
RuntimeHandler string
|
||||
// CNIresult resulting configuration for attached network namespace interfaces
|
||||
CNIResult *cni.CNIResult
|
||||
CNIResult *cni.Result
|
||||
// ProcessLabel is the SELinux process label for the container
|
||||
ProcessLabel string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user