Skip to content

Commit

Permalink
resmgr: move/generate resmgr API/types to pkg/apis.
Browse files Browse the repository at this point in the history
Move resmgr API and types to pkg/apis/resmgr/v1alpha1,
next to other generated APIs (currently config). This
allows annotating the types for better CRD validation
which is useful if we use them in our config CRDs.

Signed-off-by: Krisztian Litkey <[email protected]>
  • Loading branch information
klihub committed Feb 13, 2024
1 parent 6467120 commit 754b485
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/plugins/topology-aware/policy/affinity.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package topologyaware

import (
resmgr "github.com/containers/nri-plugins/pkg/resmgr/apis"
resmgr "github.com/containers/nri-plugins/pkg/apis/resmgr/v1alpha1"
"github.com/containers/nri-plugins/pkg/resmgr/cache"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/plugins/topology-aware/policy/mocks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"time"

nri "github.com/containerd/nri/pkg/api"
resmgr "github.com/containers/nri-plugins/pkg/resmgr/apis"
resmgr "github.com/containers/nri-plugins/pkg/apis/resmgr/v1alpha1"
"github.com/containers/nri-plugins/pkg/resmgr/cache"
system "github.com/containers/nri-plugins/pkg/sysfs"
"github.com/containers/nri-plugins/pkg/topology"
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/resmgr/cache/affinity.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (

"sigs.k8s.io/yaml"

resmgr "github.com/containers/nri-plugins/pkg/apis/resmgr/v1alpha1"
"github.com/containers/nri-plugins/pkg/kubernetes"
resmgr "github.com/containers/nri-plugins/pkg/resmgr/apis"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/resmgr/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (

"github.com/containers/nri-plugins/pkg/utils/cpuset"

resmgr "github.com/containers/nri-plugins/pkg/apis/resmgr/v1alpha1"
"github.com/containers/nri-plugins/pkg/kubernetes"
logger "github.com/containers/nri-plugins/pkg/log"
resmgr "github.com/containers/nri-plugins/pkg/resmgr/apis"
"github.com/containers/nri-plugins/pkg/topology"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/resmgr/cache/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"strconv"
"strings"

resmgr "github.com/containers/nri-plugins/pkg/apis/resmgr/v1alpha1"
"github.com/containers/nri-plugins/pkg/cgroups"
"github.com/containers/nri-plugins/pkg/kubernetes"
resmgr "github.com/containers/nri-plugins/pkg/resmgr/apis"
"github.com/containers/nri-plugins/pkg/topology"

nri "github.com/containerd/nri/pkg/api"
Expand Down
2 changes: 1 addition & 1 deletion pkg/resmgr/cache/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
nri "github.com/containerd/nri/pkg/api"
v1 "k8s.io/api/core/v1"

resmgr "github.com/containers/nri-plugins/pkg/apis/resmgr/v1alpha1"
"github.com/containers/nri-plugins/pkg/cgroups"
"github.com/containers/nri-plugins/pkg/kubernetes"
resmgr "github.com/containers/nri-plugins/pkg/resmgr/apis"
)

// Create and initialize a cached pod.
Expand Down

0 comments on commit 754b485

Please sign in to comment.