Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
New GRPC init
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Hiltgen committed Jul 1, 2022
1 parent 01d4fc3 commit 653dafc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/vmware-tanzu/buildkit-cli-for-kubectl/pkg/imagetools"
"github.com/vmware-tanzu/buildkit-cli-for-kubectl/pkg/progress"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"k8s.io/client-go/tools/clientcmd"

"github.com/docker/distribution/reference"
Expand Down Expand Up @@ -1053,7 +1054,7 @@ func newContainerdLoader(ctx context.Context, d driver.Driver, kubeClientConfig
started := make([]chan struct{}, len(nodeNames))
for i := range nodeNames {
nodeName := nodeNames[i]
c, err := containerd.New(nodeName,
c, err := containerd.New("/run/containerd/containerd.sock",

// TODO - plumb the containerd namespace through so this isn't hard-coded
containerd.WithDefaultNamespace("k8s.io"),
Expand All @@ -1067,11 +1068,11 @@ func newContainerdLoader(ctx context.Context, d driver.Driver, kubeClientConfig
return conn, nil
},
),
grpc.WithInsecure(), // Nested connection on an existing secure transport
grpc.WithTransportCredentials(insecure.NewCredentials()), // Nested connection on an existing secure transport
}),
)
if err != nil {
return nil, nil, fmt.Errorf("failed to set up docker client via proxy: %w", err)
return nil, nil, fmt.Errorf("failed to set up containerd client via proxy: %w", err)
}

pr, pw := io.Pipe()
Expand Down

0 comments on commit 653dafc

Please sign in to comment.