Skip to content

Commit 96013fb

Browse files
committed
Remove deprecated runtime/v1alpha2 support
Signed-off-by: Derek Nola <[email protected]>
1 parent f57ecd6 commit 96013fb

File tree

12 files changed

+0
-42419
lines changed

12 files changed

+0
-42419
lines changed

backend/daemon.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import (
2525
"github.com/sirupsen/logrus"
2626
"google.golang.org/grpc"
2727
runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1"
28-
runtimeapi_alpha "k8s.io/cri-api/v1alpha2/pkg/apis/runtime/v1alpha2"
2928
"k8s.io/kubernetes/pkg/kubelet/util"
3029

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

90-
as := core.NewDockerServiceAlpha(s.service)
91-
runtimeapi_alpha.RegisterRuntimeServiceServer(s.server, as)
92-
runtimeapi_alpha.RegisterImageServiceServer(s.server, as)
93-
9489
go func() {
9590
if err := s.server.Serve(l); err != nil {
9691
logrus.Error(err, "Failed to serve connections from cri-dockerd")

config/constants.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,4 @@ const (
168168

169169
// CRIVersion is the latest CRI version supported by the CRI plugin.
170170
CRIVersion = "v1"
171-
// CRIVersionAlpha is the alpha version of CRI supported by the CRI plugin.
172-
CRIVersionAlpha = "v1alpha2"
173171
)

core/docker_service.go

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ import (
4949

5050
v1 "k8s.io/api/core/v1"
5151
runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1"
52-
runtimeapi_alpha "k8s.io/cri-api/v1alpha2/pkg/apis/runtime/v1alpha2"
5352
)
5453

5554
const (
@@ -78,12 +77,6 @@ const (
7877
defaultCgroupDriver = "cgroupfs"
7978
)
8079

81-
// v1AlphaCRIService provides the interface necessary for cri.v1alpha2
82-
type v1AlphaCRIService interface {
83-
runtimeapi_alpha.RuntimeServiceServer
84-
runtimeapi_alpha.ImageServiceServer
85-
}
86-
8780
// CRIService includes all methods necessary for a CRI backend.
8881
type CRIService interface {
8982
runtimeapi.RuntimeServiceServer
@@ -294,17 +287,6 @@ type dockerService struct {
294287
// runtimeInfoLock sync.RWMutex
295288
}
296289

297-
type dockerServiceAlpha struct {
298-
ds DockerService
299-
300-
// This handles unimplemented methods unless cri-dockerd overrides them
301-
runtimeapi_alpha.UnimplementedRuntimeServiceServer
302-
}
303-
304-
func NewDockerServiceAlpha(ds DockerService) v1AlphaCRIService {
305-
return &dockerServiceAlpha{ds: ds}
306-
}
307-
308290
// Version returns the runtime name, runtime version and runtime API version
309291
func (ds *dockerService) Version(
310292
_ context.Context,
@@ -322,22 +304,6 @@ func (ds *dockerService) Version(
322304
}, nil
323305
}
324306

325-
func (ds *dockerService) AlphaVersion(
326-
_ context.Context,
327-
r *runtimeapi.VersionRequest,
328-
) (*runtimeapi_alpha.VersionResponse, error) {
329-
v, err := ds.getDockerVersion()
330-
if err != nil {
331-
return nil, err
332-
}
333-
return &runtimeapi_alpha.VersionResponse{
334-
Version: kubeAPIVersion,
335-
RuntimeName: dockerRuntimeName,
336-
RuntimeVersion: v.Version,
337-
RuntimeApiVersion: config.CRIVersionAlpha,
338-
}, nil
339-
}
340-
341307
// getDockerVersion gets the version information from docker.
342308
func (ds *dockerService) getDockerVersion() (*dockertypes.Version, error) {
343309
res, err := ds.systemInfoCache.Memoize("docker_version", systemInfoCacheMinTTL, func() (interface{}, error) {

0 commit comments

Comments
 (0)