Fix dependencies after remove
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
parent
2332b9ba10
commit
fa1d3a9ccb
@ -24,8 +24,8 @@ import (
|
|||||||
fuzz "github.com/AdaLogics/go-fuzz-headers"
|
fuzz "github.com/AdaLogics/go-fuzz-headers"
|
||||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
||||||
|
|
||||||
"github.com/containerd/containerd/pkg/cri/sbserver"
|
server "github.com/containerd/containerd/pkg/cri/sbserver"
|
||||||
"github.com/containerd/containerd/pkg/cri/server"
|
"github.com/containerd/containerd/pkg/cri/sbserver/images"
|
||||||
containerstore "github.com/containerd/containerd/pkg/cri/store/container"
|
containerstore "github.com/containerd/containerd/pkg/cri/store/container"
|
||||||
sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox"
|
sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox"
|
||||||
)
|
)
|
||||||
@ -191,7 +191,7 @@ func sandboxStore(cs server.CRIService) (*sandboxstore.Store, error) {
|
|||||||
|
|
||||||
ss, err = server.SandboxStore(cs)
|
ss, err = server.SandboxStore(cs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ss, err = sbserver.SandboxStore(cs)
|
ss, err = server.SandboxStore(cs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -535,6 +535,6 @@ func FuzzParseAuth(data []byte) int {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
_, _, _ = server.ParseAuth(auth, host)
|
_, _, _ = images.ParseAuth(auth, host)
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ import (
|
|||||||
|
|
||||||
"github.com/containerd/containerd"
|
"github.com/containerd/containerd"
|
||||||
criconfig "github.com/containerd/containerd/pkg/cri/config"
|
criconfig "github.com/containerd/containerd/pkg/cri/config"
|
||||||
"github.com/containerd/containerd/pkg/cri/server"
|
server "github.com/containerd/containerd/pkg/cri/sbserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func FuzzCRIServer(data []byte) int {
|
func FuzzCRIServer(data []byte) int {
|
||||||
|
@ -38,7 +38,7 @@ import (
|
|||||||
"github.com/containerd/containerd/leases"
|
"github.com/containerd/containerd/leases"
|
||||||
"github.com/containerd/containerd/namespaces"
|
"github.com/containerd/containerd/namespaces"
|
||||||
criconfig "github.com/containerd/containerd/pkg/cri/config"
|
criconfig "github.com/containerd/containerd/pkg/cri/config"
|
||||||
criserver "github.com/containerd/containerd/pkg/cri/server"
|
criserver "github.com/containerd/containerd/pkg/cri/sbserver"
|
||||||
"github.com/containerd/log"
|
"github.com/containerd/log"
|
||||||
"github.com/containerd/log/logtest"
|
"github.com/containerd/log/logtest"
|
||||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||||
|
@ -41,7 +41,7 @@ import (
|
|||||||
dialer "github.com/containerd/containerd/integration/remote/util"
|
dialer "github.com/containerd/containerd/integration/remote/util"
|
||||||
criconfig "github.com/containerd/containerd/pkg/cri/config"
|
criconfig "github.com/containerd/containerd/pkg/cri/config"
|
||||||
"github.com/containerd/containerd/pkg/cri/constants"
|
"github.com/containerd/containerd/pkg/cri/constants"
|
||||||
"github.com/containerd/containerd/pkg/cri/server"
|
server "github.com/containerd/containerd/pkg/cri/sbserver"
|
||||||
"github.com/containerd/containerd/pkg/cri/util"
|
"github.com/containerd/containerd/pkg/cri/util"
|
||||||
"github.com/containerd/log"
|
"github.com/containerd/log"
|
||||||
"github.com/opencontainers/selinux/go-selinux"
|
"github.com/opencontainers/selinux/go-selinux"
|
||||||
|
@ -21,11 +21,10 @@ package sbserver
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/containerd/containerd/pkg/cri/server"
|
|
||||||
"github.com/containerd/containerd/pkg/cri/store/sandbox"
|
"github.com/containerd/containerd/pkg/cri/store/sandbox"
|
||||||
)
|
)
|
||||||
|
|
||||||
func SandboxStore(cs server.CRIService) (*sandbox.Store, error) {
|
func SandboxStore(cs CRIService) (*sandbox.Store, error) {
|
||||||
s, ok := cs.(*criService)
|
s, ok := cs.(*criService)
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, fmt.Errorf("%+v is not sbserver.criService", cs)
|
return nil, fmt.Errorf("%+v is not sbserver.criService", cs)
|
||||||
|
@ -32,9 +32,9 @@ import (
|
|||||||
|
|
||||||
"github.com/containerd/containerd"
|
"github.com/containerd/containerd"
|
||||||
"github.com/containerd/containerd/pkg/cri/annotations"
|
"github.com/containerd/containerd/pkg/cri/annotations"
|
||||||
|
"github.com/containerd/containerd/pkg/cri/bandwidth"
|
||||||
criconfig "github.com/containerd/containerd/pkg/cri/config"
|
criconfig "github.com/containerd/containerd/pkg/cri/config"
|
||||||
"github.com/containerd/containerd/pkg/cri/sbserver/podsandbox"
|
"github.com/containerd/containerd/pkg/cri/sbserver/podsandbox"
|
||||||
"github.com/containerd/containerd/pkg/cri/server/bandwidth"
|
|
||||||
sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox"
|
sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox"
|
||||||
"github.com/containerd/containerd/pkg/cri/util"
|
"github.com/containerd/containerd/pkg/cri/util"
|
||||||
"github.com/containerd/containerd/pkg/netns"
|
"github.com/containerd/containerd/pkg/netns"
|
||||||
|
@ -23,6 +23,8 @@ import (
|
|||||||
|
|
||||||
"github.com/containerd/containerd/errdefs"
|
"github.com/containerd/containerd/errdefs"
|
||||||
sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox"
|
sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox"
|
||||||
|
"github.com/containerd/go-cni"
|
||||||
|
runtimespec "github.com/opencontainers/runtime-spec/specs-go"
|
||||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -102,6 +104,26 @@ func (c *criService) getIPs(sandbox sandboxstore.Sandbox) (string, []string, err
|
|||||||
return sandbox.IP, sandbox.AdditionalIPs, nil
|
return sandbox.IP, sandbox.AdditionalIPs, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SandboxInfo is extra information for sandbox.
|
||||||
|
// TODO (mikebrow): discuss predefining constants structures for some or all of these field names in CRI
|
||||||
|
type SandboxInfo struct {
|
||||||
|
Pid uint32 `json:"pid"`
|
||||||
|
Status string `json:"processStatus"`
|
||||||
|
NetNSClosed bool `json:"netNamespaceClosed"`
|
||||||
|
Image string `json:"image"`
|
||||||
|
SnapshotKey string `json:"snapshotKey"`
|
||||||
|
Snapshotter string `json:"snapshotter"`
|
||||||
|
// Note: a new field `RuntimeHandler` has been added into the CRI PodSandboxStatus struct, and
|
||||||
|
// should be set. This `RuntimeHandler` field will be deprecated after containerd 1.3 (tracked
|
||||||
|
// in https://github.com/containerd/cri/issues/1064).
|
||||||
|
RuntimeHandler string `json:"runtimeHandler"` // see the Note above
|
||||||
|
RuntimeType string `json:"runtimeType"`
|
||||||
|
RuntimeOptions interface{} `json:"runtimeOptions"`
|
||||||
|
Config *runtime.PodSandboxConfig `json:"config"`
|
||||||
|
RuntimeSpec *runtimespec.Spec `json:"runtimeSpec"`
|
||||||
|
CNIResult *cni.Result `json:"cniResult"`
|
||||||
|
}
|
||||||
|
|
||||||
// toCRISandboxStatus converts sandbox metadata into CRI pod sandbox status.
|
// toCRISandboxStatus converts sandbox metadata into CRI pod sandbox status.
|
||||||
func toCRISandboxStatus(meta sandboxstore.Metadata, status string, createdAt time.Time, ip string, additionalIPs []string) *runtime.PodSandboxStatus {
|
func toCRISandboxStatus(meta sandboxstore.Metadata, status string, createdAt time.Time, ip string, additionalIPs []string) *runtime.PodSandboxStatus {
|
||||||
// Set sandbox state to NOTREADY by default.
|
// Set sandbox state to NOTREADY by default.
|
||||||
|
@ -27,10 +27,10 @@ import (
|
|||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
criconfig "github.com/containerd/containerd/pkg/cri/config"
|
criconfig "github.com/containerd/containerd/pkg/cri/config"
|
||||||
servertesting "github.com/containerd/containerd/pkg/cri/server/testing"
|
|
||||||
containerstore "github.com/containerd/containerd/pkg/cri/store/container"
|
containerstore "github.com/containerd/containerd/pkg/cri/store/container"
|
||||||
"github.com/containerd/containerd/pkg/cri/store/label"
|
"github.com/containerd/containerd/pkg/cri/store/label"
|
||||||
sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox"
|
sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox"
|
||||||
|
servertesting "github.com/containerd/containerd/pkg/cri/testing"
|
||||||
ostesting "github.com/containerd/containerd/pkg/os/testing"
|
ostesting "github.com/containerd/containerd/pkg/os/testing"
|
||||||
"github.com/containerd/containerd/pkg/registrar"
|
"github.com/containerd/containerd/pkg/registrar"
|
||||||
)
|
)
|
||||||
|
@ -28,7 +28,7 @@ import (
|
|||||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
||||||
|
|
||||||
criconfig "github.com/containerd/containerd/pkg/cri/config"
|
criconfig "github.com/containerd/containerd/pkg/cri/config"
|
||||||
servertesting "github.com/containerd/containerd/pkg/cri/server/testing"
|
servertesting "github.com/containerd/containerd/pkg/cri/testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestUpdateRuntimeConfig(t *testing.T) {
|
func TestUpdateRuntimeConfig(t *testing.T) {
|
||||||
|
Loading…
Reference in New Issue
Block a user