Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions backend/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"github.com/sirupsen/logrus"
"google.golang.org/grpc"
runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1"
runtimeapi_alpha "k8s.io/cri-api/v1alpha2/pkg/apis/runtime/v1alpha2"
"k8s.io/kubernetes/pkg/kubelet/util"

"github.com/Mirantis/cri-dockerd/core"
Expand Down Expand Up @@ -87,10 +86,6 @@ func (s *CriDockerService) Start() error {
runtimeapi.RegisterRuntimeServiceServer(s.server, s.service)
runtimeapi.RegisterImageServiceServer(s.server, s.service)

as := core.NewDockerServiceAlpha(s.service)
runtimeapi_alpha.RegisterRuntimeServiceServer(s.server, as)
runtimeapi_alpha.RegisterImageServiceServer(s.server, as)

go func() {
if err := s.server.Serve(l); err != nil {
logrus.Errorf("Failed to serve connections from cri-dockerd: %v", err)
Expand Down
2 changes: 0 additions & 2 deletions config/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,4 @@ const (

// CRIVersion is the latest CRI version supported by the CRI plugin.
CRIVersion = "v1"
// CRIVersionAlpha is the alpha version of CRI supported by the CRI plugin.
CRIVersionAlpha = "v1alpha2"
)
34 changes: 0 additions & 34 deletions core/docker_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import (

v1 "k8s.io/api/core/v1"
runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1"
runtimeapi_alpha "k8s.io/cri-api/v1alpha2/pkg/apis/runtime/v1alpha2"
)

const (
Expand Down Expand Up @@ -78,12 +77,6 @@ const (
defaultCgroupDriver = "cgroupfs"
)

// v1AlphaCRIService provides the interface necessary for cri.v1alpha2
type v1AlphaCRIService interface {
runtimeapi_alpha.RuntimeServiceServer
runtimeapi_alpha.ImageServiceServer
}

// CRIService includes all methods necessary for a CRI backend.
type CRIService interface {
runtimeapi.RuntimeServiceServer
Expand Down Expand Up @@ -294,17 +287,6 @@ type dockerService struct {
// runtimeInfoLock sync.RWMutex
}

type dockerServiceAlpha struct {
ds DockerService

// This handles unimplemented methods unless cri-dockerd overrides them
runtimeapi_alpha.UnimplementedRuntimeServiceServer
}

func NewDockerServiceAlpha(ds DockerService) v1AlphaCRIService {
return &dockerServiceAlpha{ds: ds}
}

// Version returns the runtime name, runtime version and runtime API version
func (ds *dockerService) Version(
_ context.Context,
Expand All @@ -322,22 +304,6 @@ func (ds *dockerService) Version(
}, nil
}

func (ds *dockerService) AlphaVersion(
_ context.Context,
r *runtimeapi.VersionRequest,
) (*runtimeapi_alpha.VersionResponse, error) {
v, err := ds.getDockerVersion()
if err != nil {
return nil, err
}
return &runtimeapi_alpha.VersionResponse{
Version: kubeAPIVersion,
RuntimeName: dockerRuntimeName,
RuntimeVersion: v.Version,
RuntimeApiVersion: config.CRIVersionAlpha,
}, nil
}

// getDockerVersion gets the version information from docker.
func (ds *dockerService) getDockerVersion() (*dockertypes.Version, error) {
res, err := ds.systemInfoCache.Memoize("docker_version", systemInfoCacheMinTTL, func() (interface{}, error) {
Expand Down
Loading
Loading