Skip to content

Commit

Permalink
pkg/cri: switch to CRI API v1.
Browse files Browse the repository at this point in the history
  • Loading branch information
klihub committed Mar 1, 2022
1 parent a21a6a6 commit 25051c8
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion pkg/cri/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/connectivity"

api "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
api "k8s.io/cri-api/pkg/apis/runtime/v1"

"github.com/intel/cri-resource-manager/pkg/instrumentation"
logger "github.com/intel/cri-resource-manager/pkg/log"
Expand Down
3 changes: 2 additions & 1 deletion pkg/cri/relay/image-service.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ package relay

import (
"context"
api "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"

api "k8s.io/cri-api/pkg/apis/runtime/v1"
)

func (r *relay) ListImages(ctx context.Context,
Expand Down
5 changes: 2 additions & 3 deletions pkg/cri/relay/runtime-service.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package relay
import (
"context"

api "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
api "k8s.io/cri-api/pkg/apis/runtime/v1"

"github.com/intel/cri-resource-manager/pkg/dump"
)
Expand Down Expand Up @@ -164,8 +164,7 @@ func (r *relay) PodSandboxStats(ctx context.Context,
}

func (r *relay) ListPodSandboxStats(ctx context.Context,
req *api.ListPodSandboxStatsRequest) (*api.ListPodSandboxStatsResponse,
error) {
req *api.ListPodSandboxStatsRequest) (*api.ListPodSandboxStatsResponse, error) {
r.dump("ListPodSandboxStats", req)
return r.client.ListPodSandboxStats(ctx, req)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cri/resource-manager/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"sync"

v1 "k8s.io/api/core/v1"
cri "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
cri "k8s.io/cri-api/pkg/apis/runtime/v1"
"k8s.io/kubernetes/pkg/kubelet/cm/cpuset"

"github.com/intel/cri-resource-manager/pkg/apis/resmgr"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cri/resource-manager/cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"testing"

v1 "k8s.io/api/core/v1"
cri "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
cri "k8s.io/cri-api/pkg/apis/runtime/v1"
kubecm "k8s.io/kubernetes/pkg/kubelet/cm"
kubetypes "k8s.io/kubernetes/pkg/kubelet/types"

Expand Down
2 changes: 1 addition & 1 deletion pkg/cri/resource-manager/cache/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

v1 "k8s.io/api/core/v1"
resapi "k8s.io/apimachinery/pkg/api/resource"
cri "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
cri "k8s.io/cri-api/pkg/apis/runtime/v1"

extapi "github.com/intel/cri-resource-manager/pkg/apis/resmgr/v1alpha1"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cri/resource-manager/cache/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"strings"

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

"github.com/intel/cri-resource-manager/pkg/apis/resmgr"
"github.com/intel/cri-resource-manager/pkg/cgroups"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cri/resource-manager/cache/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
corev1 "k8s.io/api/core/v1"
resapi "k8s.io/apimachinery/pkg/api/resource"
"k8s.io/apimachinery/pkg/util/sets"
cri "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
cri "k8s.io/cri-api/pkg/apis/runtime/v1"
kubecm "k8s.io/kubernetes/pkg/kubelet/cm"

"github.com/intel/cri-resource-manager/pkg/cgroups"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cri/resource-manager/control/cri/cri.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/intel/cri-resource-manager/pkg/cri/client"
"github.com/intel/cri-resource-manager/pkg/cri/resource-manager/cache"
"github.com/intel/cri-resource-manager/pkg/cri/resource-manager/control"
criapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
criapi "k8s.io/cri-api/pkg/apis/runtime/v1"

logger "github.com/intel/cri-resource-manager/pkg/log"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/intel/goresctrl/pkg/sst"
idset "github.com/intel/goresctrl/pkg/utils"
v1 "k8s.io/api/core/v1"
cri "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
cri "k8s.io/cri-api/pkg/apis/runtime/v1"
"k8s.io/kubernetes/pkg/kubelet/cm/cpuset"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/cri/resource-manager/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"context"
"fmt"

criapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
criapi "k8s.io/cri-api/pkg/apis/runtime/v1"

pkgcfg "github.com/intel/cri-resource-manager/pkg/config"
"github.com/intel/cri-resource-manager/pkg/cri/resource-manager/cache"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cri/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

"google.golang.org/grpc"

api "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
api "k8s.io/cri-api/pkg/apis/runtime/v1"

"github.com/intel/cri-resource-manager/pkg/cri/resource-manager/sockets"
"github.com/intel/cri-resource-manager/pkg/dump"
Expand Down
4 changes: 2 additions & 2 deletions pkg/cri/server/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
"go.opencensus.io/trace"
"google.golang.org/grpc"

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

const (
apiVersion = "v1alpha2"
apiVersion = "v1"

imageService = "ImageService"
listImages = "ListImages"
Expand Down
2 changes: 1 addition & 1 deletion test/functional/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"github.com/intel/cri-resource-manager/pkg/cri/resource-manager/cache"
"github.com/intel/cri-resource-manager/pkg/dump"
"google.golang.org/grpc"
api "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
api "k8s.io/cri-api/pkg/apis/runtime/v1"

logger "github.com/intel/cri-resource-manager/pkg/log"
)
Expand Down
2 changes: 1 addition & 1 deletion test/functional/fake_cri_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

"github.com/intel/cri-resource-manager/pkg/utils"
"google.golang.org/grpc"
api "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
api "k8s.io/cri-api/pkg/apis/runtime/v1"
)

type fakeCriServer struct {
Expand Down

0 comments on commit 25051c8

Please sign in to comment.