From 3434557d7c5d1ea521d02472a46b088906c4fdc4 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Tue, 27 Feb 2024 14:42:23 +0100 Subject: [PATCH] Move NFD api to a separate go mod Signed-off-by: Carlos Eduardo Arango Gutierrez --- Dockerfile | 1 + .../clientset/versioned/clientset.go | 2 +- .../versioned/fake/clientset_generated.go | 6 +- .../generated/clientset/versioned/fake/doc.go | 0 .../clientset/versioned/fake/register.go | 2 +- .../clientset/versioned/scheme/doc.go | 0 .../clientset/versioned/scheme/register.go | 2 +- .../versioned/typed/nfd/v1alpha1/doc.go | 0 .../versioned/typed/nfd/v1alpha1/fake/doc.go | 0 .../nfd/v1alpha1/fake/fake_nfd_client.go | 2 +- .../nfd/v1alpha1/fake/fake_nodefeature.go | 2 +- .../nfd/v1alpha1/fake/fake_nodefeaturerule.go | 2 +- .../typed/nfd/v1alpha1/generated_expansion.go | 0 .../typed/nfd/v1alpha1/nfd_client.go | 4 +- .../typed/nfd/v1alpha1/nodefeature.go | 4 +- .../typed/nfd/v1alpha1/nodefeaturerule.go | 4 +- .../informers/externalversions/factory.go | 6 +- .../informers/externalversions/generic.go | 2 +- .../internalinterfaces/factory_interfaces.go | 2 +- .../externalversions/nfd/interface.go | 4 +- .../nfd/v1alpha1/interface.go | 2 +- .../nfd/v1alpha1/nodefeature.go | 8 +- .../nfd/v1alpha1/nodefeaturerule.go | 8 +- .../nfd/v1alpha1/expansion_generated.go | 0 .../listers/nfd/v1alpha1/nodefeature.go | 2 +- .../listers/nfd/v1alpha1/nodefeaturerule.go | 2 +- api/nfd/go.mod | 52 ++++++ api/nfd/go.sum | 171 ++++++++++++++++++ .../nfd/v1alpha1/annotations_labels.go | 0 {pkg/apis => api}/nfd/v1alpha1/doc.go | 0 {pkg/apis => api}/nfd/v1alpha1/feature.go | 0 .../apis => api}/nfd/v1alpha1/feature_test.go | 0 {pkg/apis => api}/nfd/v1alpha1/generate.sh | 0 .../apis => api}/nfd/v1alpha1/generated.pb.go | 0 .../apis => api}/nfd/v1alpha1/generated.proto | 2 +- {pkg/apis => api}/nfd/v1alpha1/register.go | 0 {pkg/apis => api}/nfd/v1alpha1/types.go | 0 .../nfd/v1alpha1/zz_generated.deepcopy.go | 0 go.mod | 4 +- hack/update_codegen.sh | 8 +- .../nodefeaturerule/expression-api_test.go | 4 +- .../nodefeaturerule/expression.go | 2 +- .../nodefeaturerule/expression_test.go | 2 +- .../{v1alpha1 => }/nodefeaturerule/rule.go | 2 +- .../nodefeaturerule/rule_test.go | 2 +- pkg/apis/nfd/validate/validate.go | 2 +- pkg/kubectl-nfd/dryrun.go | 4 +- pkg/kubectl-nfd/test.go | 6 +- pkg/kubectl-nfd/validate.go | 2 +- pkg/labeler/labeler.pb.go | 2 +- pkg/nfd-gc/nfd-gc.go | 4 +- pkg/nfd-gc/nfd-gc_test.go | 2 +- pkg/nfd-master/nfd-api-controller.go | 10 +- pkg/nfd-master/nfd-api-controller_test.go | 2 +- pkg/nfd-master/nfd-master-internal_test.go | 8 +- pkg/nfd-master/nfd-master.go | 4 +- pkg/nfd-master/node-updater-pool_test.go | 2 +- pkg/nfd-worker/nfd-worker-internal_test.go | 2 +- pkg/nfd-worker/nfd-worker.go | 4 +- source/cpu/cpu.go | 2 +- source/custom/api/conversion.go | 2 +- source/custom/api/conversion_test.go | 4 +- source/custom/custom.go | 4 +- source/custom/directory_features.go | 2 +- source/custom/static_features.go | 2 +- source/fake/fake.go | 2 +- source/kernel/kernel.go | 2 +- source/local/local.go | 2 +- source/memory/memory.go | 2 +- source/network/network.go | 2 +- source/pci/pci.go | 2 +- source/pci/pci_test.go | 2 +- source/pci/utils.go | 2 +- source/source.go | 2 +- source/storage/storage.go | 2 +- source/system/system.go | 2 +- source/usb/usb.go | 2 +- source/usb/utils.go | 2 +- test/e2e/nfd_gc_test.go | 4 +- test/e2e/node_feature_discovery_test.go | 4 +- test/e2e/utils/crd.go | 6 +- 81 files changed, 326 insertions(+), 100 deletions(-) rename {pkg => api}/generated/clientset/versioned/clientset.go (98%) rename {pkg => api}/generated/clientset/versioned/fake/clientset_generated.go (93%) rename {pkg => api}/generated/clientset/versioned/fake/doc.go (100%) rename {pkg => api}/generated/clientset/versioned/fake/register.go (96%) rename {pkg => api}/generated/clientset/versioned/scheme/doc.go (100%) rename {pkg => api}/generated/clientset/versioned/scheme/register.go (96%) rename {pkg => api}/generated/clientset/versioned/typed/nfd/v1alpha1/doc.go (100%) rename {pkg => api}/generated/clientset/versioned/typed/nfd/v1alpha1/fake/doc.go (100%) rename {pkg => api}/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nfd_client.go (95%) rename {pkg => api}/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nodefeature.go (98%) rename {pkg => api}/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nodefeaturerule.go (98%) rename {pkg => api}/generated/clientset/versioned/typed/nfd/v1alpha1/generated_expansion.go (100%) rename {pkg => api}/generated/clientset/versioned/typed/nfd/v1alpha1/nfd_client.go (95%) rename {pkg => api}/generated/clientset/versioned/typed/nfd/v1alpha1/nodefeature.go (97%) rename {pkg => api}/generated/clientset/versioned/typed/nfd/v1alpha1/nodefeaturerule.go (97%) rename {pkg => api}/generated/informers/externalversions/factory.go (97%) rename {pkg => api}/generated/informers/externalversions/generic.go (96%) rename {pkg => api}/generated/informers/externalversions/internalinterfaces/factory_interfaces.go (95%) rename {pkg => api}/generated/informers/externalversions/nfd/interface.go (92%) rename {pkg => api}/generated/informers/externalversions/nfd/v1alpha1/interface.go (96%) rename {pkg => api}/generated/informers/externalversions/nfd/v1alpha1/nodefeature.go (92%) rename {pkg => api}/generated/informers/externalversions/nfd/v1alpha1/nodefeaturerule.go (92%) rename {pkg => api}/generated/listers/nfd/v1alpha1/expansion_generated.go (100%) rename {pkg => api}/generated/listers/nfd/v1alpha1/nodefeature.go (98%) rename {pkg => api}/generated/listers/nfd/v1alpha1/nodefeaturerule.go (97%) create mode 100644 api/nfd/go.mod create mode 100644 api/nfd/go.sum rename {pkg/apis => api}/nfd/v1alpha1/annotations_labels.go (100%) rename {pkg/apis => api}/nfd/v1alpha1/doc.go (100%) rename {pkg/apis => api}/nfd/v1alpha1/feature.go (100%) rename {pkg/apis => api}/nfd/v1alpha1/feature_test.go (100%) rename {pkg/apis => api}/nfd/v1alpha1/generate.sh (100%) rename {pkg/apis => api}/nfd/v1alpha1/generated.pb.go (100%) rename {pkg/apis => api}/nfd/v1alpha1/generated.proto (96%) rename {pkg/apis => api}/nfd/v1alpha1/register.go (100%) rename {pkg/apis => api}/nfd/v1alpha1/types.go (100%) rename {pkg/apis => api}/nfd/v1alpha1/zz_generated.deepcopy.go (100%) rename pkg/apis/nfd/{v1alpha1 => }/nodefeaturerule/expression-api_test.go (97%) rename pkg/apis/nfd/{v1alpha1 => }/nodefeaturerule/expression.go (99%) rename pkg/apis/nfd/{v1alpha1 => }/nodefeaturerule/expression_test.go (99%) rename pkg/apis/nfd/{v1alpha1 => }/nodefeaturerule/rule.go (99%) rename pkg/apis/nfd/{v1alpha1 => }/nodefeaturerule/rule_test.go (99%) diff --git a/Dockerfile b/Dockerfile index df6a405f2..1cbd1edcf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ FROM ${BUILDER_IMAGE} as builder # Get (cache) deps in a separate layer COPY go.mod go.sum /go/node-feature-discovery/ +COPY api/nfd/go.mod api/nfd/go.sum /go/node-feature-discovery/api/nfd/ WORKDIR /go/node-feature-discovery diff --git a/pkg/generated/clientset/versioned/clientset.go b/api/generated/clientset/versioned/clientset.go similarity index 98% rename from pkg/generated/clientset/versioned/clientset.go rename to api/generated/clientset/versioned/clientset.go index a2e8df121..9891a3436 100644 --- a/pkg/generated/clientset/versioned/clientset.go +++ b/api/generated/clientset/versioned/clientset.go @@ -25,7 +25,7 @@ import ( discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned/typed/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned/typed/nfd/v1alpha1" ) type Interface interface { diff --git a/pkg/generated/clientset/versioned/fake/clientset_generated.go b/api/generated/clientset/versioned/fake/clientset_generated.go similarity index 93% rename from pkg/generated/clientset/versioned/fake/clientset_generated.go rename to api/generated/clientset/versioned/fake/clientset_generated.go index 68fd18efa..18d2a4f8f 100644 --- a/pkg/generated/clientset/versioned/fake/clientset_generated.go +++ b/api/generated/clientset/versioned/fake/clientset_generated.go @@ -24,9 +24,9 @@ import ( "k8s.io/client-go/discovery" fakediscovery "k8s.io/client-go/discovery/fake" "k8s.io/client-go/testing" - clientset "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned/typed/nfd/v1alpha1" - fakenfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned/typed/nfd/v1alpha1/fake" + clientset "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned/typed/nfd/v1alpha1" + fakenfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned/typed/nfd/v1alpha1/fake" ) // NewSimpleClientset returns a clientset that will respond with the provided objects. diff --git a/pkg/generated/clientset/versioned/fake/doc.go b/api/generated/clientset/versioned/fake/doc.go similarity index 100% rename from pkg/generated/clientset/versioned/fake/doc.go rename to api/generated/clientset/versioned/fake/doc.go diff --git a/pkg/generated/clientset/versioned/fake/register.go b/api/generated/clientset/versioned/fake/register.go similarity index 96% rename from pkg/generated/clientset/versioned/fake/register.go rename to api/generated/clientset/versioned/fake/register.go index 66ab54d87..3c4d45a31 100644 --- a/pkg/generated/clientset/versioned/fake/register.go +++ b/api/generated/clientset/versioned/fake/register.go @@ -24,7 +24,7 @@ import ( schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) var scheme = runtime.NewScheme() diff --git a/pkg/generated/clientset/versioned/scheme/doc.go b/api/generated/clientset/versioned/scheme/doc.go similarity index 100% rename from pkg/generated/clientset/versioned/scheme/doc.go rename to api/generated/clientset/versioned/scheme/doc.go diff --git a/pkg/generated/clientset/versioned/scheme/register.go b/api/generated/clientset/versioned/scheme/register.go similarity index 96% rename from pkg/generated/clientset/versioned/scheme/register.go rename to api/generated/clientset/versioned/scheme/register.go index 6dd6f0124..f822ef608 100644 --- a/pkg/generated/clientset/versioned/scheme/register.go +++ b/api/generated/clientset/versioned/scheme/register.go @@ -24,7 +24,7 @@ import ( schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) var Scheme = runtime.NewScheme() diff --git a/pkg/generated/clientset/versioned/typed/nfd/v1alpha1/doc.go b/api/generated/clientset/versioned/typed/nfd/v1alpha1/doc.go similarity index 100% rename from pkg/generated/clientset/versioned/typed/nfd/v1alpha1/doc.go rename to api/generated/clientset/versioned/typed/nfd/v1alpha1/doc.go diff --git a/pkg/generated/clientset/versioned/typed/nfd/v1alpha1/fake/doc.go b/api/generated/clientset/versioned/typed/nfd/v1alpha1/fake/doc.go similarity index 100% rename from pkg/generated/clientset/versioned/typed/nfd/v1alpha1/fake/doc.go rename to api/generated/clientset/versioned/typed/nfd/v1alpha1/fake/doc.go diff --git a/pkg/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nfd_client.go b/api/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nfd_client.go similarity index 95% rename from pkg/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nfd_client.go rename to api/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nfd_client.go index a1925c362..1a6e91c48 100644 --- a/pkg/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nfd_client.go +++ b/api/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nfd_client.go @@ -21,7 +21,7 @@ package fake import ( rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" - v1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned/typed/nfd/v1alpha1" + v1alpha1 "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned/typed/nfd/v1alpha1" ) type FakeNfdV1alpha1 struct { diff --git a/pkg/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nodefeature.go b/api/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nodefeature.go similarity index 98% rename from pkg/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nodefeature.go rename to api/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nodefeature.go index bd2787201..f956c8217 100644 --- a/pkg/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nodefeature.go +++ b/api/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nodefeature.go @@ -26,7 +26,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" - v1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + v1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) // FakeNodeFeatures implements NodeFeatureInterface diff --git a/pkg/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nodefeaturerule.go b/api/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nodefeaturerule.go similarity index 98% rename from pkg/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nodefeaturerule.go rename to api/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nodefeaturerule.go index 8b58f4113..f096ae5e3 100644 --- a/pkg/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nodefeaturerule.go +++ b/api/generated/clientset/versioned/typed/nfd/v1alpha1/fake/fake_nodefeaturerule.go @@ -26,7 +26,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" - v1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + v1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) // FakeNodeFeatureRules implements NodeFeatureRuleInterface diff --git a/pkg/generated/clientset/versioned/typed/nfd/v1alpha1/generated_expansion.go b/api/generated/clientset/versioned/typed/nfd/v1alpha1/generated_expansion.go similarity index 100% rename from pkg/generated/clientset/versioned/typed/nfd/v1alpha1/generated_expansion.go rename to api/generated/clientset/versioned/typed/nfd/v1alpha1/generated_expansion.go diff --git a/pkg/generated/clientset/versioned/typed/nfd/v1alpha1/nfd_client.go b/api/generated/clientset/versioned/typed/nfd/v1alpha1/nfd_client.go similarity index 95% rename from pkg/generated/clientset/versioned/typed/nfd/v1alpha1/nfd_client.go rename to api/generated/clientset/versioned/typed/nfd/v1alpha1/nfd_client.go index ec8e63630..0a733e974 100644 --- a/pkg/generated/clientset/versioned/typed/nfd/v1alpha1/nfd_client.go +++ b/api/generated/clientset/versioned/typed/nfd/v1alpha1/nfd_client.go @@ -22,8 +22,8 @@ import ( "net/http" rest "k8s.io/client-go/rest" - v1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" - "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned/scheme" + "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned/scheme" + v1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) type NfdV1alpha1Interface interface { diff --git a/pkg/generated/clientset/versioned/typed/nfd/v1alpha1/nodefeature.go b/api/generated/clientset/versioned/typed/nfd/v1alpha1/nodefeature.go similarity index 97% rename from pkg/generated/clientset/versioned/typed/nfd/v1alpha1/nodefeature.go rename to api/generated/clientset/versioned/typed/nfd/v1alpha1/nodefeature.go index 07bf8259c..f159be867 100644 --- a/pkg/generated/clientset/versioned/typed/nfd/v1alpha1/nodefeature.go +++ b/api/generated/clientset/versioned/typed/nfd/v1alpha1/nodefeature.go @@ -26,8 +26,8 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" - v1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" - scheme "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned/scheme" + scheme "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned/scheme" + v1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) // NodeFeaturesGetter has a method to return a NodeFeatureInterface. diff --git a/pkg/generated/clientset/versioned/typed/nfd/v1alpha1/nodefeaturerule.go b/api/generated/clientset/versioned/typed/nfd/v1alpha1/nodefeaturerule.go similarity index 97% rename from pkg/generated/clientset/versioned/typed/nfd/v1alpha1/nodefeaturerule.go rename to api/generated/clientset/versioned/typed/nfd/v1alpha1/nodefeaturerule.go index 6353a3d74..843c13768 100644 --- a/pkg/generated/clientset/versioned/typed/nfd/v1alpha1/nodefeaturerule.go +++ b/api/generated/clientset/versioned/typed/nfd/v1alpha1/nodefeaturerule.go @@ -26,8 +26,8 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" - v1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" - scheme "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned/scheme" + scheme "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned/scheme" + v1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) // NodeFeatureRulesGetter has a method to return a NodeFeatureRuleInterface. diff --git a/pkg/generated/informers/externalversions/factory.go b/api/generated/informers/externalversions/factory.go similarity index 97% rename from pkg/generated/informers/externalversions/factory.go rename to api/generated/informers/externalversions/factory.go index 25984d575..54812d547 100644 --- a/pkg/generated/informers/externalversions/factory.go +++ b/api/generated/informers/externalversions/factory.go @@ -27,9 +27,9 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" - versioned "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned" - internalinterfaces "sigs.k8s.io/node-feature-discovery/pkg/generated/informers/externalversions/internalinterfaces" - nfd "sigs.k8s.io/node-feature-discovery/pkg/generated/informers/externalversions/nfd" + versioned "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned" + internalinterfaces "sigs.k8s.io/node-feature-discovery/api/generated/informers/externalversions/internalinterfaces" + nfd "sigs.k8s.io/node-feature-discovery/api/generated/informers/externalversions/nfd" ) // SharedInformerOption defines the functional option type for SharedInformerFactory. diff --git a/pkg/generated/informers/externalversions/generic.go b/api/generated/informers/externalversions/generic.go similarity index 96% rename from pkg/generated/informers/externalversions/generic.go rename to api/generated/informers/externalversions/generic.go index fc95fbea0..ca1ed50a5 100644 --- a/pkg/generated/informers/externalversions/generic.go +++ b/api/generated/informers/externalversions/generic.go @@ -23,7 +23,7 @@ import ( schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" - v1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + v1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) // GenericInformer is type of SharedIndexInformer which will locate and delegate to other diff --git a/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go b/api/generated/informers/externalversions/internalinterfaces/factory_interfaces.go similarity index 95% rename from pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go rename to api/generated/informers/externalversions/internalinterfaces/factory_interfaces.go index 78f938add..7f1153741 100644 --- a/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/api/generated/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -24,7 +24,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" cache "k8s.io/client-go/tools/cache" - versioned "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned" + versioned "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned" ) // NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer. diff --git a/pkg/generated/informers/externalversions/nfd/interface.go b/api/generated/informers/externalversions/nfd/interface.go similarity index 92% rename from pkg/generated/informers/externalversions/nfd/interface.go rename to api/generated/informers/externalversions/nfd/interface.go index 9193cca6b..8c6835831 100644 --- a/pkg/generated/informers/externalversions/nfd/interface.go +++ b/api/generated/informers/externalversions/nfd/interface.go @@ -19,8 +19,8 @@ limitations under the License. package nfd import ( - internalinterfaces "sigs.k8s.io/node-feature-discovery/pkg/generated/informers/externalversions/internalinterfaces" - v1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/generated/informers/externalversions/nfd/v1alpha1" + internalinterfaces "sigs.k8s.io/node-feature-discovery/api/generated/informers/externalversions/internalinterfaces" + v1alpha1 "sigs.k8s.io/node-feature-discovery/api/generated/informers/externalversions/nfd/v1alpha1" ) // Interface provides access to each of this group's versions. diff --git a/pkg/generated/informers/externalversions/nfd/v1alpha1/interface.go b/api/generated/informers/externalversions/nfd/v1alpha1/interface.go similarity index 96% rename from pkg/generated/informers/externalversions/nfd/v1alpha1/interface.go rename to api/generated/informers/externalversions/nfd/v1alpha1/interface.go index 85eb8ed39..d92f42ab0 100644 --- a/pkg/generated/informers/externalversions/nfd/v1alpha1/interface.go +++ b/api/generated/informers/externalversions/nfd/v1alpha1/interface.go @@ -19,7 +19,7 @@ limitations under the License. package v1alpha1 import ( - internalinterfaces "sigs.k8s.io/node-feature-discovery/pkg/generated/informers/externalversions/internalinterfaces" + internalinterfaces "sigs.k8s.io/node-feature-discovery/api/generated/informers/externalversions/internalinterfaces" ) // Interface provides access to all the informers in this group version. diff --git a/pkg/generated/informers/externalversions/nfd/v1alpha1/nodefeature.go b/api/generated/informers/externalversions/nfd/v1alpha1/nodefeature.go similarity index 92% rename from pkg/generated/informers/externalversions/nfd/v1alpha1/nodefeature.go rename to api/generated/informers/externalversions/nfd/v1alpha1/nodefeature.go index 997488cab..570a73114 100644 --- a/pkg/generated/informers/externalversions/nfd/v1alpha1/nodefeature.go +++ b/api/generated/informers/externalversions/nfd/v1alpha1/nodefeature.go @@ -26,10 +26,10 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" - versioned "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned" - internalinterfaces "sigs.k8s.io/node-feature-discovery/pkg/generated/informers/externalversions/internalinterfaces" - v1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/generated/listers/nfd/v1alpha1" + versioned "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned" + internalinterfaces "sigs.k8s.io/node-feature-discovery/api/generated/informers/externalversions/internalinterfaces" + v1alpha1 "sigs.k8s.io/node-feature-discovery/api/generated/listers/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) // NodeFeatureInformer provides access to a shared informer and lister for diff --git a/pkg/generated/informers/externalversions/nfd/v1alpha1/nodefeaturerule.go b/api/generated/informers/externalversions/nfd/v1alpha1/nodefeaturerule.go similarity index 92% rename from pkg/generated/informers/externalversions/nfd/v1alpha1/nodefeaturerule.go rename to api/generated/informers/externalversions/nfd/v1alpha1/nodefeaturerule.go index fb0d1c362..47fae6dfb 100644 --- a/pkg/generated/informers/externalversions/nfd/v1alpha1/nodefeaturerule.go +++ b/api/generated/informers/externalversions/nfd/v1alpha1/nodefeaturerule.go @@ -26,10 +26,10 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" - versioned "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned" - internalinterfaces "sigs.k8s.io/node-feature-discovery/pkg/generated/informers/externalversions/internalinterfaces" - v1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/generated/listers/nfd/v1alpha1" + versioned "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned" + internalinterfaces "sigs.k8s.io/node-feature-discovery/api/generated/informers/externalversions/internalinterfaces" + v1alpha1 "sigs.k8s.io/node-feature-discovery/api/generated/listers/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) // NodeFeatureRuleInformer provides access to a shared informer and lister for diff --git a/pkg/generated/listers/nfd/v1alpha1/expansion_generated.go b/api/generated/listers/nfd/v1alpha1/expansion_generated.go similarity index 100% rename from pkg/generated/listers/nfd/v1alpha1/expansion_generated.go rename to api/generated/listers/nfd/v1alpha1/expansion_generated.go diff --git a/pkg/generated/listers/nfd/v1alpha1/nodefeature.go b/api/generated/listers/nfd/v1alpha1/nodefeature.go similarity index 98% rename from pkg/generated/listers/nfd/v1alpha1/nodefeature.go rename to api/generated/listers/nfd/v1alpha1/nodefeature.go index 14f0d08b9..ca3a184da 100644 --- a/pkg/generated/listers/nfd/v1alpha1/nodefeature.go +++ b/api/generated/listers/nfd/v1alpha1/nodefeature.go @@ -22,7 +22,7 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" - v1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + v1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) // NodeFeatureLister helps list NodeFeatures. diff --git a/pkg/generated/listers/nfd/v1alpha1/nodefeaturerule.go b/api/generated/listers/nfd/v1alpha1/nodefeaturerule.go similarity index 97% rename from pkg/generated/listers/nfd/v1alpha1/nodefeaturerule.go rename to api/generated/listers/nfd/v1alpha1/nodefeaturerule.go index 99c5edb71..6f8bf2b11 100644 --- a/pkg/generated/listers/nfd/v1alpha1/nodefeaturerule.go +++ b/api/generated/listers/nfd/v1alpha1/nodefeaturerule.go @@ -22,7 +22,7 @@ import ( "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" - v1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + v1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) // NodeFeatureRuleLister helps list NodeFeatureRules. diff --git a/api/nfd/go.mod b/api/nfd/go.mod new file mode 100644 index 000000000..c763e745c --- /dev/null +++ b/api/nfd/go.mod @@ -0,0 +1,52 @@ +module sigs.k8s.io/node-feature-discovery/api/nfd + +go 1.22 + +require ( + github.com/gogo/protobuf v1.3.2 + github.com/stretchr/testify v1.8.4 + k8s.io/api v0.29.0 + k8s.io/apimachinery v0.29.0 + k8s.io/client-go v0.29.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/go-logr/logr v1.3.0 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.3 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect + github.com/google/uuid v1.5.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/oauth2 v0.13.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/term v0.16.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.17.0 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/protobuf v1.32.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect +) diff --git a/api/nfd/go.sum b/api/nfd/go.sum new file mode 100644 index 000000000..025f83221 --- /dev/null +++ b/api/nfd/go.sum @@ -0,0 +1,171 @@ +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= +github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= +golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= +k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= +k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= +k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= +k8s.io/client-go v0.29.0 h1:KmlDtFcrdUzOYrBhXHgKw5ycWzc3ryPX5mQe0SkG3y8= +k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/pkg/apis/nfd/v1alpha1/annotations_labels.go b/api/nfd/v1alpha1/annotations_labels.go similarity index 100% rename from pkg/apis/nfd/v1alpha1/annotations_labels.go rename to api/nfd/v1alpha1/annotations_labels.go diff --git a/pkg/apis/nfd/v1alpha1/doc.go b/api/nfd/v1alpha1/doc.go similarity index 100% rename from pkg/apis/nfd/v1alpha1/doc.go rename to api/nfd/v1alpha1/doc.go diff --git a/pkg/apis/nfd/v1alpha1/feature.go b/api/nfd/v1alpha1/feature.go similarity index 100% rename from pkg/apis/nfd/v1alpha1/feature.go rename to api/nfd/v1alpha1/feature.go diff --git a/pkg/apis/nfd/v1alpha1/feature_test.go b/api/nfd/v1alpha1/feature_test.go similarity index 100% rename from pkg/apis/nfd/v1alpha1/feature_test.go rename to api/nfd/v1alpha1/feature_test.go diff --git a/pkg/apis/nfd/v1alpha1/generate.sh b/api/nfd/v1alpha1/generate.sh similarity index 100% rename from pkg/apis/nfd/v1alpha1/generate.sh rename to api/nfd/v1alpha1/generate.sh diff --git a/pkg/apis/nfd/v1alpha1/generated.pb.go b/api/nfd/v1alpha1/generated.pb.go similarity index 100% rename from pkg/apis/nfd/v1alpha1/generated.pb.go rename to api/nfd/v1alpha1/generated.pb.go diff --git a/pkg/apis/nfd/v1alpha1/generated.proto b/api/nfd/v1alpha1/generated.proto similarity index 96% rename from pkg/apis/nfd/v1alpha1/generated.proto rename to api/nfd/v1alpha1/generated.proto index 7c652a9ae..dab35a16a 100644 --- a/pkg/apis/nfd/v1alpha1/generated.proto +++ b/api/nfd/v1alpha1/generated.proto @@ -22,7 +22,7 @@ syntax = "proto2"; package v1alpha1; // Package-wide variables from generator "generated". -option go_package = "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1"; +option go_package = "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1"; // AttributeFeatureSet is a set of features having string value. // diff --git a/pkg/apis/nfd/v1alpha1/register.go b/api/nfd/v1alpha1/register.go similarity index 100% rename from pkg/apis/nfd/v1alpha1/register.go rename to api/nfd/v1alpha1/register.go diff --git a/pkg/apis/nfd/v1alpha1/types.go b/api/nfd/v1alpha1/types.go similarity index 100% rename from pkg/apis/nfd/v1alpha1/types.go rename to api/nfd/v1alpha1/types.go diff --git a/pkg/apis/nfd/v1alpha1/zz_generated.deepcopy.go b/api/nfd/v1alpha1/zz_generated.deepcopy.go similarity index 100% rename from pkg/apis/nfd/v1alpha1/zz_generated.deepcopy.go rename to api/nfd/v1alpha1/zz_generated.deepcopy.go diff --git a/go.mod b/go.mod index 71b7028b9..d2bd3fbf0 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,6 @@ go 1.22 require ( github.com/fsnotify/fsnotify v1.7.0 - github.com/gogo/protobuf v1.3.2 github.com/golang/protobuf v1.5.4 github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.5.0 @@ -36,6 +35,7 @@ require ( k8s.io/kubernetes v1.29.0 k8s.io/pod-security-admission v0.29.0 k8s.io/utils v0.0.0-20230726121419-3b25d923346b + sigs.k8s.io/node-feature-discovery/api/nfd v0.0.0-00010101000000-000000000000 sigs.k8s.io/yaml v1.3.0 ) @@ -92,6 +92,7 @@ require ( github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/gofrs/uuid v4.4.0+incompatible // indirect + github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect @@ -231,4 +232,5 @@ replace ( k8s.io/mount-utils => k8s.io/mount-utils v0.29.0 k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.29.0 k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.29.0 + sigs.k8s.io/node-feature-discovery/api/nfd => ./api/nfd ) diff --git a/hack/update_codegen.sh b/hack/update_codegen.sh index 77a530d0b..052cb6551 100755 --- a/hack/update_codegen.sh +++ b/hack/update_codegen.sh @@ -42,7 +42,7 @@ source "${CODEGEN_PKG}/kube_codegen.sh" go generate ./cmd/... ./pkg/... ./source/... -controller-gen object crd output:crd:stdout paths=./pkg/apis/... > deployment/base/nfd-crds/nfd-api-crds.yaml +controller-gen object crd output:crd:stdout paths=./apis/... > deployment/base/nfd-crds/nfd-api-crds.yaml mkdir -p deployment/helm/node-feature-discovery/crds cp deployment/base/nfd-crds/nfd-api-crds.yaml deployment/helm/node-feature-discovery/crds @@ -54,15 +54,15 @@ kube::codegen::gen_helpers \ --boilerplate ${NFD_ROOT}/hack/boilerplate.go.txt kube::codegen::gen_client \ - --input-pkg-root sigs.k8s.io/node-feature-discovery/pkg/apis \ - --output-pkg-root sigs.k8s.io/node-feature-discovery/pkg/generated \ + --input-pkg-root sigs.k8s.io/node-feature-discovery/apis \ + --output-pkg-root sigs.k8s.io/node-feature-discovery/generated \ --output-base "${NFD_ROOT}" \ --boilerplate ${NFD_ROOT}/hack/boilerplate.go.txt \ --with-watch # HACK: manually patching the auto-generated code as code-generator cannot # properly handle deepcopy of MatchExpressionSet. -sed s'/out = new(map\[string\]\*MatchExpression)/out = new(MatchExpressionSet)/' -i pkg/apis/nfd/v1alpha1/zz_generated.deepcopy.go +sed s'/out = new(map\[string\]\*MatchExpression)/out = new(MatchExpressionSet)/' -i apis/nfd/v1alpha1/zz_generated.deepcopy.go # We need to clean up the go.mod file since code-generator adds temporary library to the go.mod file. "${GO_CMD}" mod tidy \ No newline at end of file diff --git a/pkg/apis/nfd/v1alpha1/nodefeaturerule/expression-api_test.go b/pkg/apis/nfd/nodefeaturerule/expression-api_test.go similarity index 97% rename from pkg/apis/nfd/v1alpha1/nodefeaturerule/expression-api_test.go rename to pkg/apis/nfd/nodefeaturerule/expression-api_test.go index e9974d6df..d33ad355b 100644 --- a/pkg/apis/nfd/v1alpha1/nodefeaturerule/expression-api_test.go +++ b/pkg/apis/nfd/nodefeaturerule/expression-api_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" "sigs.k8s.io/yaml" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" - api "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1/nodefeaturerule" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" + api "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/nodefeaturerule" ) type BoolAssertionFunc func(assert.TestingT, bool, ...interface{}) bool diff --git a/pkg/apis/nfd/v1alpha1/nodefeaturerule/expression.go b/pkg/apis/nfd/nodefeaturerule/expression.go similarity index 99% rename from pkg/apis/nfd/v1alpha1/nodefeaturerule/expression.go rename to pkg/apis/nfd/nodefeaturerule/expression.go index 7438f3bb1..fbc1e1e56 100644 --- a/pkg/apis/nfd/v1alpha1/nodefeaturerule/expression.go +++ b/pkg/apis/nfd/nodefeaturerule/expression.go @@ -26,7 +26,7 @@ import ( "golang.org/x/exp/maps" "k8s.io/klog/v2" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) var matchOps = map[nfdv1alpha1.MatchOp]struct{}{ diff --git a/pkg/apis/nfd/v1alpha1/nodefeaturerule/expression_test.go b/pkg/apis/nfd/nodefeaturerule/expression_test.go similarity index 99% rename from pkg/apis/nfd/v1alpha1/nodefeaturerule/expression_test.go rename to pkg/apis/nfd/nodefeaturerule/expression_test.go index 3b51ca12e..931cd72b9 100644 --- a/pkg/apis/nfd/v1alpha1/nodefeaturerule/expression_test.go +++ b/pkg/apis/nfd/nodefeaturerule/expression_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) type BoolAssertionFunc func(assert.TestingT, bool, ...interface{}) bool diff --git a/pkg/apis/nfd/v1alpha1/nodefeaturerule/rule.go b/pkg/apis/nfd/nodefeaturerule/rule.go similarity index 99% rename from pkg/apis/nfd/v1alpha1/nodefeaturerule/rule.go rename to pkg/apis/nfd/nodefeaturerule/rule.go index dd436d115..7e9f7fa71 100644 --- a/pkg/apis/nfd/v1alpha1/nodefeaturerule/rule.go +++ b/pkg/apis/nfd/nodefeaturerule/rule.go @@ -27,7 +27,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/klog/v2" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/utils" ) diff --git a/pkg/apis/nfd/v1alpha1/nodefeaturerule/rule_test.go b/pkg/apis/nfd/nodefeaturerule/rule_test.go similarity index 99% rename from pkg/apis/nfd/v1alpha1/nodefeaturerule/rule_test.go rename to pkg/apis/nfd/nodefeaturerule/rule_test.go index a642404a7..ab52b7d24 100644 --- a/pkg/apis/nfd/v1alpha1/nodefeaturerule/rule_test.go +++ b/pkg/apis/nfd/nodefeaturerule/rule_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) // newMatchExpression returns a new MatchExpression instance. diff --git a/pkg/apis/nfd/validate/validate.go b/pkg/apis/nfd/validate/validate.go index a7c40c56a..4f73b454f 100644 --- a/pkg/apis/nfd/validate/validate.go +++ b/pkg/apis/nfd/validate/validate.go @@ -25,7 +25,7 @@ import ( k8sQuantity "k8s.io/apimachinery/pkg/api/resource" k8svalidation "k8s.io/apimachinery/pkg/util/validation" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) var ( diff --git a/pkg/kubectl-nfd/dryrun.go b/pkg/kubectl-nfd/dryrun.go index c502887ca..ec06a3c35 100644 --- a/pkg/kubectl-nfd/dryrun.go +++ b/pkg/kubectl-nfd/dryrun.go @@ -25,8 +25,8 @@ import ( corev1 "k8s.io/api/core/v1" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" - "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1/nodefeaturerule" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" + "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/nodefeaturerule" "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/validate" ) diff --git a/pkg/kubectl-nfd/test.go b/pkg/kubectl-nfd/test.go index bafc83ab7..6efb0e5bf 100644 --- a/pkg/kubectl-nfd/test.go +++ b/pkg/kubectl-nfd/test.go @@ -24,9 +24,9 @@ import ( k8sLabels "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/clientcmd" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" - nfdclientset "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned" - nfdinformers "sigs.k8s.io/node-feature-discovery/pkg/generated/informers/externalversions" + nfdclientset "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned" + nfdinformers "sigs.k8s.io/node-feature-discovery/api/generated/informers/externalversions" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/yaml" ) diff --git a/pkg/kubectl-nfd/validate.go b/pkg/kubectl-nfd/validate.go index 35424bd3f..43d70df09 100644 --- a/pkg/kubectl-nfd/validate.go +++ b/pkg/kubectl-nfd/validate.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/api/resource" "sigs.k8s.io/yaml" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/validate" ) diff --git a/pkg/labeler/labeler.pb.go b/pkg/labeler/labeler.pb.go index 7f9bdf685..23469ee7d 100644 --- a/pkg/labeler/labeler.pb.go +++ b/pkg/labeler/labeler.pb.go @@ -30,7 +30,7 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" - v1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + v1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" sync "sync" ) diff --git a/pkg/nfd-gc/nfd-gc.go b/pkg/nfd-gc/nfd-gc.go index 00cc33e10..fd0e7f4a9 100644 --- a/pkg/nfd-gc/nfd-gc.go +++ b/pkg/nfd-gc/nfd-gc.go @@ -31,8 +31,8 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/klog/v2" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" - nfdclientset "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned" + nfdclientset "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/utils" "sigs.k8s.io/node-feature-discovery/pkg/version" ) diff --git a/pkg/nfd-gc/nfd-gc_test.go b/pkg/nfd-gc/nfd-gc_test.go index 0f4ed26d8..e49094c5d 100644 --- a/pkg/nfd-gc/nfd-gc_test.go +++ b/pkg/nfd-gc/nfd-gc_test.go @@ -31,7 +31,7 @@ import ( "k8s.io/client-go/informers" k8sclientset "k8s.io/client-go/kubernetes" fakek8sclientset "k8s.io/client-go/kubernetes/fake" - fakenfdclientset "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned/fake" + fakenfdclientset "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned/fake" . "github.com/smartystreets/goconvey/convey" ) diff --git a/pkg/nfd-master/nfd-api-controller.go b/pkg/nfd-master/nfd-api-controller.go index af86b2b45..ac835241e 100644 --- a/pkg/nfd-master/nfd-api-controller.go +++ b/pkg/nfd-master/nfd-api-controller.go @@ -26,11 +26,11 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/klog/v2" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" - nfdclientset "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned" - nfdscheme "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned/scheme" - nfdinformers "sigs.k8s.io/node-feature-discovery/pkg/generated/informers/externalversions" - nfdlisters "sigs.k8s.io/node-feature-discovery/pkg/generated/listers/nfd/v1alpha1" + nfdclientset "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned" + nfdscheme "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned/scheme" + nfdinformers "sigs.k8s.io/node-feature-discovery/api/generated/informers/externalversions" + nfdlisters "sigs.k8s.io/node-feature-discovery/api/generated/listers/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/utils" ) diff --git a/pkg/nfd-master/nfd-api-controller_test.go b/pkg/nfd-master/nfd-api-controller_test.go index bffa9ffc2..44153f41a 100644 --- a/pkg/nfd-master/nfd-api-controller_test.go +++ b/pkg/nfd-master/nfd-api-controller_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) func TestGetNodeNameForObj(t *testing.T) { diff --git a/pkg/nfd-master/nfd-master-internal_test.go b/pkg/nfd-master/nfd-master-internal_test.go index 16ba81088..ac60aa2a9 100644 --- a/pkg/nfd-master/nfd-master-internal_test.go +++ b/pkg/nfd-master/nfd-master-internal_test.go @@ -43,11 +43,11 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/klog/v2" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + fakenfdclient "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned/fake" + nfdscheme "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned/scheme" + nfdinformers "sigs.k8s.io/node-feature-discovery/api/generated/informers/externalversions" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/features" - fakenfdclient "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned/fake" - nfdscheme "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned/scheme" - nfdinformers "sigs.k8s.io/node-feature-discovery/pkg/generated/informers/externalversions" "sigs.k8s.io/node-feature-discovery/pkg/labeler" "sigs.k8s.io/node-feature-discovery/pkg/utils" ) diff --git a/pkg/nfd-master/nfd-master.go b/pkg/nfd-master/nfd-master.go index 97c2ebcd6..c4ffbc2a7 100644 --- a/pkg/nfd-master/nfd-master.go +++ b/pkg/nfd-master/nfd-master.go @@ -53,8 +53,8 @@ import ( taintutils "k8s.io/kubernetes/pkg/util/taints" "sigs.k8s.io/yaml" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" - "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1/nodefeaturerule" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" + "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/nodefeaturerule" "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/validate" "sigs.k8s.io/node-feature-discovery/pkg/features" pb "sigs.k8s.io/node-feature-discovery/pkg/labeler" diff --git a/pkg/nfd-master/node-updater-pool_test.go b/pkg/nfd-master/node-updater-pool_test.go index 5c6924bf6..31a0c3ade 100644 --- a/pkg/nfd-master/node-updater-pool_test.go +++ b/pkg/nfd-master/node-updater-pool_test.go @@ -23,7 +23,7 @@ import ( . "github.com/smartystreets/goconvey/convey" fakek8sclient "k8s.io/client-go/kubernetes/fake" - fakenfdclient "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned/fake" + fakenfdclient "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned/fake" ) func newFakeNodeUpdaterPool(nfdMaster *nfdMaster) *nodeUpdaterPool { diff --git a/pkg/nfd-worker/nfd-worker-internal_test.go b/pkg/nfd-worker/nfd-worker-internal_test.go index 7747c1fc5..101177684 100644 --- a/pkg/nfd-worker/nfd-worker-internal_test.go +++ b/pkg/nfd-worker/nfd-worker-internal_test.go @@ -28,7 +28,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/vektra/errors" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/labeler" "sigs.k8s.io/node-feature-discovery/pkg/utils" "sigs.k8s.io/node-feature-discovery/source" diff --git a/pkg/nfd-worker/nfd-worker.go b/pkg/nfd-worker/nfd-worker.go index e2348edf5..1968fac53 100644 --- a/pkg/nfd-worker/nfd-worker.go +++ b/pkg/nfd-worker/nfd-worker.go @@ -45,9 +45,9 @@ import ( apiequality "k8s.io/apimachinery/pkg/api/equality" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdclient "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/features" - nfdclient "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned" pb "sigs.k8s.io/node-feature-discovery/pkg/labeler" "sigs.k8s.io/node-feature-discovery/pkg/utils" "sigs.k8s.io/node-feature-discovery/pkg/version" diff --git a/source/cpu/cpu.go b/source/cpu/cpu.go index 5775d545a..37187457e 100644 --- a/source/cpu/cpu.go +++ b/source/cpu/cpu.go @@ -27,7 +27,7 @@ import ( "github.com/klauspost/cpuid/v2" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/utils" "sigs.k8s.io/node-feature-discovery/pkg/utils/hostpath" "sigs.k8s.io/node-feature-discovery/source" diff --git a/source/custom/api/conversion.go b/source/custom/api/conversion.go index 0034e49a6..b931b47b7 100644 --- a/source/custom/api/conversion.go +++ b/source/custom/api/conversion.go @@ -17,7 +17,7 @@ limitations under the License. package api import ( - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) // convertFeaturematchertermToV1alpha1 converts the internal api type to nfdv1alpha1. diff --git a/source/custom/api/conversion_test.go b/source/custom/api/conversion_test.go index 2d0e8a7f2..f5c3707df 100644 --- a/source/custom/api/conversion_test.go +++ b/source/custom/api/conversion_test.go @@ -21,8 +21,8 @@ import ( "github.com/stretchr/testify/assert" - "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) func TestRuleConversion(t *testing.T) { diff --git a/source/custom/custom.go b/source/custom/custom.go index 2655279f0..0e422ec2e 100644 --- a/source/custom/custom.go +++ b/source/custom/custom.go @@ -22,8 +22,8 @@ import ( "k8s.io/klog/v2" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" - nodefeaturerule "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1/nodefeaturerule" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" + nodefeaturerule "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/nodefeaturerule" "sigs.k8s.io/node-feature-discovery/pkg/utils" "sigs.k8s.io/node-feature-discovery/source" api "sigs.k8s.io/node-feature-discovery/source/custom/api" diff --git a/source/custom/directory_features.go b/source/custom/directory_features.go index 5fc92e845..8e4cb69c6 100644 --- a/source/custom/directory_features.go +++ b/source/custom/directory_features.go @@ -22,7 +22,7 @@ import ( "strings" "k8s.io/klog/v2" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" api "sigs.k8s.io/node-feature-discovery/source/custom/api" "sigs.k8s.io/yaml" ) diff --git a/source/custom/static_features.go b/source/custom/static_features.go index 45e77cd6c..bcb91d3b8 100644 --- a/source/custom/static_features.go +++ b/source/custom/static_features.go @@ -17,7 +17,7 @@ limitations under the License. package custom import ( - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) // getStaticRules returns statically configured custom features to discover diff --git a/source/fake/fake.go b/source/fake/fake.go index 92f205c0e..247e36bf2 100644 --- a/source/fake/fake.go +++ b/source/fake/fake.go @@ -20,7 +20,7 @@ import ( "fmt" "k8s.io/klog/v2" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/utils" "sigs.k8s.io/node-feature-discovery/source" ) diff --git a/source/kernel/kernel.go b/source/kernel/kernel.go index 28cac6a8a..b753b302e 100644 --- a/source/kernel/kernel.go +++ b/source/kernel/kernel.go @@ -22,7 +22,7 @@ import ( "k8s.io/klog/v2" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/utils" "sigs.k8s.io/node-feature-discovery/source" ) diff --git a/source/local/local.go b/source/local/local.go index 8acb0898a..dcb93d927 100644 --- a/source/local/local.go +++ b/source/local/local.go @@ -27,7 +27,7 @@ import ( "k8s.io/klog/v2" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/utils" "sigs.k8s.io/node-feature-discovery/source" ) diff --git a/source/memory/memory.go b/source/memory/memory.go index da8803fff..5c4ce9f61 100644 --- a/source/memory/memory.go +++ b/source/memory/memory.go @@ -25,7 +25,7 @@ import ( "k8s.io/klog/v2" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/utils" "sigs.k8s.io/node-feature-discovery/pkg/utils/hostpath" "sigs.k8s.io/node-feature-discovery/source" diff --git a/source/network/network.go b/source/network/network.go index a6cd71f1f..5f35d5064 100644 --- a/source/network/network.go +++ b/source/network/network.go @@ -27,7 +27,7 @@ import ( "k8s.io/klog/v2" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/utils" "sigs.k8s.io/node-feature-discovery/pkg/utils/hostpath" "sigs.k8s.io/node-feature-discovery/source" diff --git a/source/pci/pci.go b/source/pci/pci.go index 39be031fc..3e7870c03 100644 --- a/source/pci/pci.go +++ b/source/pci/pci.go @@ -23,7 +23,7 @@ import ( "golang.org/x/exp/maps" "k8s.io/klog/v2" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/utils" "sigs.k8s.io/node-feature-discovery/source" ) diff --git a/source/pci/pci_test.go b/source/pci/pci_test.go index 8face6ce4..c5a7e40b5 100644 --- a/source/pci/pci_test.go +++ b/source/pci/pci_test.go @@ -22,7 +22,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/utils/hostpath" "sigs.k8s.io/node-feature-discovery/source" ) diff --git a/source/pci/utils.go b/source/pci/utils.go index f857baa28..29c7afa11 100644 --- a/source/pci/utils.go +++ b/source/pci/utils.go @@ -24,7 +24,7 @@ import ( "k8s.io/klog/v2" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/utils/hostpath" ) diff --git a/source/source.go b/source/source.go index 053ea69f0..06cdc5076 100644 --- a/source/source.go +++ b/source/source.go @@ -21,7 +21,7 @@ package source import ( "fmt" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) // Source is the base interface for all other source interfaces diff --git a/source/storage/storage.go b/source/storage/storage.go index b7534ae40..813df7013 100644 --- a/source/storage/storage.go +++ b/source/storage/storage.go @@ -24,7 +24,7 @@ import ( "k8s.io/klog/v2" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/utils" "sigs.k8s.io/node-feature-discovery/pkg/utils/hostpath" "sigs.k8s.io/node-feature-discovery/source" diff --git a/source/system/system.go b/source/system/system.go index e1cfaff62..3f32d21c6 100644 --- a/source/system/system.go +++ b/source/system/system.go @@ -24,7 +24,7 @@ import ( "k8s.io/klog/v2" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/utils" "sigs.k8s.io/node-feature-discovery/pkg/utils/hostpath" "sigs.k8s.io/node-feature-discovery/source" diff --git a/source/usb/usb.go b/source/usb/usb.go index ab3febcb1..f48fe5bcd 100644 --- a/source/usb/usb.go +++ b/source/usb/usb.go @@ -23,7 +23,7 @@ import ( "golang.org/x/exp/maps" "k8s.io/klog/v2" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/utils" "sigs.k8s.io/node-feature-discovery/source" ) diff --git a/source/usb/utils.go b/source/usb/utils.go index 2fbf80e50..c5aa4d69a 100644 --- a/source/usb/utils.go +++ b/source/usb/utils.go @@ -25,7 +25,7 @@ import ( "k8s.io/klog/v2" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/utils/hostpath" ) diff --git a/test/e2e/nfd_gc_test.go b/test/e2e/nfd_gc_test.go index ac825d91b..eab1f4de6 100644 --- a/test/e2e/nfd_gc_test.go +++ b/test/e2e/nfd_gc_test.go @@ -29,8 +29,8 @@ import ( extclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/kubernetes/test/e2e/framework" - "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" - nfdclient "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned" + nfdclient "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned" + "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" testutils "sigs.k8s.io/node-feature-discovery/test/e2e/utils" testdeploy "sigs.k8s.io/node-feature-discovery/test/e2e/utils/deployment" diff --git a/test/e2e/node_feature_discovery_test.go b/test/e2e/node_feature_discovery_test.go index 224dece28..12ad9a275 100644 --- a/test/e2e/node_feature_discovery_test.go +++ b/test/e2e/node_feature_discovery_test.go @@ -42,8 +42,8 @@ import ( e2epod "k8s.io/kubernetes/test/e2e/framework/pod" admissionapi "k8s.io/pod-security-admission/api" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" - nfdclient "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned" + nfdclient "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" "sigs.k8s.io/node-feature-discovery/pkg/utils" "sigs.k8s.io/node-feature-discovery/source/custom" testutils "sigs.k8s.io/node-feature-discovery/test/e2e/utils" diff --git a/test/e2e/utils/crd.go b/test/e2e/utils/crd.go index 0f36f54ab..ef4821fd9 100644 --- a/test/e2e/utils/crd.go +++ b/test/e2e/utils/crd.go @@ -32,9 +32,9 @@ import ( apiruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes/scheme" - nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/pkg/apis/nfd/v1alpha1" - nfdclientset "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned" - nfdscheme "sigs.k8s.io/node-feature-discovery/pkg/generated/clientset/versioned/scheme" + nfdclientset "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned" + nfdscheme "sigs.k8s.io/node-feature-discovery/api/generated/clientset/versioned/scheme" + nfdv1alpha1 "sigs.k8s.io/node-feature-discovery/api/nfd/v1alpha1" ) var packagePath string