Skip to content

Commit

Permalink
Merge pull request #4364 from TBBle/send-hcsshim-options-to-hcsshim
Browse files Browse the repository at this point in the history
Send hcsshim's options struct when running with hcsshim
  • Loading branch information
jedevc committed Oct 22, 2023
2 parents ab94d3b + c490b74 commit 3fbc634
Show file tree
Hide file tree
Showing 6 changed files with 1,915 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/buildkitd/main_containerd_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"strings"
"time"

runhcsoptions "github.com/Microsoft/hcsshim/cmd/containerd-shim-runhcs-v1/options"
ctd "github.com/containerd/containerd"
"github.com/containerd/containerd/defaults"
runtimeoptions "github.com/containerd/containerd/pkg/runtimeoptions/v1"
Expand All @@ -32,6 +33,9 @@ import (

const (
defaultContainerdNamespace = "buildkit"

// runtimeRunhcsV1 is the runtime type for runhcs.
runtimeRunhcsV1 = "io.containerd.runhcs.v1"
)

func init() {
Expand Down Expand Up @@ -372,6 +376,8 @@ func getRuntimeOptionsType(t string) interface{} {
switch t {
case plugin.RuntimeRuncV2:
return &runcoptions.Options{}
case runtimeRunhcsV1:
return &runhcsoptions.Options{}
default:
return &runtimeoptions.Options{}
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
Loading

0 comments on commit 3fbc634

Please sign in to comment.