Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit 5e7347d

Browse files
authored
Merge pull request #603 from Random-Liu/support-shared-pid
Support shared pid
2 parents 047df7a + 532a895 commit 5e7347d

File tree

253 files changed

+4969
-34518
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

253 files changed

+4969
-34518
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![Build Status](https://api.travis-ci.org/containerd/cri-containerd.svg?style=flat-square)](https://travis-ci.org/containerd/cri-containerd)
88
[![Go Report Card](https://goreportcard.com/badge/github.com/containerd/cri-containerd?style=flat-square)](https://goreportcard.com/report/github.com/containerd/cri-containerd)
99

10-
`cri-containerd` is a [containerd](https://containerd.io/) based implementation of Kubernetes [container runtime interface (CRI)](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/apis/cri/v1alpha1/runtime/api.proto).
10+
`cri-containerd` is a [containerd](https://containerd.io/) based implementation of Kubernetes [container runtime interface (CRI)](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/apis/cri/runtime/v1alpha2/api.proto).
1111

1212
With it, you could run Kubernetes using containerd as the container runtime.
1313
![cri-containerd](./docs/cri-containerd.png)

docs/architecture.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Architecture of CRI-Containerd
22
This document describes the architecture of `cri-containerd`.
33

4-
Cri-containerd is a containerd based implementation of Kubernetes [container runtime interface (CRI)](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/apis/cri/v1alpha1/runtime/api.proto). It operates on the same node as the [Kubelet](https://kubernetes.io/docs/reference/generated/kubelet/) and [containerd](https://github.com/containerd/containerd). Layered between Kubernetes and containerd, cri-containerd handles all CRI service requests from the Kubelet and uses containerd to manage containers and container images.
4+
Cri-containerd is a containerd based implementation of Kubernetes [container runtime interface (CRI)](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/apis/cri/runtime/v1alpha2/api.proto). It operates on the same node as the [Kubelet](https://kubernetes.io/docs/reference/generated/kubelet/) and [containerd](https://github.com/containerd/containerd). Layered between Kubernetes and containerd, cri-containerd handles all CRI service requests from the Kubelet and uses containerd to manage containers and container images.
55

66
Cri-containerd uses containerd to manage the full container lifecycle and all container images. As also shown below, cri-containerd manages pod networking via [CNI](https://github.com/containernetworking/cni) (another CNCF project).
77

docs/crictl.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ e1c83b0b8d481d4af8ba98d5f7812577fc175a37b10dc824335951f52addbb4e
5555
$ crictl pods
5656
PODSANDBOX ID CREATED STATE NAME NAMESPACE ATTEMPT
5757
e1c83b0b8d481 2 hours ago SANDBOX_READY nginx-sandbox default 1
58-
$ crictl inspects e1c8
58+
$ crictl inspectp e1c8
5959
... displays information about the pod and the pod sandbox pause container.
6060
```
6161
* Note: As shown above, you may use truncated IDs if they are unique.

hack/cri-reset.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ crictl_rm_stopped_containers() {
3131

3232
crictl_stop_pods() {
3333
for x in $($CRICTL_CLI pods | awk '{ print $1 }' | awk '{if(NR>1)print}') ;do
34-
$CRICTL_CLI stops $x
34+
$CRICTL_CLI stopp $x
3535
done
3636
}
3737

3838
crictl_rm_pods() {
3939
for x in $($CRICTL_CLI pods | awk '{ print $1 }' | awk '{if(NR>1)print}') ;do
40-
$CRICTL_CLI rms $x
40+
$CRICTL_CLI rmp $x
4141
done
4242
}
4343

hack/versions

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ RUNC_VERSION=9f9c96235cc97674e935002fc3d78361b696a69e
22
CNI_VERSION=v0.6.0
33
CONTAINERD_VERSION=f12ba2407e328c98f8be5eacbb9c510b073dd4c0
44
CONTAINERD_REPO=
5-
CRITOOL_VERSION=ded07bb08aa23492fa0233bb3af8c4629875f286
6-
KUBERNETES_VERSION=v1.9.0
5+
CRITOOL_VERSION=240a840375cdabb5860c75c99e8b0d0a776006b4
6+
KUBERNETES_VERSION=0caa20c65f147e15f5545862510eb7e81c42b0a3

integration/container_stats_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323

2424
"github.com/stretchr/testify/assert"
2525
"github.com/stretchr/testify/require"
26-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
26+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
2727
)
2828

2929
// Test to verify for a container ID

integration/container_update_resources_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/stretchr/testify/assert"
2525
"github.com/stretchr/testify/require"
2626
"golang.org/x/net/context"
27-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
27+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
2828
)
2929

3030
func checkMemoryLimit(t *testing.T, spec *runtimespec.Spec, memLimit int64) {

integration/image_load_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525

2626
"github.com/stretchr/testify/assert"
2727
"github.com/stretchr/testify/require"
28-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
28+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
2929

3030
api "github.com/containerd/cri-containerd/pkg/api/v1"
3131
)

integration/imagefs_info_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424

2525
"github.com/stretchr/testify/assert"
2626
"github.com/stretchr/testify/require"
27-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
27+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
2828
)
2929

3030
func TestImageFSInfo(t *testing.T) {

integration/restart_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"github.com/stretchr/testify/require"
2828
"golang.org/x/net/context"
2929
"golang.org/x/sys/unix"
30-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
30+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
3131
)
3232

3333
// Restart test must run sequentially.

integration/sandbox_clean_remove_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/stretchr/testify/assert"
2525
"github.com/stretchr/testify/require"
2626
"golang.org/x/net/context"
27-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
27+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
2828
)
2929

3030
func TestSandboxCleanRemove(t *testing.T) {

integration/test_utils.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"github.com/containerd/containerd"
2727
"github.com/sirupsen/logrus"
2828
"k8s.io/kubernetes/pkg/kubelet/apis/cri"
29-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
29+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
3030
"k8s.io/kubernetes/pkg/kubelet/remote"
3131

3232
api "github.com/containerd/cri-containerd/pkg/api/v1"
@@ -104,7 +104,7 @@ func WithHostNetwork(p *runtime.PodSandboxConfig) {
104104
}
105105
if p.Linux.SecurityContext.NamespaceOptions == nil {
106106
p.Linux.SecurityContext.NamespaceOptions = &runtime.NamespaceOption{
107-
HostNetwork: true,
107+
Network: runtime.NamespaceMode_NODE,
108108
}
109109
}
110110
}

integration/truncindex_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121

2222
"github.com/stretchr/testify/assert"
2323
"github.com/stretchr/testify/require"
24-
runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
24+
runtimeapi "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
2525
)
2626

2727
func genTruncIndex(normalName string) string {

integration/volume_copy_up_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424

2525
"github.com/stretchr/testify/assert"
2626
"github.com/stretchr/testify/require"
27-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
27+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
2828
)
2929

3030
func TestVolumeCopyUp(t *testing.T) {

pkg/server/container_attach.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/sirupsen/logrus"
2525
"golang.org/x/net/context"
2626
"k8s.io/client-go/tools/remotecommand"
27-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
27+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
2828

2929
cio "github.com/containerd/cri-containerd/pkg/server/io"
3030
)

pkg/server/container_create.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import (
4343
"github.com/syndtr/gocapability/capability"
4444
"golang.org/x/net/context"
4545
"golang.org/x/sys/unix"
46-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
46+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
4747

4848
"github.com/containerd/cri-containerd/pkg/annotations"
4949
customopts "github.com/containerd/cri-containerd/pkg/containerd/opts"
@@ -427,7 +427,7 @@ func (c *criContainerdService) generateContainerMounts(sandboxRootDir string, co
427427

428428
if !isInCRIMounts(devShm, config.GetMounts()) {
429429
sandboxDevShm := getSandboxDevShm(sandboxRootDir)
430-
if securityContext.GetNamespaceOptions().GetHostIpc() {
430+
if securityContext.GetNamespaceOptions().GetIpc() == runtime.NamespaceMode_NODE {
431431
sandboxDevShm = devShm
432432
}
433433
mounts = append(mounts, &runtime.Mount{
@@ -718,9 +718,9 @@ func setOCINamespaces(g *generate.Generator, namespaces *runtime.NamespaceOption
718718
g.AddOrReplaceLinuxNamespace(string(runtimespec.NetworkNamespace), getNetworkNamespace(sandboxPid)) // nolint: errcheck
719719
g.AddOrReplaceLinuxNamespace(string(runtimespec.IPCNamespace), getIPCNamespace(sandboxPid)) // nolint: errcheck
720720
g.AddOrReplaceLinuxNamespace(string(runtimespec.UTSNamespace), getUTSNamespace(sandboxPid)) // nolint: errcheck
721-
// Do not share pid namespace for now.
722-
if namespaces.GetHostPid() {
723-
g.RemoveLinuxNamespace(string(runtimespec.PIDNamespace)) // nolint: errcheck
721+
// Do not share pid namespace if namespace mode is CONTAINER.
722+
if namespaces.GetPid() != runtime.NamespaceMode_CONTAINER {
723+
g.AddOrReplaceLinuxNamespace(string(runtimespec.PIDNamespace), getPIDNamespace(sandboxPid)) // nolint: errcheck
724724
}
725725
}
726726

pkg/server/container_create_test.go

+37-19
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
"github.com/opencontainers/runtime-tools/generate"
3131
"github.com/stretchr/testify/assert"
3232
"github.com/stretchr/testify/require"
33-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
33+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
3434

3535
"github.com/containerd/cri-containerd/pkg/annotations"
3636
ostesting "github.com/containerd/cri-containerd/pkg/os/testing"
@@ -169,6 +169,10 @@ func getCreateContainerTestData() (*runtime.ContainerConfig, *runtime.PodSandbox
169169
Type: runtimespec.UTSNamespace,
170170
Path: getUTSNamespace(sandboxPid),
171171
})
172+
assert.Contains(t, spec.Linux.Namespaces, runtimespec.LinuxNamespace{
173+
Type: runtimespec.PIDNamespace,
174+
Path: getPIDNamespace(sandboxPid),
175+
})
172176

173177
t.Logf("Check PodSandbox annotations")
174178
assert.Contains(t, spec.Annotations, annotations.SandboxID)
@@ -543,7 +547,7 @@ func TestGenerateContainerMounts(t *testing.T) {
543547
},
544548
"should use host /dev/shm when host ipc is set": {
545549
securityContext: &runtime.LinuxContainerSecurityContext{
546-
NamespaceOptions: &runtime.NamespaceOption{HostIpc: true},
550+
NamespaceOptions: &runtime.NamespaceOption{Ipc: runtime.NamespaceMode_NODE},
547551
},
548552
expectedMounts: []*runtime.Mount{
549553
{
@@ -748,25 +752,39 @@ func TestPidNamespace(t *testing.T) {
748752
testID := "test-id"
749753
testPid := uint32(1234)
750754
testSandboxID := "sandbox-id"
751-
config, sandboxConfig, imageConfig, specCheck := getCreateContainerTestData()
755+
config, sandboxConfig, imageConfig, _ := getCreateContainerTestData()
752756
c := newTestCRIContainerdService()
753-
t.Logf("should not set pid namespace when host pid is true")
754-
config.Linux.SecurityContext.NamespaceOptions = &runtime.NamespaceOption{HostPid: true}
755-
spec, err := c.generateContainerSpec(testID, testSandboxID, testPid, config, sandboxConfig, imageConfig, nil)
756-
require.NoError(t, err)
757-
specCheck(t, testID, testSandboxID, testPid, spec)
758-
for _, ns := range spec.Linux.Namespaces {
759-
assert.NotEqual(t, ns.Type, runtimespec.PIDNamespace)
757+
for desc, test := range map[string]struct {
758+
pidNS runtime.NamespaceMode
759+
expected runtimespec.LinuxNamespace
760+
}{
761+
"node namespace mode": {
762+
pidNS: runtime.NamespaceMode_NODE,
763+
expected: runtimespec.LinuxNamespace{
764+
Type: runtimespec.PIDNamespace,
765+
Path: getPIDNamespace(testPid),
766+
},
767+
},
768+
"container namespace mode": {
769+
pidNS: runtime.NamespaceMode_CONTAINER,
770+
expected: runtimespec.LinuxNamespace{
771+
Type: runtimespec.PIDNamespace,
772+
},
773+
},
774+
"pod namespace mode": {
775+
pidNS: runtime.NamespaceMode_POD,
776+
expected: runtimespec.LinuxNamespace{
777+
Type: runtimespec.PIDNamespace,
778+
Path: getPIDNamespace(testPid),
779+
},
780+
},
781+
} {
782+
t.Logf("TestCase %q", desc)
783+
config.Linux.SecurityContext.NamespaceOptions = &runtime.NamespaceOption{Pid: test.pidNS}
784+
spec, err := c.generateContainerSpec(testID, testSandboxID, testPid, config, sandboxConfig, imageConfig, nil)
785+
require.NoError(t, err)
786+
assert.Contains(t, spec.Linux.Namespaces, test.expected)
760787
}
761-
762-
t.Logf("should set pid namespace when host pid is false")
763-
config.Linux.SecurityContext.NamespaceOptions = &runtime.NamespaceOption{HostPid: false}
764-
spec, err = c.generateContainerSpec(testID, testSandboxID, testPid, config, sandboxConfig, imageConfig, nil)
765-
require.NoError(t, err)
766-
specCheck(t, testID, testSandboxID, testPid, spec)
767-
assert.Contains(t, spec.Linux.Namespaces, runtimespec.LinuxNamespace{
768-
Type: runtimespec.PIDNamespace,
769-
})
770788
}
771789

772790
func TestDefaultRuntimeSpec(t *testing.T) {

pkg/server/container_exec.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"fmt"
2121

2222
"golang.org/x/net/context"
23-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
23+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
2424
)
2525

2626
// Exec prepares a streaming endpoint to execute a command in the container, and returns the address.

pkg/server/container_execsync.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
"golang.org/x/net/context"
3030
"golang.org/x/sys/unix"
3131
"k8s.io/client-go/tools/remotecommand"
32-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
32+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
3333

3434
cioutil "github.com/containerd/cri-containerd/pkg/ioutil"
3535
cio "github.com/containerd/cri-containerd/pkg/server/io"

pkg/server/container_list.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package server
1919
import (
2020
"golang.org/x/net/context"
2121

22-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
22+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
2323

2424
containerstore "github.com/containerd/cri-containerd/pkg/store/container"
2525
)

pkg/server/container_list_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"github.com/stretchr/testify/assert"
2424
"github.com/stretchr/testify/require"
2525
"golang.org/x/net/context"
26-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
26+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
2727

2828
containerstore "github.com/containerd/cri-containerd/pkg/store/container"
2929
sandboxstore "github.com/containerd/cri-containerd/pkg/store/sandbox"

pkg/server/container_log_reopen.go

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
Copyright 2018 The Containerd Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package server
18+
19+
import (
20+
"errors"
21+
"golang.org/x/net/context"
22+
23+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
24+
)
25+
26+
// ReopenContainerLog asks cri-containerd to reopen the stdout/stderr log file for the container.
27+
// This is often called after the log file has been rotated.
28+
// TODO(random-liu): Implement this for kubelet log rotation.
29+
func (c *criContainerdService) ReopenContainerLog(ctx context.Context, r *runtime.ReopenContainerLogRequest) (*runtime.ReopenContainerLogResponse, error) {
30+
return nil, errors.New("not implemented")
31+
}

pkg/server/container_remove.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/docker/docker/pkg/system"
2525
"github.com/sirupsen/logrus"
2626
"golang.org/x/net/context"
27-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
27+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
2828

2929
"github.com/containerd/cri-containerd/pkg/log"
3030
"github.com/containerd/cri-containerd/pkg/store"

pkg/server/container_start.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"github.com/containerd/containerd/errdefs"
2727
"github.com/sirupsen/logrus"
2828
"golang.org/x/net/context"
29-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
29+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
3030

3131
cio "github.com/containerd/cri-containerd/pkg/server/io"
3232
containerstore "github.com/containerd/cri-containerd/pkg/store/container"

pkg/server/container_stats.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121

2222
tasks "github.com/containerd/containerd/api/services/tasks/v1"
2323
"golang.org/x/net/context"
24-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
24+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
2525
)
2626

2727
// ContainerStats returns stats of the container. If the container does not

pkg/server/container_stats_list.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/containerd/containerd/api/types"
2525
"github.com/containerd/typeurl"
2626
"golang.org/x/net/context"
27-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
27+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
2828

2929
containerstore "github.com/containerd/cri-containerd/pkg/store/container"
3030
)

pkg/server/container_status.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
runtimespec "github.com/opencontainers/runtime-spec/specs-go"
2424
"github.com/sirupsen/logrus"
2525
"golang.org/x/net/context"
26-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
26+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
2727

2828
containerstore "github.com/containerd/cri-containerd/pkg/store/container"
2929
)

pkg/server/container_status_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
"github.com/stretchr/testify/assert"
2424
"golang.org/x/net/context"
25-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
25+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
2626

2727
containerstore "github.com/containerd/cri-containerd/pkg/store/container"
2828
imagestore "github.com/containerd/cri-containerd/pkg/store/image"

pkg/server/container_stop.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
"github.com/sirupsen/logrus"
2727
"golang.org/x/net/context"
2828
"golang.org/x/sys/unix"
29-
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
29+
runtime "k8s.io/kubernetes/pkg/kubelet/apis/cri/runtime/v1alpha2"
3030

3131
containerstore "github.com/containerd/cri-containerd/pkg/store/container"
3232
)

0 commit comments

Comments
 (0)