Use local version of cri packages
Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
@@ -1,41 +1,18 @@
|
||||
/*
|
||||
Copyright The containerd Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: api.proto
|
||||
// source: github.com/containerd/containerd/pkg/api/runtimeoptions/v1/api.proto
|
||||
|
||||
/*
|
||||
Package cri_runtimeoptions_v1 is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
api.proto
|
||||
|
||||
It has these top-level messages:
|
||||
Options
|
||||
*/
|
||||
package cri_runtimeoptions_v1
|
||||
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import _ "github.com/gogo/protobuf/gogoproto"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
||||
import io "io"
|
||||
import (
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
reflect "reflect"
|
||||
strings "strings"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
@@ -46,19 +23,49 @@ var _ = math.Inf
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type Options struct {
|
||||
// TypeUrl specifies the type of the content inside the config file.
|
||||
TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
|
||||
// ConfigPath specifies the filesystem location of the config file
|
||||
// used by the runtime.
|
||||
ConfigPath string `protobuf:"bytes,2,opt,name=config_path,json=configPath,proto3" json:"config_path,omitempty"`
|
||||
ConfigPath string `protobuf:"bytes,2,opt,name=config_path,json=configPath,proto3" json:"config_path,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Options) Reset() { *m = Options{} }
|
||||
func (*Options) ProtoMessage() {}
|
||||
func (*Options) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{0} }
|
||||
func (m *Options) Reset() { *m = Options{} }
|
||||
func (*Options) ProtoMessage() {}
|
||||
func (*Options) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_8398b2d76ed13c1c, []int{0}
|
||||
}
|
||||
func (m *Options) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *Options) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_Options.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *Options) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_Options.Merge(m, src)
|
||||
}
|
||||
func (m *Options) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *Options) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_Options.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_Options proto.InternalMessageInfo
|
||||
|
||||
func (m *Options) GetTypeUrl() string {
|
||||
if m != nil {
|
||||
@@ -77,10 +84,33 @@ func (m *Options) GetConfigPath() string {
|
||||
func init() {
|
||||
proto.RegisterType((*Options)(nil), "cri.runtimeoptions.v1.Options")
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterFile("github.com/containerd/containerd/pkg/api/runtimeoptions/v1/api.proto", fileDescriptor_8398b2d76ed13c1c)
|
||||
}
|
||||
|
||||
var fileDescriptor_8398b2d76ed13c1c = []byte{
|
||||
// 224 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x49, 0xcf, 0x2c, 0xc9,
|
||||
0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
|
||||
0x4a, 0x41, 0x66, 0x16, 0x64, 0xa7, 0xeb, 0x27, 0x16, 0x64, 0xea, 0x17, 0x95, 0xe6, 0x95, 0x64,
|
||||
0xe6, 0xa6, 0xe6, 0x17, 0x94, 0x64, 0xe6, 0xe7, 0x15, 0xeb, 0x97, 0x19, 0x82, 0x44, 0xf5, 0x0a,
|
||||
0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x44, 0x93, 0x8b, 0x32, 0xf5, 0x50, 0x15, 0xe8, 0x95, 0x19, 0x4a,
|
||||
0xe9, 0x22, 0x19, 0x9e, 0x9e, 0x9f, 0x9e, 0xaf, 0x0f, 0x56, 0x9d, 0x54, 0x9a, 0x06, 0xe6, 0x81,
|
||||
0x39, 0x60, 0x16, 0xc4, 0x14, 0x25, 0x57, 0x2e, 0x76, 0x7f, 0x88, 0x66, 0x21, 0x49, 0x2e, 0x8e,
|
||||
0x92, 0xca, 0x82, 0xd4, 0xf8, 0xd2, 0xa2, 0x1c, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x76,
|
||||
0x10, 0x3f, 0xb4, 0x28, 0x47, 0x48, 0x9e, 0x8b, 0x3b, 0x39, 0x3f, 0x2f, 0x2d, 0x33, 0x3d, 0xbe,
|
||||
0x20, 0xb1, 0x24, 0x43, 0x82, 0x09, 0x2c, 0xcb, 0x05, 0x11, 0x0a, 0x48, 0x2c, 0xc9, 0x70, 0xca,
|
||||
0x3b, 0xf1, 0x50, 0x8e, 0xf1, 0xc6, 0x43, 0x39, 0x86, 0x86, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9,
|
||||
0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x51, 0x01,
|
||||
0xe4, 0x7b, 0xd8, 0x3a, 0xb9, 0x28, 0x33, 0x1e, 0x55, 0x34, 0xbe, 0xcc, 0x30, 0x89, 0x0d, 0xec,
|
||||
0x7a, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa5, 0x97, 0xee, 0x94, 0x4b, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *Options) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalTo(dAtA)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -88,35 +118,47 @@ func (m *Options) Marshal() (dAtA []byte, err error) {
|
||||
}
|
||||
|
||||
func (m *Options) MarshalTo(dAtA []byte) (int, error) {
|
||||
var i int
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *Options) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.TypeUrl) > 0 {
|
||||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintApi(dAtA, i, uint64(len(m.TypeUrl)))
|
||||
i += copy(dAtA[i:], m.TypeUrl)
|
||||
}
|
||||
if len(m.ConfigPath) > 0 {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
i -= len(m.ConfigPath)
|
||||
copy(dAtA[i:], m.ConfigPath)
|
||||
i = encodeVarintApi(dAtA, i, uint64(len(m.ConfigPath)))
|
||||
i += copy(dAtA[i:], m.ConfigPath)
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
return i, nil
|
||||
if len(m.TypeUrl) > 0 {
|
||||
i -= len(m.TypeUrl)
|
||||
copy(dAtA[i:], m.TypeUrl)
|
||||
i = encodeVarintApi(dAtA, i, uint64(len(m.TypeUrl)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintApi(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovApi(v)
|
||||
base := offset
|
||||
for v >= 1<<7 {
|
||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||
v >>= 7
|
||||
offset++
|
||||
}
|
||||
dAtA[offset] = uint8(v)
|
||||
return offset + 1
|
||||
return base
|
||||
}
|
||||
func (m *Options) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.TypeUrl)
|
||||
@@ -131,14 +173,7 @@ func (m *Options) Size() (n int) {
|
||||
}
|
||||
|
||||
func sovApi(x uint64) (n int) {
|
||||
for {
|
||||
n++
|
||||
x >>= 7
|
||||
if x == 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
return n
|
||||
return (math_bits.Len64(x|1) + 6) / 7
|
||||
}
|
||||
func sozApi(x uint64) (n int) {
|
||||
return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
@@ -177,7 +212,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
@@ -205,7 +240,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= (uint64(b) & 0x7F) << shift
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
@@ -215,6 +250,9 @@ func (m *Options) Unmarshal(dAtA []byte) error {
|
||||
return ErrInvalidLengthApi
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthApi
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
@@ -234,7 +272,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= (uint64(b) & 0x7F) << shift
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
@@ -244,6 +282,9 @@ func (m *Options) Unmarshal(dAtA []byte) error {
|
||||
return ErrInvalidLengthApi
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthApi
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
@@ -258,6 +299,9 @@ func (m *Options) Unmarshal(dAtA []byte) error {
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthApi
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthApi
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
@@ -273,6 +317,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
|
||||
func skipApi(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
depth := 0
|
||||
for iNdEx < l {
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
@@ -304,10 +349,8 @@ func skipApi(dAtA []byte) (n int, err error) {
|
||||
break
|
||||
}
|
||||
}
|
||||
return iNdEx, nil
|
||||
case 1:
|
||||
iNdEx += 8
|
||||
return iNdEx, nil
|
||||
case 2:
|
||||
var length int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
@@ -324,71 +367,34 @@ func skipApi(dAtA []byte) (n int, err error) {
|
||||
break
|
||||
}
|
||||
}
|
||||
iNdEx += length
|
||||
if length < 0 {
|
||||
return 0, ErrInvalidLengthApi
|
||||
}
|
||||
return iNdEx, nil
|
||||
iNdEx += length
|
||||
case 3:
|
||||
for {
|
||||
var innerWire uint64
|
||||
var start int = iNdEx
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowApi
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
innerWire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
innerWireType := int(innerWire & 0x7)
|
||||
if innerWireType == 4 {
|
||||
break
|
||||
}
|
||||
next, err := skipApi(dAtA[start:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
iNdEx = start + next
|
||||
}
|
||||
return iNdEx, nil
|
||||
depth++
|
||||
case 4:
|
||||
return iNdEx, nil
|
||||
if depth == 0 {
|
||||
return 0, ErrUnexpectedEndOfGroupApi
|
||||
}
|
||||
depth--
|
||||
case 5:
|
||||
iNdEx += 4
|
||||
return iNdEx, nil
|
||||
default:
|
||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||
}
|
||||
if iNdEx < 0 {
|
||||
return 0, ErrInvalidLengthApi
|
||||
}
|
||||
if depth == 0 {
|
||||
return iNdEx, nil
|
||||
}
|
||||
}
|
||||
panic("unreachable")
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
|
||||
var (
|
||||
ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||
ErrIntOverflowApi = fmt.Errorf("proto: integer overflow")
|
||||
ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||
ErrIntOverflowApi = fmt.Errorf("proto: integer overflow")
|
||||
ErrUnexpectedEndOfGroupApi = fmt.Errorf("proto: unexpected end of group")
|
||||
)
|
||||
|
||||
func init() { proto.RegisterFile("api.proto", fileDescriptorApi) }
|
||||
|
||||
var fileDescriptorApi = []byte{
|
||||
// 183 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4c, 0x2c, 0xc8, 0xd4,
|
||||
0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x4d, 0x2e, 0xca, 0xd4, 0x2b, 0x2a, 0xcd, 0x2b, 0xc9,
|
||||
0xcc, 0x4d, 0xcd, 0x2f, 0x28, 0xc9, 0xcc, 0xcf, 0x2b, 0xd6, 0x2b, 0x33, 0x94, 0xd2, 0x4d, 0xcf,
|
||||
0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0xab,
|
||||
0x4e, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0x62, 0x8a, 0x92, 0x2b, 0x17, 0xbb, 0x3f,
|
||||
0x44, 0xb3, 0x90, 0x24, 0x17, 0x47, 0x49, 0x65, 0x41, 0x6a, 0x7c, 0x69, 0x51, 0x8e, 0x04, 0xa3,
|
||||
0x02, 0xa3, 0x06, 0x67, 0x10, 0x3b, 0x88, 0x1f, 0x5a, 0x94, 0x23, 0x24, 0xcf, 0xc5, 0x9d, 0x9c,
|
||||
0x9f, 0x97, 0x96, 0x99, 0x1e, 0x5f, 0x90, 0x58, 0x92, 0x21, 0xc1, 0x04, 0x96, 0xe5, 0x82, 0x08,
|
||||
0x05, 0x24, 0x96, 0x64, 0x38, 0xc9, 0x9c, 0x78, 0x28, 0xc7, 0x78, 0xe3, 0xa1, 0x1c, 0x43, 0xc3,
|
||||
0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71,
|
||||
0xc2, 0x63, 0x39, 0x86, 0x24, 0x36, 0xb0, 0x5d, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07,
|
||||
0x00, 0xf2, 0x18, 0xbe, 0x00, 0x00, 0x00,
|
||||
}
|
||||
|
||||
@@ -13,6 +13,9 @@ option (gogoproto.sizer_all) = true;
|
||||
option (gogoproto.unmarshaler_all) = true;
|
||||
option (gogoproto.goproto_unrecognized_all) = false;
|
||||
|
||||
|
||||
option go_package = "github.com/containerd/containerd/pkg/api/runtimeoptions/v1;cri_runtimeoptions_v1";
|
||||
|
||||
message Options {
|
||||
// TypeUrl specifies the type of the content inside the config file.
|
||||
string type_url = 1;
|
||||
|
||||
@@ -21,7 +21,7 @@ package config
|
||||
import (
|
||||
"github.com/BurntSushi/toml"
|
||||
"github.com/containerd/containerd"
|
||||
"github.com/containerd/cri/pkg/streaming"
|
||||
"github.com/containerd/containerd/pkg/streaming"
|
||||
)
|
||||
|
||||
// DefaultConfig returns default configurations of cri plugin.
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
"github.com/containerd/cri/pkg/streaming"
|
||||
"github.com/containerd/containerd/pkg/streaming"
|
||||
)
|
||||
|
||||
// DefaultConfig returns default configurations of cri plugin.
|
||||
|
||||
@@ -40,8 +40,8 @@ import (
|
||||
"golang.org/x/sys/unix"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
osinterface "github.com/containerd/cri/pkg/os"
|
||||
"github.com/containerd/cri/pkg/util"
|
||||
osinterface "github.com/containerd/containerd/pkg/os"
|
||||
"github.com/containerd/containerd/pkg/util"
|
||||
)
|
||||
|
||||
// WithAdditionalGIDs adds any additional groups listed for a particular user in the
|
||||
|
||||
@@ -30,7 +30,7 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
osinterface "github.com/containerd/cri/pkg/os"
|
||||
osinterface "github.com/containerd/containerd/pkg/os"
|
||||
)
|
||||
|
||||
// WithWindowsNetworkNamespace sets windows network namespace for container.
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
"github.com/containerd/containerd/namespaces"
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"github.com/containerd/cri/pkg/constants"
|
||||
"github.com/containerd/containerd/pkg/constants"
|
||||
)
|
||||
|
||||
// deferCleanupTimeout is the default timeout for containerd cleanup operations
|
||||
|
||||
@@ -39,10 +39,10 @@ import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"k8s.io/klog/v2"
|
||||
|
||||
criconfig "github.com/containerd/cri/pkg/config"
|
||||
"github.com/containerd/cri/pkg/constants"
|
||||
criplatforms "github.com/containerd/cri/pkg/containerd/platforms"
|
||||
"github.com/containerd/cri/pkg/server"
|
||||
criconfig "github.com/containerd/containerd/pkg/config"
|
||||
"github.com/containerd/containerd/pkg/constants"
|
||||
criplatforms "github.com/containerd/containerd/pkg/containerd/platforms"
|
||||
"github.com/containerd/containerd/pkg/server"
|
||||
)
|
||||
|
||||
// TODO(random-liu): Use github.com/pkg/errors for our errors.
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
|
||||
containerdmount "github.com/containerd/containerd/mount"
|
||||
|
||||
osInterface "github.com/containerd/cri/pkg/os"
|
||||
osInterface "github.com/containerd/containerd/pkg/os"
|
||||
)
|
||||
|
||||
// CalledDetail is the struct contains called function name and arguments.
|
||||
|
||||
@@ -18,6 +18,6 @@
|
||||
|
||||
package testing
|
||||
|
||||
import osInterface "github.com/containerd/cri/pkg/os"
|
||||
import osInterface "github.com/containerd/containerd/pkg/os"
|
||||
|
||||
var _ osInterface.UNIX = &FakeOS{}
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
"k8s.io/client-go/tools/remotecommand"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
cio "github.com/containerd/cri/pkg/server/io"
|
||||
cio "github.com/containerd/containerd/pkg/server/io"
|
||||
)
|
||||
|
||||
// Attach prepares a streaming endpoint to attach to a running container, and returns the address.
|
||||
|
||||
@@ -33,16 +33,16 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
customopts "github.com/containerd/cri/pkg/containerd/opts"
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
cio "github.com/containerd/cri/pkg/server/io"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
"github.com/containerd/cri/pkg/util"
|
||||
customopts "github.com/containerd/containerd/pkg/containerd/opts"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
cio "github.com/containerd/containerd/pkg/server/io"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
"github.com/containerd/containerd/pkg/util"
|
||||
)
|
||||
|
||||
func init() {
|
||||
typeurl.Register(&containerstore.Metadata{},
|
||||
"github.com/containerd/cri/pkg/store/container", "Metadata")
|
||||
"github.com/containerd/containerd/pkg/store/container", "Metadata")
|
||||
}
|
||||
|
||||
// CreateContainer creates a new container in the given PodSandbox.
|
||||
|
||||
@@ -34,9 +34,9 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
"github.com/containerd/cri/pkg/config"
|
||||
customopts "github.com/containerd/cri/pkg/containerd/opts"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
"github.com/containerd/containerd/pkg/config"
|
||||
customopts "github.com/containerd/containerd/pkg/containerd/opts"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -40,12 +40,12 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
"github.com/containerd/cri/pkg/config"
|
||||
"github.com/containerd/cri/pkg/containerd/opts"
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
ostesting "github.com/containerd/cri/pkg/os/testing"
|
||||
"github.com/containerd/cri/pkg/util"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
"github.com/containerd/containerd/pkg/config"
|
||||
"github.com/containerd/containerd/pkg/containerd/opts"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
ostesting "github.com/containerd/containerd/pkg/os/testing"
|
||||
"github.com/containerd/containerd/pkg/util"
|
||||
)
|
||||
|
||||
func getCreateContainerTestData() (*runtime.ContainerConfig, *runtime.PodSandboxConfig,
|
||||
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
runtimespec "github.com/opencontainers/runtime-spec/specs-go"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/config"
|
||||
"github.com/containerd/containerd/pkg/config"
|
||||
)
|
||||
|
||||
// containerMounts sets up necessary container system file mounts
|
||||
|
||||
@@ -28,9 +28,9 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/config"
|
||||
"github.com/containerd/cri/pkg/constants"
|
||||
"github.com/containerd/cri/pkg/containerd/opts"
|
||||
"github.com/containerd/containerd/pkg/config"
|
||||
"github.com/containerd/containerd/pkg/constants"
|
||||
"github.com/containerd/containerd/pkg/containerd/opts"
|
||||
)
|
||||
|
||||
func checkMount(t *testing.T, mounts []runtimespec.Mount, src, dest, typ string,
|
||||
|
||||
@@ -24,9 +24,9 @@ import (
|
||||
runtimespec "github.com/opencontainers/runtime-spec/specs-go"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
"github.com/containerd/cri/pkg/config"
|
||||
customopts "github.com/containerd/cri/pkg/containerd/opts"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
"github.com/containerd/containerd/pkg/config"
|
||||
customopts "github.com/containerd/containerd/pkg/containerd/opts"
|
||||
)
|
||||
|
||||
// No container mounts for windows.
|
||||
|
||||
@@ -26,8 +26,8 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
"github.com/containerd/cri/pkg/config"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
"github.com/containerd/containerd/pkg/config"
|
||||
)
|
||||
|
||||
func getCreateContainerTestData() (*runtime.ContainerConfig, *runtime.PodSandboxConfig,
|
||||
|
||||
@@ -32,10 +32,10 @@ import (
|
||||
"k8s.io/client-go/tools/remotecommand"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
cioutil "github.com/containerd/cri/pkg/ioutil"
|
||||
cio "github.com/containerd/cri/pkg/server/io"
|
||||
"github.com/containerd/cri/pkg/util"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
cioutil "github.com/containerd/containerd/pkg/ioutil"
|
||||
cio "github.com/containerd/containerd/pkg/server/io"
|
||||
"github.com/containerd/containerd/pkg/util"
|
||||
)
|
||||
|
||||
// ExecSync executes a command in the container, and returns the stdout output.
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
// ListContainers lists all containers matching the filter.
|
||||
|
||||
@@ -25,8 +25,8 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
func TestToCRIContainer(t *testing.T) {
|
||||
|
||||
@@ -25,8 +25,8 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
// RemoveContainer removes the container.
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
// TestSetContainerRemoving tests setContainerRemoving sets removing
|
||||
|
||||
@@ -31,11 +31,11 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
cioutil "github.com/containerd/cri/pkg/ioutil"
|
||||
cio "github.com/containerd/cri/pkg/server/io"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
cioutil "github.com/containerd/containerd/pkg/ioutil"
|
||||
cio "github.com/containerd/containerd/pkg/server/io"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
// StartContainer starts the container.
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
// TestSetContainerStarting tests setContainerStarting sets removing
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
// ListContainerStats returns stats of all running containers.
|
||||
|
||||
@@ -26,7 +26,7 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
func (c *criService) containerMetrics(
|
||||
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
func (c *criService) containerMetrics(
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
func (c *criService) containerMetrics(
|
||||
|
||||
@@ -24,8 +24,8 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
// ContainerStatus inspects the container and returns the status.
|
||||
|
||||
@@ -24,8 +24,8 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
imagestore "github.com/containerd/cri/pkg/store/image"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
imagestore "github.com/containerd/containerd/pkg/store/image"
|
||||
)
|
||||
|
||||
func getContainerStatusTestData() (*containerstore.Metadata, *containerstore.Status,
|
||||
|
||||
@@ -28,9 +28,9 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
// StopContainer stops a running container with a grace period (i.e., timeout).
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"golang.org/x/net/context"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
func TestWaitContainerStop(t *testing.T) {
|
||||
|
||||
@@ -29,10 +29,10 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/containerd/opts"
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
"github.com/containerd/cri/pkg/util"
|
||||
"github.com/containerd/containerd/pkg/containerd/opts"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
"github.com/containerd/containerd/pkg/util"
|
||||
)
|
||||
|
||||
// UpdateContainerResources updates ContainerConfig of the container.
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
)
|
||||
|
||||
// UpdateContainerResources updates ContainerConfig of the container.
|
||||
|
||||
@@ -32,11 +32,11 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
"k8s.io/apimachinery/pkg/util/clock"
|
||||
|
||||
"github.com/containerd/cri/pkg/constants"
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
"github.com/containerd/containerd/pkg/constants"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -37,12 +37,12 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
runtimeoptions "github.com/containerd/cri/pkg/api/runtimeoptions/v1"
|
||||
criconfig "github.com/containerd/cri/pkg/config"
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
imagestore "github.com/containerd/cri/pkg/store/image"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
runtimeoptions "github.com/containerd/containerd/pkg/api/runtimeoptions/v1"
|
||||
criconfig "github.com/containerd/containerd/pkg/config"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
imagestore "github.com/containerd/containerd/pkg/store/image"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -30,8 +30,8 @@ import (
|
||||
|
||||
"github.com/containerd/containerd/log"
|
||||
"github.com/containerd/containerd/mount"
|
||||
"github.com/containerd/cri/pkg/seccomp"
|
||||
"github.com/containerd/cri/pkg/seutil"
|
||||
"github.com/containerd/containerd/pkg/seccomp"
|
||||
"github.com/containerd/containerd/pkg/seutil"
|
||||
runcapparmor "github.com/opencontainers/runc/libcontainer/apparmor"
|
||||
"github.com/opencontainers/runtime-spec/specs-go"
|
||||
"github.com/opencontainers/selinux/go-selinux/label"
|
||||
|
||||
@@ -32,9 +32,9 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
criconfig "github.com/containerd/cri/pkg/config"
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
imagestore "github.com/containerd/cri/pkg/store/image"
|
||||
criconfig "github.com/containerd/containerd/pkg/config"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
imagestore "github.com/containerd/containerd/pkg/store/image"
|
||||
)
|
||||
|
||||
// TestGetUserFromImage tests the logic of getting image uid or user name of image user.
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
imagestore "github.com/containerd/cri/pkg/store/image"
|
||||
imagestore "github.com/containerd/containerd/pkg/store/image"
|
||||
)
|
||||
|
||||
func TestListImages(t *testing.T) {
|
||||
|
||||
@@ -42,7 +42,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
criconfig "github.com/containerd/cri/pkg/config"
|
||||
criconfig "github.com/containerd/containerd/pkg/config"
|
||||
)
|
||||
|
||||
// For image management:
|
||||
|
||||
@@ -28,7 +28,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
criconfig "github.com/containerd/cri/pkg/config"
|
||||
criconfig "github.com/containerd/containerd/pkg/config"
|
||||
)
|
||||
|
||||
func TestParseAuth(t *testing.T) {
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
)
|
||||
|
||||
// RemoveImage removes the image.
|
||||
|
||||
@@ -25,8 +25,8 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
imagestore "github.com/containerd/cri/pkg/store/image"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
imagestore "github.com/containerd/containerd/pkg/store/image"
|
||||
)
|
||||
|
||||
// ImageStatus returns the status of the image, returns nil if the image isn't present.
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
imagestore "github.com/containerd/cri/pkg/store/image"
|
||||
imagestore "github.com/containerd/containerd/pkg/store/image"
|
||||
)
|
||||
|
||||
func TestImageStatus(t *testing.T) {
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
snapshotstore "github.com/containerd/cri/pkg/store/snapshot"
|
||||
snapshotstore "github.com/containerd/containerd/pkg/store/snapshot"
|
||||
)
|
||||
|
||||
func TestImageFsInfo(t *testing.T) {
|
||||
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
)
|
||||
|
||||
// instrumentedService wraps service with containerd namespace and logs.
|
||||
|
||||
@@ -25,8 +25,8 @@ import (
|
||||
"github.com/containerd/containerd/cio"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
cioutil "github.com/containerd/cri/pkg/ioutil"
|
||||
"github.com/containerd/cri/pkg/util"
|
||||
cioutil "github.com/containerd/containerd/pkg/ioutil"
|
||||
"github.com/containerd/containerd/pkg/util"
|
||||
)
|
||||
|
||||
// streamKey generates a key for the stream.
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"github.com/containerd/containerd/cio"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
cioutil "github.com/containerd/cri/pkg/ioutil"
|
||||
cioutil "github.com/containerd/containerd/pkg/ioutil"
|
||||
)
|
||||
|
||||
// ExecIO holds the exec io.
|
||||
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
"github.com/sirupsen/logrus"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
cioutil "github.com/containerd/cri/pkg/ioutil"
|
||||
cioutil "github.com/containerd/containerd/pkg/ioutil"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
cioutil "github.com/containerd/cri/pkg/ioutil"
|
||||
cioutil "github.com/containerd/containerd/pkg/ioutil"
|
||||
)
|
||||
|
||||
func TestRedirectLogs(t *testing.T) {
|
||||
|
||||
@@ -34,11 +34,11 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
"github.com/containerd/cri/pkg/netns"
|
||||
cio "github.com/containerd/cri/pkg/server/io"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
"github.com/containerd/containerd/pkg/netns"
|
||||
cio "github.com/containerd/containerd/pkg/server/io"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
// NOTE: The recovery logic has following assumption: when the cri plugin is down:
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
// ListPodSandbox returns a list of Sandbox.
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
func TestToCRISandbox(t *testing.T) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
// PortForward prepares a streaming endpoint to forward ports from a PodSandbox, and returns the address.
|
||||
|
||||
@@ -27,8 +27,8 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
"k8s.io/utils/exec"
|
||||
|
||||
"github.com/containerd/cri/pkg/ioutil"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
"github.com/containerd/containerd/pkg/ioutil"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
func (c *criService) portForward(ctx context.Context, id string, port int32, stream io.ReadWriter) error {
|
||||
|
||||
@@ -25,8 +25,8 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
// RemovePodSandbox removes the sandbox. If there are running containers in the
|
||||
|
||||
@@ -36,20 +36,20 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
criconfig "github.com/containerd/cri/pkg/config"
|
||||
customopts "github.com/containerd/cri/pkg/containerd/opts"
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
"github.com/containerd/cri/pkg/netns"
|
||||
"github.com/containerd/cri/pkg/server/bandwidth"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
"github.com/containerd/cri/pkg/util"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
criconfig "github.com/containerd/containerd/pkg/config"
|
||||
customopts "github.com/containerd/containerd/pkg/containerd/opts"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
"github.com/containerd/containerd/pkg/netns"
|
||||
"github.com/containerd/containerd/pkg/server/bandwidth"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
"github.com/containerd/containerd/pkg/util"
|
||||
selinux "github.com/opencontainers/selinux/go-selinux"
|
||||
)
|
||||
|
||||
func init() {
|
||||
typeurl.Register(&sandboxstore.Metadata{},
|
||||
"github.com/containerd/cri/pkg/store/sandbox", "Metadata")
|
||||
"github.com/containerd/containerd/pkg/store/sandbox", "Metadata")
|
||||
}
|
||||
|
||||
// RunPodSandbox creates and starts a pod-level sandbox. Runtimes should ensure
|
||||
|
||||
@@ -31,9 +31,9 @@ import (
|
||||
"golang.org/x/sys/unix"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
customopts "github.com/containerd/cri/pkg/containerd/opts"
|
||||
osinterface "github.com/containerd/cri/pkg/os"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
customopts "github.com/containerd/containerd/pkg/containerd/opts"
|
||||
osinterface "github.com/containerd/containerd/pkg/os"
|
||||
)
|
||||
|
||||
func (c *criService) sandboxContainerSpec(id string, config *runtime.PodSandboxConfig,
|
||||
|
||||
@@ -28,9 +28,9 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
"github.com/containerd/cri/pkg/containerd/opts"
|
||||
ostesting "github.com/containerd/cri/pkg/os/testing"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
"github.com/containerd/containerd/pkg/containerd/opts"
|
||||
ostesting "github.com/containerd/containerd/pkg/os/testing"
|
||||
)
|
||||
|
||||
func getRunPodSandboxTestData() (*runtime.PodSandboxConfig, *imagespec.ImageConfig, func(*testing.T, string, *runtimespec.Spec)) {
|
||||
|
||||
@@ -27,9 +27,9 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
criconfig "github.com/containerd/cri/pkg/config"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
criconfig "github.com/containerd/containerd/pkg/config"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
func TestSandboxContainerSpec(t *testing.T) {
|
||||
|
||||
@@ -26,8 +26,8 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
customopts "github.com/containerd/cri/pkg/containerd/opts"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
customopts "github.com/containerd/containerd/pkg/containerd/opts"
|
||||
)
|
||||
|
||||
func (c *criService) sandboxContainerSpec(id string, config *runtime.PodSandboxConfig,
|
||||
|
||||
@@ -26,8 +26,8 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/annotations"
|
||||
"github.com/containerd/cri/pkg/containerd/opts"
|
||||
"github.com/containerd/containerd/pkg/annotations"
|
||||
"github.com/containerd/containerd/pkg/containerd/opts"
|
||||
)
|
||||
|
||||
func getRunPodSandboxTestData() (*runtime.PodSandboxConfig, *imagespec.ImageConfig, func(*testing.T, string, *runtimespec.Spec)) {
|
||||
|
||||
@@ -28,7 +28,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
// PodSandboxStatus returns the status of the PodSandbox.
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
func TestPodSandboxStatus(t *testing.T) {
|
||||
|
||||
@@ -27,8 +27,8 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
// StopPodSandbox stops the sandbox. If there are any running containers in the
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"golang.org/x/net/context"
|
||||
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
)
|
||||
|
||||
func TestWaitSandboxStop(t *testing.T) {
|
||||
|
||||
@@ -27,25 +27,25 @@ import (
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
"github.com/containerd/containerd/oci"
|
||||
"github.com/containerd/containerd/pkg/streaming"
|
||||
"github.com/containerd/containerd/plugin"
|
||||
"github.com/containerd/cri/pkg/streaming"
|
||||
cni "github.com/containerd/go-cni"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/store/label"
|
||||
"github.com/containerd/containerd/pkg/store/label"
|
||||
|
||||
"github.com/containerd/cri/pkg/atomic"
|
||||
criconfig "github.com/containerd/cri/pkg/config"
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
osinterface "github.com/containerd/cri/pkg/os"
|
||||
"github.com/containerd/cri/pkg/registrar"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
imagestore "github.com/containerd/cri/pkg/store/image"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
snapshotstore "github.com/containerd/cri/pkg/store/snapshot"
|
||||
"github.com/containerd/containerd/pkg/atomic"
|
||||
criconfig "github.com/containerd/containerd/pkg/config"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
osinterface "github.com/containerd/containerd/pkg/os"
|
||||
"github.com/containerd/containerd/pkg/registrar"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
imagestore "github.com/containerd/containerd/pkg/store/image"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
snapshotstore "github.com/containerd/containerd/pkg/store/snapshot"
|
||||
)
|
||||
|
||||
// grpcServices are all the grpc services provided by cri containerd.
|
||||
|
||||
@@ -26,15 +26,15 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
criconfig "github.com/containerd/cri/pkg/config"
|
||||
ostesting "github.com/containerd/cri/pkg/os/testing"
|
||||
"github.com/containerd/cri/pkg/registrar"
|
||||
servertesting "github.com/containerd/cri/pkg/server/testing"
|
||||
containerstore "github.com/containerd/cri/pkg/store/container"
|
||||
imagestore "github.com/containerd/cri/pkg/store/image"
|
||||
"github.com/containerd/cri/pkg/store/label"
|
||||
sandboxstore "github.com/containerd/cri/pkg/store/sandbox"
|
||||
snapshotstore "github.com/containerd/cri/pkg/store/snapshot"
|
||||
criconfig "github.com/containerd/containerd/pkg/config"
|
||||
ostesting "github.com/containerd/containerd/pkg/os/testing"
|
||||
"github.com/containerd/containerd/pkg/registrar"
|
||||
servertesting "github.com/containerd/containerd/pkg/server/testing"
|
||||
containerstore "github.com/containerd/containerd/pkg/store/container"
|
||||
imagestore "github.com/containerd/containerd/pkg/store/image"
|
||||
"github.com/containerd/containerd/pkg/store/label"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/store/sandbox"
|
||||
snapshotstore "github.com/containerd/containerd/pkg/store/snapshot"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -25,8 +25,8 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
snapshotstore "github.com/containerd/cri/pkg/store/snapshot"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
snapshotstore "github.com/containerd/containerd/pkg/store/snapshot"
|
||||
)
|
||||
|
||||
// snapshotsSyncer syncs snapshot stats periodically. imagefs info and container stats
|
||||
|
||||
@@ -32,8 +32,8 @@ import (
|
||||
k8scert "k8s.io/client-go/util/cert"
|
||||
"k8s.io/utils/exec"
|
||||
|
||||
ctrdutil "github.com/containerd/cri/pkg/containerd/util"
|
||||
"github.com/containerd/cri/pkg/streaming"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/containerd/util"
|
||||
"github.com/containerd/containerd/pkg/streaming"
|
||||
)
|
||||
|
||||
type streamListenerMode int
|
||||
|
||||
@@ -19,7 +19,7 @@ package server
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/containerd/cri/pkg/config"
|
||||
"github.com/containerd/containerd/pkg/config"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
criconfig "github.com/containerd/cri/pkg/config"
|
||||
servertesting "github.com/containerd/cri/pkg/server/testing"
|
||||
criconfig "github.com/containerd/containerd/pkg/config"
|
||||
servertesting "github.com/containerd/containerd/pkg/server/testing"
|
||||
)
|
||||
|
||||
func TestUpdateRuntimeConfig(t *testing.T) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/constants"
|
||||
"github.com/containerd/containerd/pkg/constants"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -20,12 +20,12 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
"github.com/containerd/cri/pkg/store/label"
|
||||
"github.com/containerd/containerd/pkg/store/label"
|
||||
"github.com/docker/docker/pkg/truncindex"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
cio "github.com/containerd/cri/pkg/server/io"
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
cio "github.com/containerd/containerd/pkg/server/io"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
)
|
||||
|
||||
// Container contains all resources associated with the container. All methods to
|
||||
|
||||
@@ -21,13 +21,13 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/containerd/cri/pkg/store/label"
|
||||
"github.com/containerd/containerd/pkg/store/label"
|
||||
"github.com/opencontainers/selinux/go-selinux"
|
||||
assertlib "github.com/stretchr/testify/assert"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
cio "github.com/containerd/cri/pkg/server/io"
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
cio "github.com/containerd/containerd/pkg/server/io"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
)
|
||||
|
||||
func TestContainerStore(t *testing.T) {
|
||||
|
||||
@@ -30,8 +30,8 @@ import (
|
||||
imagespec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
storeutil "github.com/containerd/cri/pkg/store"
|
||||
"github.com/containerd/cri/pkg/util"
|
||||
storeutil "github.com/containerd/containerd/pkg/store"
|
||||
"github.com/containerd/containerd/pkg/util"
|
||||
)
|
||||
|
||||
// Image contains all resources associated with the image. All fields
|
||||
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
"github.com/opencontainers/go-digest/digestset"
|
||||
assertlib "github.com/stretchr/testify/assert"
|
||||
|
||||
storeutil "github.com/containerd/cri/pkg/store"
|
||||
storeutil "github.com/containerd/containerd/pkg/store"
|
||||
)
|
||||
|
||||
func TestInternalStore(t *testing.T) {
|
||||
|
||||
@@ -20,11 +20,11 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
"github.com/containerd/cri/pkg/store/label"
|
||||
"github.com/containerd/containerd/pkg/store/label"
|
||||
"github.com/docker/docker/pkg/truncindex"
|
||||
|
||||
"github.com/containerd/cri/pkg/netns"
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
"github.com/containerd/containerd/pkg/netns"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
)
|
||||
|
||||
// Sandbox contains all resources associated with the sandbox. All methods to
|
||||
|
||||
@@ -19,11 +19,11 @@ package sandbox
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/containerd/cri/pkg/store/label"
|
||||
"github.com/containerd/containerd/pkg/store/label"
|
||||
assertlib "github.com/stretchr/testify/assert"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
)
|
||||
|
||||
func TestSandboxStore(t *testing.T) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
snapshot "github.com/containerd/containerd/snapshots"
|
||||
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
)
|
||||
|
||||
// Snapshot contains the information about the snapshot.
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
snapshot "github.com/containerd/containerd/snapshots"
|
||||
assertlib "github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/containerd/cri/pkg/store"
|
||||
"github.com/containerd/containerd/pkg/store"
|
||||
)
|
||||
|
||||
func TestSnapshotStore(t *testing.T) {
|
||||
|
||||
@@ -52,8 +52,8 @@ import (
|
||||
"k8s.io/client-go/tools/remotecommand"
|
||||
runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
|
||||
|
||||
"github.com/containerd/cri/pkg/streaming/portforward"
|
||||
remotecommandserver "github.com/containerd/cri/pkg/streaming/remotecommand"
|
||||
"github.com/containerd/containerd/pkg/streaming/portforward"
|
||||
remotecommandserver "github.com/containerd/containerd/pkg/streaming/remotecommand"
|
||||
)
|
||||
|
||||
// Server is the library interface to serve the stream requests.
|
||||
|
||||
Reference in New Issue
Block a user