Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
9fafe2f1
Commit
9fafe2f1
authored
Mar 29, 2022
by
Luther Monson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a wrapper around the containerd.New call to fix and pass the proper npipe connector
Signed-off-by:
Luther Monson
<
luther.monson@gmail.com
>
parent
90ce62ce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
config_linux.go
pkg/agent/containerd/config_linux.go
+10
-0
config_windows.go
pkg/agent/containerd/config_windows.go
+11
-0
containerd.go
pkg/agent/containerd/containerd.go
+1
-1
No files found.
pkg/agent/containerd/config_linux.go
View file @
9fafe2f1
...
@@ -8,6 +8,7 @@ import (
...
@@ -8,6 +8,7 @@ import (
"os"
"os"
"time"
"time"
"github.com/containerd/containerd"
"github.com/opencontainers/runc/libcontainer/userns"
"github.com/opencontainers/runc/libcontainer/userns"
"github.com/pkg/errors"
"github.com/pkg/errors"
"github.com/rancher/k3s/pkg/agent/templates"
"github.com/rancher/k3s/pkg/agent/templates"
...
@@ -110,3 +111,12 @@ func CriConnection(ctx context.Context, address string) (*grpc.ClientConn, error
...
@@ -110,3 +111,12 @@ func CriConnection(ctx context.Context, address string) (*grpc.ClientConn, error
return
conn
,
nil
return
conn
,
nil
}
}
func
Client
(
address
string
)
(
*
containerd
.
Client
,
error
)
{
addr
,
_
,
err
:=
util
.
GetAddressAndDialer
(
"unix://"
+
address
)
if
err
!=
nil
{
return
nil
,
err
}
return
containerd
.
New
(
addr
)
}
pkg/agent/containerd/config_windows.go
View file @
9fafe2f1
//go:build windows
// +build windows
// +build windows
package
containerd
package
containerd
...
@@ -8,6 +9,7 @@ import (
...
@@ -8,6 +9,7 @@ import (
"os"
"os"
"time"
"time"
"github.com/containerd/containerd"
"github.com/rancher/k3s/pkg/agent/templates"
"github.com/rancher/k3s/pkg/agent/templates"
util2
"github.com/rancher/k3s/pkg/agent/util"
util2
"github.com/rancher/k3s/pkg/agent/util"
"github.com/rancher/k3s/pkg/daemons/config"
"github.com/rancher/k3s/pkg/daemons/config"
...
@@ -87,3 +89,12 @@ func CriConnection(ctx context.Context, address string) (*grpc.ClientConn, error
...
@@ -87,3 +89,12 @@ func CriConnection(ctx context.Context, address string) (*grpc.ClientConn, error
return
conn
,
nil
return
conn
,
nil
}
}
func
Client
(
address
string
)
(
*
containerd
.
Client
,
error
)
{
addr
,
_
,
err
:=
util
.
GetAddressAndDialer
(
address
)
if
err
!=
nil
{
return
nil
,
err
}
return
containerd
.
New
(
addr
)
}
pkg/agent/containerd/containerd.go
View file @
9fafe2f1
...
@@ -150,7 +150,7 @@ func preloadImages(ctx context.Context, cfg *config.Node) error {
...
@@ -150,7 +150,7 @@ func preloadImages(ctx context.Context, cfg *config.Node) error {
return
nil
return
nil
}
}
client
,
err
:=
containerd
.
New
(
cfg
.
Containerd
.
Address
)
client
,
err
:=
Client
(
cfg
.
Containerd
.
Address
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment