Merge pull request #7904 from dcantah/cri-misc-fixes

CRI: Comment cleanup/misc fixes
This commit is contained in:
Akihiro Suda 2023-01-03 16:08:54 +09:00 committed by GitHub
commit a0b8401ea9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -92,7 +92,7 @@ func (c *criService) initPlatform() (err error) {
reg := cdi.GetRegistry()
err = reg.Configure(cdi.WithSpecDirs(c.config.CDISpecDirs...))
if err != nil {
return fmt.Errorf("failed to configure CDI registry")
return fmt.Errorf("failed to configure CDI registry: %w", err)
}
}

View File

@ -22,12 +22,13 @@ import (
cni "github.com/containerd/go-cni"
)
// initPlatform handles linux specific initialization for the CRI service.
// initPlatform handles initialization for the CRI service on non-Windows and non-Linux
// platforms.
func (c *criService) initPlatform() error {
return nil
}
// cniLoadOptions returns cni load options for the linux.
// cniLoadOptions returns cni load options for non-Windows and non-Linux platforms.
func (c *criService) cniLoadOptions() []cni.Opt {
return []cni.Opt{}
}

View File

@ -26,7 +26,7 @@ import (
// attaches to
const windowsNetworkAttachCount = 1
// initPlatform handles linux specific initialization for the CRI service.
// initPlatform handles Windows specific initialization for the CRI service.
func (c *criService) initPlatform() error {
pluginDirs := map[string]string{
defaultNetworkPlugin: c.config.NetworkPluginConfDir,